/* ==========================================================
   WOAIL Copilot — Apple-style + Light/Dark mode
   ========================================================== */

/* ---------- Design Tokens (Light by default) ---------- */
:root {
  /* Surfaces */
  --bg: #fbfbfd;
  --bg-soft: #ffffff;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --text-muted: #86868b;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-strong: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);

  /* Brand */
  --primary: #0071e3;
  --primary-dark: #0058b0;
  --primary-glow: rgba(0, 113, 227, 0.25);
  --primary-soft: rgba(0, 113, 227, 0.1);

  /* Accents */
  --accent-purple: #bf5af2;
  --accent-pink: #ff375f;
  --accent-orange: #ff9f0a;
  --accent-green: #30d158;
  --accent-cyan: #64d2ff;
  --accent-yellow: #ffd60a;

  /* Status */
  --success: #30d158;
  --error: #ff375f;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 24px rgba(0, 113, 227, 0.25);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- Dark Mode Overrides ---------- */
body.dark-mode {
  --bg: #000000;
  --bg-soft: #0a0a0c;
  --text: #f5f5f7;
  --text-dim: #a1a1a6;
  --text-muted: #6e6e73;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 255, 255, 0.22);

  --primary: #2997ff;
  --primary-dark: #0684c7;
  --primary-glow: rgba(41, 151, 255, 0.35);
  --primary-soft: rgba(41, 151, 255, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 8px 24px rgba(41, 151, 255, 0.35);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  transition: background-color 0.4s var(--ease-soft), color 0.4s var(--ease-soft);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease-soft), opacity 0.25s var(--ease-soft);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { margin: 0; }

/* ---------- Aurora Background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-soft);
}

.aurora-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, var(--primary-soft), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(191, 90, 242, 0.08), transparent 50%);
  opacity: 0.9;
}

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: floatGlow 18s ease-in-out infinite;
}

.aurora-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  top: -200px;
  left: -150px;
}

.aurora-glow-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(191, 90, 242, 0.25), transparent 70%);
  top: 30%;
  right: -200px;
  animation-delay: -6s;
}

.aurora-glow-3 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(6, 132, 199, 0.22), transparent 70%);
  bottom: -250px;
  left: 20%;
  animation-delay: -12s;
}

/* Light mode aurora — softer */
body:not(.dark-mode) .aurora-glow {
  opacity: 0.3;
}
body:not(.dark-mode) .aurora-glow-1 {
  background: radial-gradient(circle, rgba(0, 113, 227, 0.18), transparent 70%);
}
body:not(.dark-mode) .aurora-glow-2 {
  background: radial-gradient(circle, rgba(191, 90, 242, 0.15), transparent 70%);
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}
body:not(.dark-mode) #particles-canvas { opacity: 0.25; }

/* ---------- Glass Toolkit ---------- */
.glass-card, .glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.4s var(--ease);
}

.glass-card:hover {
  background: var(--glass-bg-strong);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body:not(.dark-mode) .glass-card,
body:not(.dark-mode) .glass-panel {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-panel {
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Navbar ---------- */
.glass-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1200px;
  z-index: 100;
  border-radius: 999px;
  padding: 10px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s var(--ease-soft);
}

.glass-nav.scrolled {
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .glass-nav {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-logo-text { font-size: 15px; }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}

.nav-links a:hover {
  color: var(--text);
}

body:not(.dark-mode) .nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text);
  transition: all 0.3s var(--ease-soft);
  position: relative;
}

body:not(.dark-mode) .theme-toggle {
  background: rgba(0, 0, 0, 0.04);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(-8deg);
}

body:not(.dark-mode) .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
}

.theme-icon-moon, .theme-icon-sun {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease-soft);
}

.theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.theme-icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

body:not(.dark-mode) .theme-icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

