/* 云悦灵动 · Design System */
:root {
  --bg: #05070f;
  --bg-elevated: #0a0f1c;
  --surface: rgba(14, 20, 36, 0.72);
  --surface-solid: #0e1424;
  --border: rgba(148, 163, 255, 0.12);
  --border-strong: rgba(148, 163, 255, 0.22);
  --ink: #eef2ff;
  --muted: #8b97b8;
  --accent: #4f8cff;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --success: #3ddc97;
  --danger: #ff5c7a;
  --nav-h: 72px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 40px rgba(79, 140, 255, 0.25);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(79, 140, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(139, 92, 246, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(34, 211, 238, 0.08), transparent 50%),
    var(--bg);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgba(79, 140, 255, 0.35);
  color: #fff;
}

/* ===== Navbar ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  background: rgba(5, 7, 15, 0.35);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(5, 7, 15, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.site-nav .container {
  width: 100%;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-brand img {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(79, 140, 255, 0.25));
  transition: transform 0.3s ease;
}

.nav-brand:hover img {
  transform: translateY(-2px) scale(1.02);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(79, 140, 255, 0.12);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-cta {
  margin-left: 0.4rem;
  padding: 0.55rem 1.1rem !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(79, 140, 255, 0.3);
}

.nav-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nav-cta.active::after {
  display: none;
}

.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-menu {
  margin-top: 0.4rem;
  min-width: 160px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Layout ===== */
.site-main {
  min-height: calc(100vh - 280px);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(79, 140, 255, 0.08);
  color: #a8bfff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.9rem;
  background: linear-gradient(180deg, #fff 20%, rgba(238, 242, 255, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 4.5rem) 0 5rem;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-glow.a {
  width: 420px;
  height: 420px;
  top: 8%;
  left: 8%;
  background: rgba(79, 140, 255, 0.28);
  animation: drift 12s ease-in-out infinite alternate;
}

.hero-glow.b {
  width: 360px;
  height: 360px;
  right: 6%;
  bottom: 5%;
  background: rgba(139, 92, 246, 0.22);
  animation: drift 15s ease-in-out infinite alternate-reverse;
}

.hero-glow.c {
  width: 260px;
  height: 260px;
  right: 28%;
  top: 18%;
  background: rgba(34, 211, 238, 0.14);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.12); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1.1rem;
}

.hero-title .grad {
  background: linear-gradient(105deg, #7db4ff 0%, #a78bfa 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 1.2rem;
  max-width: 36em;
}

.hero-desc {
  color: #a9b5d0;
  margin: 0 0 1.8rem;
  max-width: 38em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #c6d2ef;
  font-size: 0.9rem;
}

.pill i {
  color: var(--accent-3);
}

.hero-visual {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orb {
  position: absolute;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 60% 65%, rgba(79, 140, 255, 0.55), transparent 55%),
    radial-gradient(circle at 40% 70%, rgba(139, 92, 246, 0.4), transparent 50%),
    linear-gradient(145deg, #1a2744, #0b1224);
  box-shadow:
    0 0 80px rgba(79, 140, 255, 0.28),
    inset 0 0 60px rgba(255, 255, 255, 0.05);
  animation: float-y 7s ease-in-out infinite;
}

.hero-orb::before,
.hero-orb::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 255, 0.18);
  animation: spin 24s linear infinite;
}

.hero-orb::after {
  inset: -42px;
  border-style: dashed;
  opacity: 0.55;
  animation-duration: 36s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-image {
  position: relative;
  z-index: 2;
  max-height: 380px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  animation: float-y 6s ease-in-out infinite;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 32px rgba(79, 140, 255, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(79, 140, 255, 0.42);
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 255, 0.4);
  transform: translateY(-2px);
}

.btn-lg {
  min-height: 54px;
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  gap: 1.35rem;
}

.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.glass-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
  height: 100%;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 140, 255, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(148, 163, 255, 0.28);
  box-shadow: var(--shadow), var(--glow);
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card > * {
  position: relative;
  z-index: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 1.15rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.28);
}

.card-icon.pink { background: linear-gradient(135deg, #f472b6, #fb7185); box-shadow: 0 10px 24px rgba(244, 114, 182, 0.25); }
.card-icon.cyan { background: linear-gradient(135deg, #22d3ee, #38bdf8); box-shadow: 0 10px 24px rgba(34, 211, 238, 0.25); }
.card-icon.violet { background: linear-gradient(135deg, #a78bfa, #818cf8); box-shadow: 0 10px 24px rgba(167, 139, 250, 0.25); }
.card-icon.amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 10px 24px rgba(251, 191, 36, 0.22); }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: #fff;
}

.card-desc {
  color: var(--muted);
  margin: 0 0 1.15rem;
  font-size: 0.98rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #c3cde6;
  font-size: 0.86rem;
}

.feature-chip i {
  color: var(--accent-3);
  font-size: 0.9rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8eb6ff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.25s ease, color 0.25s ease;
}

.card-link:hover {
  gap: 0.6rem;
  color: #b7d0ff;
}

/* service detail cards */
.service-card .card-title {
  font-size: 1.35rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.4rem;
  color: #b7c2dc;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 10px rgba(79, 140, 255, 0.55);
}

/* ===== Stats ===== */
.stats-panel {
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.9), rgba(10, 15, 28, 0.85));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem 1.5rem;
  margin: 0 0 1rem;
}

.stats-panel .section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--success);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.55rem;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== Contact / After-sales ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 2.5rem;
  backdrop-filter: blur(14px);
  margin-bottom: 1.5rem;
}

.panel h2 {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  color: #fff;
}

.panel p {
  color: #b0bcd6;
  line-height: 1.9;
}

.contact-card {
  text-align: center;
  padding: 1.6rem 1rem;
}

.contact-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.contact-label {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.contact-value {
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  word-break: break-all;
}

.after-item {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), var(--accent-2)) 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.35rem;
  height: 100%;
}

