/* Base Styling & Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(18, 24, 38, 0.75);
  --border-glass: rgba(255, 255, 255, 0.12);
  --primary-amber: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.35);
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #090d16;
  color: #f8fafc;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #161e31 0%, #090d16 60%, #05070a 100%);
  transition: background 0.3s ease;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #fcd34d 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ambient Background Lights */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(140px);
}

.glow-1 {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 420px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.08) 60%, transparent 100%);
  transition: all 0.4s ease;
}

.glow-2 {
  top: 700px;
  left: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
}

.glow-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Navigation Links */
.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #fbbf24;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f8fafc;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

html.light .theme-toggle-btn .moon-icon {
  display: block;
}
html.light .theme-toggle-btn .sun-icon {
  display: none;
}

html.dark .theme-toggle-btn .moon-icon {
  display: none;
}
html.dark .theme-toggle-btn .sun-icon {
  display: block;
}

/* Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a !important;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  filter: brightness(1.06);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc !important;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1.5px);
}

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 9999px;
  padding: 0.85rem 1.75rem;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-primary-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.55);
  filter: brightness(1.08);
}

.btn-secondary-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc !important;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9999px;
  padding: 0.85rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-secondary-hero:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.hero-badge {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fef08a;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 700;
}

/* Feature Cards */
.feature-card {
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 2rem;
  backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(25, 34, 52, 0.8);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.12);
}

.feature-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Menu Window Glass Simulation */
.menu-window-glass {
  background: rgba(26, 32, 46, 0.85);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Power Switch */
.power-switch {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.power-switch.active {
  background: #f59e0b;
  color: #0f172a;
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
}

.power-switch:hover {
  transform: scale(1.06);
}

/* Preset Buttons */
.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.preset-btn.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fef08a;
  font-weight: 700;
}

/* Capsule Sliders */
.capsule-track {
  position: relative;
  transition: all 0.2s ease;
}

.capsule-track:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

/* FAQ Accordion */
.faq-trigger {
  background: none;
  border: none;
  cursor: pointer;
}

.faq-item.open .faq-content {
  display: block;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  color: #f59e0b;
}

/* Code block */
code {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================
   LIGHT THEME MODE (Apple-Style Fresh Frosted Aesthetics)
   ========================================================== */

html.light {
  background-color: #f4f6fb;
  color: #1e293b;
}

html.light body {
  background: radial-gradient(circle at 50% 0%, #e2eaf8 0%, #f4f6fb 55%, #edf2f9 100%);
  color: #1e293b;
}

html.light .glow-grid {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

html.light header {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

html.light .nav-link {
  color: #475569;
}

html.light .nav-link:hover {
  color: #d97706;
}

html.light .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

html.light .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}

html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-300,
html.light .text-slate-400 {
  color: #475569 !important;
}

html.light .text-gradient {
  background: linear-gradient(135deg, #0f172a 30%, #d97706 80%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.light .feature-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
}

html.light .feature-card:hover {
  background: #ffffff;
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 16px 35px -5px rgba(245, 158, 11, 0.12), 0 6px 12px -2px rgba(0, 0, 0, 0.04);
}

html.light section {
  border-color: rgba(226, 232, 240, 0.8) !important;
}

html.light .bg-\[\#121826\]\/75,
html.light .bg-\[\#121826\]\/90 {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.06) !important;
}

html.light .bg-\[\#060911\]\/80 {
  background: rgba(241, 245, 249, 0.7) !important;
  border-color: rgba(226, 232, 240, 0.8) !important;
}

html.light .btn-secondary,
html.light .btn-secondary-hero {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.12);
}

html.light .btn-secondary:hover,
html.light .btn-secondary-hero:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.22);
}

html.light .faq-item {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

html.light .faq-trigger {
  color: #0f172a !important;
}

html.light .faq-trigger:hover {
  color: #d97706 !important;
}

html.light footer {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(226, 232, 240, 0.9);
  color: #64748b;
}

html.light code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #b45309 !important;
}