body:not(.dark-mode) .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px var(--primary-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.btn-outline:hover {
  background: var(--glass-bg-strong);
  border-color: var(--glass-border-hover);
}

.btn-ghost {
  color: var(--text-dim);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.25s var(--ease-soft);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover {
  color: var(--text);
  background: var(--glass-bg);
}

/* ---------- Hero ---------- */
.hero {
  padding: 180px 24px 120px;
  text-align: center;
  position: relative;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-glow);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 32px;
  backdrop-filter: blur(12px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(44px, 8vw, 88px);
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 48px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.stat {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.stat-num {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.features-grid .glass-card {
  padding: 32px;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.card-icon svg { width: 24px; height: 24px; }

.card-icon-blue { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-glow); }
.card-icon-purple { color: var(--accent-purple); background: rgba(191, 90, 242, 0.12); border-color: rgba(191, 90, 242, 0.25); }
.card-icon-pink { color: var(--accent-pink); background: rgba(255, 55, 95, 0.12); border-color: rgba(255, 55, 95, 0.25); }
.card-icon-green { color: var(--accent-green); background: rgba(48, 209, 88, 0.12); border-color: rgba(48, 209, 88, 0.25); }
.card-icon-orange { color: var(--accent-orange); background: rgba(255, 159, 10, 0.12); border-color: rgba(255, 159, 10, 0.25); }
.card-icon-cyan { color: var(--accent-cyan); background: rgba(100, 210, 255, 0.12); border-color: rgba(100, 210, 255, 0.25); }

.card-title {
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Chat (Demo) ---------- */
.chat-panel {
  max-width: 900px;
  margin: 0 auto;
}

.chat-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.chat-avatar svg { width: 20px; height: 20px; }

.chat-name { font-weight: 600; font-size: 15px; }
.chat-status {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
}

.chat-settings {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-mode-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.mode-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--text-dim);
  transition: all 0.25s var(--ease-soft);
}
.mode-btn-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.chat-api-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-api-input input,
.chat-api-input select {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s;
}
.chat-api-input input:focus,
.chat-api-input select:focus {
  border-color: var(--primary);
}
.chat-api-input input::placeholder { color: var(--text-muted); }
.chat-api-input select option { background: var(--bg); color: var(--text); }

.chat-messages {
  padding: 32px 24px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border-hover) transparent;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--glass-border-hover); border-radius: 999px; }

.msg { display: flex; max-width: 80%; }
.msg-ai { align-self: flex-start; }
.msg-user { align-self: flex-end; }

.msg-bubble {
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.6;
}

.msg-ai .msg-bubble {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(12px);
}

.msg-user .msg-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.msg-error .msg-bubble {
  background: rgba(255, 55, 95, 0.1);
  border: 1px solid rgba(255, 55, 95, 0.3);
  color: var(--accent-pink);
}

.msg-typing .msg-bubble { color: var(--text-dim); }
.msg-typing .typing-dots { display: inline-flex; gap: 4px; }
.msg-typing .typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim);
  animation: bounce 1.4s infinite ease-in-out;
}
.msg-typing .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.suggestion-chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 13px;
  transition: all 0.25s var(--ease-soft);
}
.suggestion-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary-glow);
  color: var(--primary);
  transform: translateY(-1px);
}

.chat-input-area {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--glass-border);
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 12px 12px 20px;
  border-radius: var(--radius-md);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: none;
  line-height: 1.5;
  min-height: 24px;
  max-height: 200px;
  padding: 6px 0;
}
#chat-input::placeholder { color: var(--text-muted); }

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-soft);
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}
.send-btn svg { width: 18px; height: 18px; }
.send-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--primary-glow); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Capability Matrix ---------- */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cap-card {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 12px 16px;
  align-items: center;
}

.cap-label {
  font-size: 16px;
  font-weight: 500;
  grid-column: 1 / 2;
}

.cap-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  grid-column: 2 / 3;
  justify-self: end;
}

.cap-bar {
  grid-column: 1 / 3;
  height: 6px;
  border-radius: 999px;
  background: var(--glass-bg);
  overflow: hidden;
}

.cap-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent-purple));
  box-shadow: 0 0 12px var(--primary-glow);
  transition: width 1.6s var(--ease);
}

