/* ============================================================
   JoyCast - Main Stylesheet
   ============================================================ */

/* CSS Variables */
:root {
  --bg-primary: #0b1320;
  --bg-secondary: #111c2e;
  --bg-card: #15233a;
  --border: #29405f;
  --text-primary: #f8fbff;
  --text-secondary: #95a8c3;
  --accent: #2f80ed;
  --accent-2: #00b2ff;
  --accent-alt: #156bd6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.25s ease;
  --nav-height: 64px;
  --sidebar-width: 240px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% -10%, rgba(47, 128, 237, 0.24), transparent 42%),
    radial-gradient(circle at 85% 0%, rgba(0, 178, 255, 0.15), transparent 36%);
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(41, 64, 95, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 64, 95, 0.22) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, black 45%, transparent 90%);
  opacity: 0.32;
  z-index: -1;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #8fa4f3; }
ul { list-style: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: var(--font-sans); }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(11, 19, 32, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(42, 48, 80, 0.6);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(145deg, rgba(47,128,237,0.2), rgba(0,178,255,0.18));
  border: 1px solid rgba(47, 128, 237, 0.4);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.12);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  background: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 4px;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.mobile-menu a:hover { color: var(--text-primary); background: rgba(102,126,234,0.12); }
.mobile-menu-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-xl { padding: 16px 40px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(102,126,234,0.5);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(102,126,234,0.12);
  transform: translateY(-1px);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #059669; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 78vh;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 84px) 24px 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(102,126,234,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 60%, rgba(118,75,162,0.12) 0%, transparent 60%),
              var(--bg-primary);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(42,48,80,0.3) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(42,48,80,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}
.hero-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.65rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: 0;
  max-width: 1060px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 520px;
}
.hero-subtitle {
  font-size: 1.06rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 880px;
}
.hero-content .hero-actions {
  margin-top: 10px;
}
.hero-sub-secondary {
  margin-bottom: 32px;
}
.hero-preview-img {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.hero-stats > div {
  min-width: 100px;
}
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label { font-size: 0.82rem; color: var(--text-secondary); }
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-device {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(102,126,234,0.15);
}
.hero-device-bar {
  background: var(--bg-secondary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.hero-device-dots { display: flex; gap: 6px; }
.hero-device-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }
.hero-device-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.hero-screen {
  padding: 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.hero-screen-title { font-weight: 700; font-size: 0.9rem; }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
  animation: pulse 2s ease-in-out infinite;
}
.hero-metric-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hero-metric {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.hero-metric-val { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.hero-metric-lbl { font-size: 0.7rem; color: var(--text-secondary); }
.hero-waveform {
  height: 48px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 16px;
  overflow: hidden;
}
.waveform-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}

/* ============================================================
   SECTIONS & LAYOUT
   ============================================================ */
.section {
  padding: 96px 24px;
}
.section-alt { background: var(--bg-secondary); }
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  box-shadow: 0 16px 30px rgba(4, 13, 24, 0.24);
}
.card:hover {
  border-color: rgba(102,126,234,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-4px);
}
.card-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card-text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.feature-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 16px 30px rgba(4, 13, 24, 0.24);
}
.feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: 12px;
}
.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 10px;
}
.feature-list {
  display: grid;
  gap: 10px;
  color: var(--text-primary);
  line-height: 1.55;
}
.feature-list.muted {
  color: var(--text-secondary);
}

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.pricing-card:hover {
  border-color: rgba(102,126,234,0.5);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.pricing-card.featured {
  background: linear-gradient(160deg, rgba(102,126,234,0.12) 0%, rgba(118,75,162,0.12) 100%);
  border-color: rgba(102,126,234,0.6);
  box-shadow: 0 0 0 1px rgba(102,126,234,0.3), 0 20px 60px rgba(102,126,234,0.2);
}
.pricing-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.pricing-card > p {
  color: var(--text-secondary);
  min-height: 3.2em;
}
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 14px;
}
.price span {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}
.pricing-card .feature-list {
  margin-bottom: 18px;
}
.pricing-action {
  margin-top: auto;
}

html:lang(zh-CN) .hero h1,
html:lang(zh) .hero h1 {
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  line-height: 1.18;
  max-width: 920px;
}
html:lang(zh-CN) .hero-subtitle,
html:lang(zh) .hero-subtitle {
  max-width: 920px;
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pricing-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.pricing-price sup { font-size: 1rem; vertical-align: super; margin-right: 2px; }
.pricing-period { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 20px; }
.pricing-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.pricing-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.pricing-feature.included { color: var(--text-primary); }
.pricing-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  margin-top: 1px;
}
.check-yes { background: rgba(16,185,129,0.2); color: var(--success); }
.check-no { background: rgba(255,255,255,0.05); color: var(--border); }

