/* ═══════════════════════════════════════════════════════
   OKAK-BOT  •  Web Interface v3  •  "Cosmic Shield"
   Modern VPN Service Design System
   ═══════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ──────────────────────────────── */
:root {
  /* Brand */
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --brand-glow: 0 0 30px rgba(99, 102, 241, 0.3);

  /* Surfaces */
  --bg-base: #f0f2f5;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #f4f6f9;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-nav: rgba(255, 255, 255, 0.92);
  --bg-bottom-nav: rgba(255, 255, 255, 0.95);

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;

  /* Palette */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --primary-glow: rgba(99, 102, 241, 0.15);

  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #3b82f6;
  --info-light: #eff6ff;

  /* Borders & Shadows */
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Sizing */
  --nav-h: 56px;
  --bottom-nav-h: 68px;
  --container-max: 720px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Font */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  
  /* ====== Backward-compatible aliases (old templates) ====== */
  --dark: var(--text-primary);
  --text: var(--text-primary);
  --text-light: var(--text-secondary);
  --muted: var(--text-muted);
  --light: var(--bg-input);
  --bg: var(--bg-base);
  --primary-dark: var(--primary-hover);
  --success-dark: #059669;
  --err: var(--danger);
  --bar: var(--primary);
  --barbg: var(--bg-input);
}

/* ── Dark Mode ─────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #0c0f1a;
    --bg-card: #151929;
    --bg-elevated: #1c2137;
    --bg-input: #1a1f35;
    --bg-glass: rgba(21, 25, 41, 0.8);
    --bg-nav: rgba(12, 15, 26, 0.92);
    --bg-bottom-nav: rgba(12, 15, 26, 0.96);

    --text-primary: #eef0f6;
    --text-secondary: #8b92a8;
    --text-muted: #5c6278;

    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(99, 102, 241, 0.12);
    --primary-glow: rgba(129, 140, 248, 0.2);

    --success-light: rgba(16, 185, 129, 0.1);
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger-light: rgba(239, 68, 68, 0.1);
    --info-light: rgba(59, 130, 246, 0.1);

    --border: #252a40;
    --border-light: #1e2338;
  
    /* ====== Backward-compatible aliases (dark mode) ====== */
    --dark: var(--text-primary);
    --text: var(--text-primary);
    --text-light: var(--text-secondary);
    --muted: var(--text-muted);
    --light: var(--bg-input);
    --bg: var(--bg-base);
    --primary-dark: var(--primary-hover);
    --success-dark: #34d399;
    --err: var(--danger);
    --bar: var(--primary);
    --barbg: var(--bg-input);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  }
}

/* ── 2. Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
}
a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── 3. Layout ─────────────────────────────────────── */
.web-container { max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }
.web-main { padding-top: calc(var(--nav-h) + 16px); padding-bottom: 24px; min-height: 80vh; }

/* ── 4. Top Navigation ────────────────────────────── */
.web-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-normal);
}
.web-nav .web-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: 960px;
}
.nav-brand a {
  font-size: 18px; font-weight: 800; color: var(--text-primary);
  background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.nav-menu a:hover { background: var(--primary-light); color: var(--primary); }
.nav-button {
  background: var(--brand-gradient) !important;
  color: var(--text-inverse) !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--shadow-glow);
}
.nav-button:hover { transform: translateY(-1px); box-shadow: var(--brand-glow); }

.nav-user-menu {
  display: flex; align-items: center; gap: 8px; margin-left: 8px;
}
.nav-user-name {
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}
.nav-logout-btn {
  font-size: 12px !important; padding: 4px 10px !important;
  background: var(--danger-light) !important; color: var(--danger) !important;
  border-radius: var(--radius-full) !important;
}

/* Burger */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  padding: 10px; background: none; border: none; z-index: 1001;
}
.nav-burger span {
  width: 22px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all 0.3s var(--ease-out);
}
.nav-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
  z-index: 999;
}
.nav-overlay.active { display: block; }

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-menu {
    position: fixed; top: 0; left: -100%; width: 280px; height: 100dvh;
    background: var(--bg-card); padding: 80px 16px 24px;
    flex-direction: column; align-items: stretch; gap: 2px;
    transition: left 0.3s var(--ease-out); z-index: 1000;
    box-shadow: var(--shadow-xl);
  }
  .nav-menu.active { left: 0; }
  .nav-menu a { padding: 14px 16px; border-radius: var(--radius-sm); }
  .nav-user-menu { flex-direction: column; align-items: flex-start; padding: 16px 0; margin-left: 0; }
}