/* ---------- Models Table ---------- */
.models-table-wrapper {
  padding: 12px;
  overflow-x: auto;
}

.models-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.models-table th,
.models-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
}

.models-table th {
  font-weight: 600;
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
}

.models-table tr:last-child td { border-bottom: none; }

.models-table tr {
  transition: background-color 0.2s var(--ease-soft);
}

.models-table tbody tr:hover td {
  background: var(--glass-bg);
}

.models-table td strong {
  font-size: 15px;
  font-weight: 600;
}

.model-tag {
  display: inline-block;
  padding: 3px 10px;
  margin-top: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
}

.model-tag.tag-blue {
  background: var(--primary-soft);
  border-color: var(--primary-glow);
  color: var(--primary);
}
.model-tag.tag-purple {
  background: rgba(191, 90, 242, 0.12);
  border-color: rgba(191, 90, 242, 0.25);
  color: var(--accent-purple);
}
.model-tag.tag-green {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.25);
  color: var(--accent-green);
}
.model-tag.tag-orange {
  background: rgba(255, 159, 10, 0.12);
  border-color: rgba(255, 159, 10, 0.25);
  color: var(--accent-orange);
}
.model-tag.tag-cyan {
  background: rgba(100, 210, 255, 0.12);
  border-color: rgba(100, 210, 255, 0.25);
  color: var(--accent-cyan);
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  padding: 36px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.price-featured {
  background: linear-gradient(180deg, var(--primary-soft), var(--glass-bg));
  border-color: var(--primary-glow);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body:not(.dark-mode) .price-featured {
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0.9));
}

.price-featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--primary-glow);
  letter-spacing: 0.02em;
}

.price-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.price-amount {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1;
}

.price-currency {
  font-size: 28px;
  color: var(--text-dim);
  margin-right: 4px;
}

.price-custom {
  font-size: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-period {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.price-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 28px;
}

.price-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  flex: 1;
}

.price-features li {
  font-size: 15px;
  color: var(--text);
  padding-left: 28px;
  position: relative;
  line-height: 1.5;
}

.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 0 8px var(--primary-glow);
}

.price-features li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 8px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 22px 28px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: color 0.25s var(--ease-soft);
}
.faq-question:hover { color: var(--primary); }

.faq-toggle {
  font-size: 28px;
  font-weight: 300;
  color: var(--text-dim);
  transition: transform 0.35s var(--ease), color 0.25s var(--ease-soft);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  padding: 0 28px;
  transition: max-height 0.45s var(--ease), padding 0.45s var(--ease);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 28px 24px;
}

/* ---------- CTA ---------- */
.cta-panel {
  padding: 80px 40px;
  text-align: center;
  background:
    linear-gradient(180deg, var(--primary-soft), rgba(191, 90, 242, 0.08)),
    var(--glass-bg);
}

body:not(.dark-mode) .cta-panel {
  background:
    linear-gradient(180deg, rgba(0, 113, 227, 0.06), rgba(191, 90, 242, 0.04)),
    rgba(255, 255, 255, 0.8);
}

.cta-title {
  font-size: clamp(30px, 4.5vw, 52px);
  margin-bottom: 20px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 40px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 24px 40px;
  border-top: 1px solid var(--glass-border);
  margin-top: 80px;
  background: linear-gradient(180deg, transparent, var(--glass-bg));
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 3fr;
  gap: 48px;
}

.footer-brand { max-width: 320px; }