/* Billing toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}
.billing-option { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.billing-option.active { color: var(--text-primary); font-weight: 600; }
.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
input:checked + .toggle-slider { background: var(--accent); }
input:checked + .toggle-slider::before { transform: translateX(22px); }
.discount-badge {
  background: rgba(16,185,129,0.2);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.comparison-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.comparison-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.comparison-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.comparison-table tr:hover td { background: rgba(102,126,234,0.04); }
.comparison-table td:first-child { color: var(--text-secondary); }
.comparison-table .check-yes-icon { color: var(--success); font-size: 1rem; }
.comparison-table .check-no-icon { color: var(--border); }
.comparison-table .feature-category td {
  background: var(--bg-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 8px 20px;
}
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 16px;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.form-input::placeholder { color: var(--text-secondary); }
.form-input.error { border-color: var(--danger); }
.form-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 16px;
  font-size: 0.92rem;
  appearance: none;
  cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--accent); }
.form-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 16px;
  font-size: 0.92rem;
  resize: vertical;
  min-height: 120px;
  transition: border-color var(--transition);
}
.form-textarea:focus { outline: none; border-color: var(--accent); }
.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-help { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}
.form-check-label { font-size: 0.88rem; color: var(--text-secondary); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ============================================================
   TOAST / NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.3s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--accent); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.toast-msg { font-size: 0.82rem; color: var(--text-secondary); }
.toast-close { background: none; color: var(--text-secondary); padding: 0; font-size: 1rem; }
.toast-close:hover { color: var(--text-primary); }
.toast.removing { animation: toastOut 0.25s ease forwards; }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  gap: 16px;
  transition: background var(--transition);
}
.faq-question:hover { background: rgba(255,255,255,0.02); }
.faq-icon {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.download-card:hover {
  border-color: rgba(102,126,234,0.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.download-card-muted {
  opacity: 0.72;
}
.download-card-muted:hover {
  transform: none;
  box-shadow: none;
}
.download-card-body {
  flex: 1;
}
.download-card-action {
  margin-top: auto;
  padding-top: 18px;
}
.download-icon { font-size: 2.5rem; margin-bottom: 12px; }
.download-platform { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.download-version { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 16px; }
.download-req { font-size: 0.78rem; color: var(--text-secondary); margin-top: 10px; line-height: 1.5; }
.btn-disabled {
  opacity: 0.62;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(47,128,237,0.2) 0%, transparent 60%),
              var(--bg-primary);
}
.auth-card {
  background: linear-gradient(180deg, rgba(21,35,58,0.92), rgba(13,24,41,0.92));
  border: 1px solid rgba(72, 122, 176, 0.45);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.02) inset;
  backdrop-filter: blur(8px);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo-mark {
  width: 52px; height: 52px;
  background: linear-gradient(145deg, rgba(47,128,237,0.24), rgba(0,178,255,0.16));
  border: 1px solid rgba(47, 128, 237, 0.4);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.auth-logo-mark img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-sub { color: var(--text-secondary); font-size: 0.88rem; text-align: center; margin-bottom: 32px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; border-top: 1px solid var(--border);
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
  padding: 20px 12px;
}
.sidebar-section { margin-bottom: 28px; }
.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
}
.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}
.sidebar-link.active {
  color: var(--accent);
  background: rgba(102,126,234,0.12);
}
.sidebar-link .icon { font-size: 1rem; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
}
.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 36px;
  min-width: 0;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dashboard-title { font-size: 1.4rem; font-weight: 800; }
.dashboard-sub { color: var(--text-secondary); font-size: 0.88rem; margin-top: 2px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.stat-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-trend { font-size: 0.78rem; margin-top: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s ease;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  padding: 20px 12px;
  overflow-y: auto;
  z-index: 100;
}
.admin-sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-weight: 700; font-size: 1rem;
}
.admin-logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.admin-logo-mark img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 28px 36px;
  min-width: 0;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.admin-title { font-size: 1.25rem; font-weight: 700; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-secondary); }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table td { color: var(--text-secondary); }
.data-table td.primary { color: var(--text-primary); font-weight: 500; }
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-head-title { font-weight: 700; font-size: 0.95rem; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.pagination-btns { display: flex; gap: 6px; }
.pagination-btn {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.pagination-btn:hover { border-color: var(--accent); color: var(--accent); }
.pagination-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(102,126,234,0.15); color: var(--accent); }
.badge-gray { background: rgba(255,255,255,0.07); color: var(--text-secondary); }

/* ============================================================
   AD UNIT
   ============================================================ */
