:root {
  color-scheme: light dark;
  --bg-color: #f5f5f7;
  --card-bg: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.68);
  --text-color: #0f172a;
  --muted: #64748b;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-border: rgba(148, 163, 184, 0.6);
  --menu-bg-mobile: rgba(255, 255, 255, 0.98);
  --nav-bg-submenu: rgba(255, 255, 255, 0.98);
  --button-verse: rgba(44, 79, 237, 0.98);
  --button-verse-hover: rgba(44, 79, 237, 0.551);
  --input-color: #e5e7eb;
  --background-glow-top: #e0f2fe;
  --background-glow-bottom: #fee2e2;
  --item-bg: rgba(255, 255, 255, 0.8);
  --item-border: rgba(0, 0, 0, 0.08);
  --item-hover-border: rgba(0, 102, 255, 0.3);
  --item-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  --item-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
  --container-padding: clamp(16px, 4vw, 32px);
  --grid-gap: clamp(16px, 2vw, 24px);
  --card-radius: 16px;
  --radius-lg: 24px;
  --content-width: 1120px;
  --focus-ring: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

[data-theme="dark"] {
  --bg-color: #020617;
  --card-bg: #020617;
  --surface-soft: rgba(15, 23, 42, 0.72);
  --text-color: #e5e7eb;
  --muted: #94a3b8;
  --accent-color: #38bdf8;
  --accent-hover: #0ea5e9;
  --border-color: #1f2937;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.75);
  --nav-bg: rgba(15, 23, 42, 0.92);
  --nav-border: rgba(55, 65, 81, 0.8);
  --menu-bg-mobile: rgba(15, 23, 42, 0.98);
  --nav-bg-submenu: rgba(15, 23, 42, 0.92);
  --button-verse: rgba(16, 48, 188, 0.98);
  --button-verse-hover: rgba(16, 48, 188, 0.551);
  --input-color: #030a28;
  --background-glow-top: rgba(14, 116, 144, 0.24);
  --background-glow-bottom: rgba(127, 29, 29, 0.2);
  --focus-ring: 0 0 0 4px rgba(56, 189, 248, 0.16);
  --item-bg: rgba(18, 18, 25, 0.55);
  --item-border: rgba(255, 255, 255, 0.08);
  --item-hover-border: rgba(106, 166, 255, 0.35);
  --item-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  --item-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at top, var(--background-glow-top) 0, transparent 50%) no-repeat,
    radial-gradient(circle at bottom, var(--background-glow-bottom) 0, transparent 50%) no-repeat,
    var(--bg-color);
  background-position: top center, bottom center;
  background-size: 140% 140%, 140% 140%;
  transform: translateZ(0);
  backface-visibility: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  color: white;
  background: var(--accent-color);
}

footer {
  padding: 0.75rem 1rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