.footer-slogan {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-col ul li a:hover { color: var(--primary); }

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .price-featured { transform: none; }
  .capability-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .glass-nav { padding: 8px 14px; top: 10px; }
  .nav-links { display: none; }
  .hero { padding: 140px 16px 80px; }
  .hero-stats { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 70px 16px; }
  .section-header { margin-bottom: 44px; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid .glass-card { padding: 24px; }
  .chat-header { padding: 16px 18px; }
  .chat-api-input { width: 100%; }
  .chat-messages { padding: 24px 18px; }
  .chat-input-area { padding: 16px 18px 18px; }
  .cap-card { padding: 20px 22px; }
  .cta-panel { padding: 56px 24px; }
  .footer { padding: 56px 16px 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .models-table th, .models-table td { padding: 14px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero-title { font-size: 40px; }
  .price-amount { font-size: 48px; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .aurora-glow { animation: none; }
  .gradient-text { animation: none; }
}

/* ============================================================
   Markdown 渲染（WOAIL 官方风格）
   ============================================================ */
.msg-bubble .md-p {
  margin: 0 0 0.6em;
  line-height: 1.7;
}
.msg-bubble .md-p:last-child { margin-bottom: 0; }

.msg-bubble .md-h1,
.msg-bubble .md-h2,
.msg-bubble .md-h3,
.msg-bubble .md-h4,
.msg-bubble .md-h5,
.msg-bubble .md-h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0.4em 0 0.5em;
}
.msg-bubble .md-h1 { font-size: 1.45rem; }
.msg-bubble .md-h2 { font-size: 1.25rem; }
.msg-bubble .md-h3 { font-size: 1.1rem; }
.msg-bubble .md-h4 { font-size: 1.02rem; }
.msg-bubble .md-h5,
.msg-bubble .md-h6 { font-size: 0.98rem; opacity: 0.95; }

.msg-bubble .md-hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 1em 0;
}

.msg-bubble .md-list {
  margin: 0.4em 0 0.8em 1.3em;
  padding: 0;
  line-height: 1.7;
}
.msg-bubble .md-list li {
  margin: 0.18em 0;
}
.msg-bubble .md-ol { list-style-type: decimal; }
.msg-bubble ul.md-list { list-style-type: disc; }

.msg-bubble .md-quote {
  margin: 0.6em 0;
  padding: 0.35em 0.8em;
  border-left: 3px solid var(--primary);
  background: rgba(41, 151, 255, 0.06);
  color: var(--text-dim);
  font-style: normal;
  border-radius: 0 10px 10px 0;
}

.msg-bubble strong { font-weight: 700; color: var(--text); }
.msg-bubble em { font-style: italic; }
.msg-bubble del { opacity: 0.55; text-decoration: line-through; }

.msg-bubble a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed rgba(41, 151, 255, 0.4);
  transition: color 0.2s;
}
.msg-bubble a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

/* 行内代码 */
.msg-bubble .inline-code {
  display: inline-block;
  padding: 0.1em 0.45em;
  margin: 0 0.15em;
  background: rgba(127, 127, 127, 0.15);
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 6px;
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
}

/* 代码块 */
.msg-bubble .md-code-block {
  position: relative;
  margin: 0.8em 0;
  padding: 14px 16px 14px 16px;
  background: #111216;
  color: #e7e9ee;
  border-radius: 12px;
  border: 1px solid rgba(127, 127, 127, 0.2);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  white-space: pre;
}
.msg-bubble .md-code-block code {
  display: block;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  border: none;
}
.msg-bubble .md-code-block::before {
  /* 简单"圆点"装饰 */
  content: "";
  display: block;
  height: 8px;
  margin-bottom: 8px;
  background:
    radial-gradient(circle at 4px 4px, #ff5f56 3px, transparent 3.5px),
    radial-gradient(circle at 20px 4px, #ffbd2e 3px, transparent 3.5px),
    radial-gradient(circle at 36px 4px, #27c93f 3px, transparent 3.5px);
  background-repeat: no-repeat;
}

/* 表格 */
.msg-bubble .md-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.8em 0;
  font-size: 0.92em;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.msg-bubble .md-table th,
.msg-bubble .md-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
}
.msg-bubble .md-table th {
  background: rgba(127, 127, 127, 0.1);
  font-weight: 600;
}
.msg-bubble .md-table tr:last-child td { border-bottom: none; }

/* 浅色模式下代码块也保持深色风格（更易读） */
body:not(.dark-mode) .msg-bubble .md-code-block {
  background: #0f1115;
  color: #e7e9ee;
  border-color: rgba(0, 0, 0, 0.15);
}