.ad-unit {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ============================================================
   STEPS / WORKFLOW
   ============================================================ */
.steps-list { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}
.step:last-child { padding-bottom: 0; }
.step-num-wrap { display: flex; flex-direction: column; align-items: center; }
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
  flex-shrink: 0;
}
.step-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, rgba(102,126,234,0.5), rgba(102,126,234,0.05));
  margin-top: 8px;
}
.step-content { padding-top: 8px; }
.step-title { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.step-text { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.footer-brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(145deg, rgba(47,128,237,0.24), rgba(0,178,255,0.16));
  border: 1px solid rgba(47, 128, 237, 0.4);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.footer-brand-mark img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-secondary); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--text-primary); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-height) + 64px) 24px 72px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(102,126,234,0.15) 0%, transparent 60%),
              var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(42,48,80,0.2) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(42,48,80,0.2) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent);
}
.page-hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ============================================================
   SCENARIOS / USE CASES
   ============================================================ */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.scenario-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}
.scenario-card:hover::before { opacity: 1; }
.scenario-card:hover {
  border-color: rgba(102,126,234,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.scenario-emoji { font-size: 2rem; margin-bottom: 12px; }
.scenario-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.scenario-text { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.6; }

/* ============================================================
   POLICY PAGES
   ============================================================ */
.policy-page {
  padding-top: var(--nav-height);
}
.policy-hero {
  padding: 60px 24px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.policy-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.policy-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text-primary);
}
.policy-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text-primary);
}
.policy-content p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 14px;
}
.policy-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}
.policy-content ul li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 6px;
}
.policy-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm {
  width: 18px; height: 18px;
  border-width: 2px;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.loading-text { color: var(--text-secondary); font-size: 0.88rem; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.grid { display: grid; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.hidden { display: none !important; }
.visible { display: block !important; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.border { border: 1px solid var(--border); }
.overflow-hidden { overflow: hidden; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.highlight-card {
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
  border: 1px solid rgba(102,126,234,0.3);
}
.glow {
  box-shadow: 0 0 40px rgba(102,126,234,0.25);
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-input {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 14px 9px 38px;
  font-size: 0.88rem;
  width: 260px;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238892a4' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.search-input:focus { outline: none; border-color: var(--accent); width: 300px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
@keyframes wave {
  0%, 100% { height: 12px; }
  50% { height: 38px; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); pointer-events: none; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-slide-left { animation: slideInLeft 0.5s ease both; }
.animate-float { animation: float 4s ease-in-out infinite; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }

/* Waveform delays */
.waveform-bar:nth-child(1) { animation-delay: 0s; height: 16px; }
.waveform-bar:nth-child(2) { animation-delay: 0.15s; height: 28px; }
.waveform-bar:nth-child(3) { animation-delay: 0.3s; height: 20px; }
.waveform-bar:nth-child(4) { animation-delay: 0.45s; height: 36px; }
.waveform-bar:nth-child(5) { animation-delay: 0.6s; height: 24px; }
.waveform-bar:nth-child(6) { animation-delay: 0.75s; height: 40px; }
.waveform-bar:nth-child(7) { animation-delay: 0.9s; height: 20px; }
.waveform-bar:nth-child(8) { animation-delay: 1.05s; height: 32px; }
.waveform-bar:nth-child(9) { animation-delay: 1.2s; height: 16px; }
.waveform-bar:nth-child(10) { animation-delay: 1.35s; height: 26px; }

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .hero { min-height: auto; padding: calc(var(--nav-height) + 40px) 20px 60px; text-align: center; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-subtitle { font-size: 0.98rem; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; gap: 24px; }
  .section { padding: 64px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .pricing-card { padding: 28px 22px; }
  .pricing-card > p { min-height: 0; }
  .feature-grid, .feature-grid-2, .feature-grid-3 { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
  .auth-card { padding: 32px 24px; }
  .sidebar { display: none; }
  .sidebar.mobile-open { display: block; width: 100%; position: fixed; top: var(--nav-height); right: 0; left: 0; bottom: 0; z-index: 500; }
  .dashboard-main { margin-left: 0; padding: 20px; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 32px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .table-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .section-title { font-size: 1.6rem; }
  .pricing-price { font-size: 2rem; }
  .btn-xl { padding: 13px 28px; font-size: 0.95rem; }
  .modal { padding: 24px 20px; }
}