.after-item h5 {
  color: #fff;
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.after-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== CTA band ===== */
.cta-band {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(79, 140, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(14, 20, 36, 0.95), rgba(8, 12, 24, 0.95));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.cta-band h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.7rem;
  color: #fff;
}

.cta-band p {
  color: var(--muted);
  margin: 0 0 1.6rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* ===== Friend links ===== */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.friend-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #c9d4ef;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.friend-link:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 255, 0.35);
  background: rgba(79, 140, 255, 0.1);
  color: #fff;
}

.friend-link img {
  max-height: 28px;
  max-width: 72px;
  object-fit: contain;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 5rem;
  padding: 4rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.4), rgba(5, 7, 15, 0.95));
  color: var(--muted);
}

.site-footer h5 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.site-footer a {
  color: var(--muted);
  transition: color 0.25s ease;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
}

/* ===== Chat widget ===== */
.chat-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
}

.chat-button {
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(79, 140, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(79, 140, 255, 0.5);
}

.chat-button:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
}

.chat-button .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
}

.chat-window {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  width: min(380px, calc(100vw - 2rem));
  height: min(520px, calc(100vh - 8rem));
  background: rgba(10, 15, 28, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.chat-window.active {
  display: flex;
  animation: pop-in 0.28s ease-out;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.28), rgba(139, 92, 246, 0.22));
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h5 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.chat-header .status {
  font-size: 0.8rem;
  color: #a8b8d8;
}

.chat-header .close-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header .close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(5, 7, 15, 0.4);
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.chat-message.user .avatar {
  background: rgba(255, 255, 255, 0.1);
  color: #c5d0e8;
}

.chat-message .content {
  max-width: 75%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.chat-message.service .content {
  background: rgba(255, 255, 255, 0.06);
  color: #e8eeff;
  border-top-left-radius: 4px;
}

.chat-message.user .content {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-top-right-radius: 4px;
}

.chat-message .time {
  font-size: 0.72rem;
  color: #6f7d9c;
  margin-top: 0.25rem;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 28, 0.95);
}

.chat-input-area input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.chat-input-area input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

.chat-input-area button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-input-area button:hover {
  filter: brightness(1.08);
}

/* ===== Auth / form shells ===== */
.auth-shell {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1rem 3rem;
}

.auth-card {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: pop-in 0.4s ease-out;
}

.auth-card h1,
.auth-card h2 {
  text-align: center;
  color: #fff;
  margin: 0 0 0.5rem;
}

.auth-card .lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.form-label {
  color: #c7d2ea;
  font-weight: 500;
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 12px;
  min-height: 48px;
  padding: 0.65rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

.form-control::placeholder {
  color: #6f7d9c;
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ===== Utility ===== */
.text-muted { color: var(--muted) !important; }
.text-white { color: #fff !important; }
.mb-0 { margin-bottom: 0 !important; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Bootstrap dark overrides for pages that still use BS components */
.bg-white,
.bg-light {
  background-color: var(--bg-elevated) !important;
}

.text-dark {
  color: var(--ink) !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

.dropdown-menu {
  background: rgba(14, 20, 36, 0.96);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
}

.dropdown-item {
  color: #c9d4ef;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(79, 140, 255, 0.15);
  color: #fff;
}

.alert {
  border-radius: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual {
    min-height: 280px;
    order: -1;
  }

  .card-grid.cols-3,
  .card-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(5, 7, 15, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    border-radius: 12px;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-cta {
    margin-left: 0;
    justify-content: center;
  }

  .section {
    padding: 3.5rem 0;
  }

  .card-grid.cols-2,
  .card-grid.cols-3,
  .card-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 2rem);
  }

  .panel {
    padding: 1.5rem;
  }

  .chat-window {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