/* ── 5. Bottom Navigation ──────────────────────────── */
.web-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: var(--bg-bottom-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.web-bottom-nav__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--text-muted);
  font-size: 11px; font-weight: 500;
  transition: all var(--duration-fast);
  position: relative;
}
.web-bottom-nav__item::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--primary); transition: width 0.3s var(--ease-out);
}
.web-bottom-nav__item.is-active { color: var(--primary); }
.web-bottom-nav__item.is-active::before { width: 32px; }
.web-bottom-nav__icon { font-size: 22px; line-height: 1; transition: transform 0.2s var(--ease-spring); }
.web-bottom-nav__item.is-active .web-bottom-nav__icon { transform: scale(1.15); }
.web-bottom-nav__label { letter-spacing: 0.2px; }

/* ── 6. Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; line-height: 1.4;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: var(--brand-gradient); color: white;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4); }
.btn-secondary {
  background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border-light); border-color: var(--primary); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-pill { border-radius: var(--radius-full); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── 7. Cards ──────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.card-interactive:hover {
  transform: translateY(-3px); border-color: var(--primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 16px; font-weight: 700; }

/* ── 8. Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input); color: var(--text-primary);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all var(--duration-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Toggle Switch */
.toggle {
  position: relative; display: inline-flex; align-items: center;
  width: 44px; height: 24px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border); border-radius: var(--radius-full);
  transition: background var(--duration-fast);
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: white;
  border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform var(--duration-fast) var(--ease-spring);
}
.toggle input:checked ~ .toggle-track { background: var(--primary); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* ── 9. Alerts ─────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  animation: slideDown 0.3s var(--ease-out);
}
.alert-success { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.alert-danger, .alert-error { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }
.alert-info { background: var(--info-light); color: var(--info); border-left: 3px solid var(--info); }

/* ── 10. Toast Notifications ──────────────────────── */
.toast-container {
  position: fixed; top: calc(var(--nav-h) + 12px); right: 16px;
  z-index: 10000; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: 360px;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto; animation: toastIn 0.4s var(--ease-out);
  backdrop-filter: blur(12px);
}
.toast.toast-out { animation: toastOut 0.3s var(--ease-out) forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { flex: 1; color: var(--text-primary); line-height: 1.4; }

/* ── 11. Badges ────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-lg { padding: 6px 16px; font-size: 14px; font-weight: 700; }

/* ── 12. Hero Section ──────────────────────────────── */
.hero {
  text-align: center; padding: 48px 20px 40px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 60%);
  animation: heroGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero-shield {
  font-size: 56px; margin-bottom: 16px;
  display: inline-block; animation: float 3s ease-in-out infinite;
}
.hero h1 {
  font-size: 32px; font-weight: 800; line-height: 1.2;
  margin-bottom: 12px; letter-spacing: -0.5px;
}
.hero h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 16px; color: var(--text-secondary);
  max-width: 440px; margin: 0 auto 28px; line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── 13. Features ──────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin: 32px 0;
}
.feature-card {
  text-align: center; padding: 24px 16px;
}
.feature-card .card { height: 100%; }
.feature-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ── 14. Plans / Pricing ──────────────────────────── */
.plans-page { max-width: 700px; margin: 0 auto; }
.page-header { text-align: center; margin-bottom: 28px; }
.page-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
.page-header .page-subtitle { color: var(--text-secondary); font-size: 15px; }

.category-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700;
}
.category-badge--mobile { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.category-badge--computer { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.category-badge--router { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.category-badge--commercial { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.category-section { margin-bottom: 32px; }
.category-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.category-section-header h3 { font-size: 18px; font-weight: 700; margin: 0; }
.category-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 14px; }

.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.plan-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 14px; background: var(--bg-card);
  border-radius: var(--radius-lg); border: 1.5px solid var(--border);
  text-decoration: none; color: var(--text-primary);
  text-align: center; box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative; overflow: hidden;
}
.plan-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--brand-gradient);
  transform: scaleX(0); transition: transform 0.3s var(--ease-out);
}
.plan-card:hover::before { transform: scaleX(1); }
.plan-card:hover {
  transform: translateY(-4px); border-color: var(--primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.plan-card--featured { border-color: var(--success); }
.plan-card--featured::before { background: linear-gradient(90deg, var(--success), #34d399); transform: scaleX(1); }
.plan-card__months { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.plan-card__label { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.plan-card__price { font-size: 22px; font-weight: 700; color: var(--success); }
.plan-card__per-month { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── 15. Key Cards ─────────────────────────────────── */
.key-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
  transition: all var(--duration-normal);
}
.key-card:hover { box-shadow: var(--shadow-md); }
.key-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.key-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
}
.key-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.key-status--active .key-status-dot { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.key-status--expired .key-status-dot { background: var(--danger); }
.key-body { padding: 16px 20px; }
.key-actions {
  display: flex; gap: 8px; padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

/* ── 16. FAQ ───────────────────────────────────────── */
.faq-section {
  margin-top: 36px; padding: 24px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.faq-section h2 { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.faq-grid { display: grid; gap: 12px; }
.faq-item {
  padding: 14px 16px; background: var(--bg-input);
  border-radius: var(--radius-sm); border-left: 3px solid var(--primary);
}
.faq-item h4 { font-size: 14px; margin-bottom: 4px; color: var(--primary); font-weight: 600; }
.faq-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* Collapsible FAQ */
.faq-details { border-radius: var(--radius-sm); overflow: hidden; }
.faq-details summary {
  padding: 14px 16px; background: var(--bg-input);
  font-weight: 600; font-size: 14px; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  transition: background var(--duration-fast);
}
.faq-details summary::-webkit-details-marker { display: none; }
.faq-details summary::after { content: '+'; font-size: 18px; color: var(--primary); transition: transform 0.2s; }
.faq-details[open] summary::after { content: '−'; }
.faq-details[open] summary { background: var(--primary-light); color: var(--primary); }
.faq-details .faq-answer {
  padding: 12px 16px; font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  background: var(--bg-card); border-top: 1px solid var(--border-light);
  animation: slideDown 0.2s var(--ease-out);
}

/* ── 17. Footer ────────────────────────────────────── */
.web-footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 40px 0 calc(var(--bottom-nav-h) + 20px); margin-top: 40px;
}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.footer-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-section p, .footer-section a {
  font-size: 13px; color: var(--text-secondary); display: block; line-height: 1.6;
}
.footer-section a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center; margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 12px; color: var(--text-muted);
}

/* ── 18. Sections ──────────────────────────────────── */
.section-header {
  text-align: center; margin-bottom: 32px;
}
.section-header h2 {
  font-size: 24px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px;
}
.section-header p { color: var(--text-secondary); font-size: 15px; }

/* ── 19. Plans Preview (Home) ────────────────────── */
.plans-preview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin: 24px 0;
}
.plan-preview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative; overflow: hidden;
}
.plan-preview-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.plan-preview-card .plan-icon { font-size: 40px; margin-bottom: 12px; }
.plan-preview-card .plan-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.plan-preview-card .plan-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.plan-preview-card .plan-price-from {
  font-size: 20px; font-weight: 800; color: var(--primary);
}
.plan-preview-card .plan-price-period { font-size: 12px; color: var(--text-muted); }

/* ── 20. Purchase Page ─────────────────────────────── */
.purchase-hero {
  text-align: center; padding: 24px; margin-bottom: 20px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.purchase-hero .plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.purchase-hero .plan-total {
  font-size: 32px; font-weight: 800; color: var(--primary);
}
.payment-methods { display: grid; gap: 12px; margin: 20px 0; }
.payment-method {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--duration-fast);
}
.payment-method:hover, .payment-method.selected {
  border-color: var(--primary); background: var(--primary-light);
}
.payment-method-icon { font-size: 28px; }
.payment-method-name { font-weight: 600; }

/* ── 21. Instructions Page ────────────────────────── */
.platform-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px;
  background: var(--bg-input); border-radius: var(--radius-full);
  margin-bottom: 24px; -webkit-overflow-scrolling: touch;
}
.platform-tab {
  flex: none; padding: 10px 18px; border: none;
  background: transparent; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: all var(--duration-fast);
}
.platform-tab.active {
  background: var(--bg-card); color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.app-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 12px; transition: all var(--duration-fast);
}
.app-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.app-icon { font-size: 36px; flex-shrink: 0; }
.app-info { flex: 1; }
.app-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.app-desc { font-size: 13px; color: var(--text-secondary); }

/* ── 22. Support Page ──────────────────────────────── */
.support-options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin: 24px 0;
}
.support-card {
  text-align: center; padding: 24px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-decoration: none;
  color: var(--text-primary);
  transition: all var(--duration-normal) var(--ease-out);
}
.support-card:hover {
  transform: translateY(-3px); border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.support-card-icon { font-size: 40px; margin-bottom: 12px; display: block; }
.support-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.support-card-desc { font-size: 13px; color: var(--text-secondary); }

/* ── 23. History Page ──────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── 24. Cabinet ───────────────────────────────────── */
.cabinet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.cabinet-header h1 { font-size: 22px; font-weight: 800; }
.cabinet-nav {
  display: flex; gap: 4px; background: var(--bg-input);
  border-radius: var(--radius-full); padding: 4px;
  margin-bottom: 24px; overflow-x: auto;
}
.cabinet-nav a {
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap; transition: all var(--duration-fast);
}
.cabinet-nav a.active {
  background: var(--bg-card); color: var(--primary); box-shadow: var(--shadow-xs);
}

/* ── 25. Protocol Warning ──────────────────────────── */
.protocol-warning {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--brand-gradient); color: white;
  padding: 10px 20px; text-align: center; z-index: 99999;
  font-size: 13px; display: none; box-shadow: var(--shadow-md);
}
.protocol-warning.show { display: block; }
.protocol-warning strong { font-weight: 700; }
.protocol-warning a { color: #fff; text-decoration: underline; font-weight: 600; }
body.has-warning { padding-top: 46px; }

/* ── 26. Login Page ────────────────────────────────── */
.login-card {
  max-width: 400px; margin: 60px auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px 32px;
  text-align: center; box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.login-card p { color: var(--text-secondary); margin-bottom: 24px; }
.login-telegram-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; background: #2AABEE; color: white;
  border: none; border-radius: var(--radius-full);
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all var(--duration-fast);
  box-shadow: 0 4px 15px rgba(42, 171, 238, 0.3);
}
.login-telegram-btn:hover { background: #229ED9; transform: translateY(-2px); }

/* ── 27. Empty States ──────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.6; }
.empty-state-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state-desc { font-size: 14px; margin-bottom: 20px; }

/* ── 28. Skeleton Loading ──────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-light) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; margin-bottom: 12px; border-radius: var(--radius-lg); }

/* ── 29. Utility Classes ──────────────────────────── */
.text-center { text-align: center; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.font-mono { font-family: var(--font-mono); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hide stuff from desktop for mobile-only elements */
.mobile-only { display: none; }
@media (max-width: 768px) { .mobile-only { display: block; } .desktop-only { display: none; } }

/* ── 30. Animations ────────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(100%) scale(0.95); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes heroGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.6; }
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 31. Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-normal);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 500px;
  max-height: 85vh; overflow-y: auto; padding: 28px;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--duration-normal) var(--ease-out);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg-input);
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── 32. Back Link ─────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-size: 14px; font-weight: 500;
  transition: all var(--duration-fast); margin-top: 20px;
}
.back-link:hover { color: var(--primary-hover); gap: 10px; }

/* ── 33. Copy Button / URL Display ─────────────────── */
.url-display {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-family: var(--font-mono); font-size: 13px;
  word-break: break-all; line-height: 1.5;
  color: var(--text-primary); position: relative;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--primary-light);
  color: var(--primary); border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--duration-fast);
}
.copy-btn:hover { background: var(--primary); color: white; }
.copy-btn.copied { background: var(--success-light); color: var(--success); }

/* ── 34. Responsive Final ─────────────────────────── */
@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .hero-subtitle { font-size: 14px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .plan-card { padding: 18px 10px; }
  .plan-card__months { font-size: 24px; }
  .plan-card__price { font-size: 18px; }
  .support-options { grid-template-columns: 1fr; }
  .plans-preview { grid-template-columns: 1fr; }
  .web-container { padding: 0 12px; }
}

/* ── 35. No-plans State ────────────────────────────── */
.no-plans { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 16px; }

/* ── 36. Spinner ───────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

/* ── 37. Page transitions ──────────────────────────── */
.page-enter { animation: slideUp 0.3s var(--ease-out); }

/* ── 38. Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── 39. Selection ─────────────────────────────────── */
::selection { background: var(--primary-glow); color: var(--primary); }

