
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f14;
  --bg-elevated: #16161e;
  --bg-soft: #1a1a22;
  --text: #f0f0f4;
  --text-muted: #9898a8;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
  --accent: #e8e8ec;
  --accent-light: #c8c8d0;
  --accent-glow: rgba(255, 255, 255, 0.06);
  --coral: #c47070;
  --mint: #9a9898;
  --header-bg: rgba(15, 15, 20, 0.82);
  --header-bg-scrolled: rgba(15, 15, 20, 0.96);
  --header-highlight: rgba(255, 255, 255, 0.04);
  --scrollbar-track: rgba(255, 255, 255, 0.05);
  --scrollbar-thumb: #d44a44;
  --scrollbar-thumb-hover: #f06a64;
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover), var(--brand-light));
}

.theme-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), background 0.3s, border-color 0.3s, color 0.3s;
}

.theme-toggle:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle__icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: opacity 0.35s, transform 0.45s var(--ease-spring);
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.7);
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.7);
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

html[data-theme="dark"] .features {
  background: var(--bg);
}

html[data-theme="dark"] .feature:hover {
  background: var(--bg-elevated);
}

html[data-theme="dark"] .feature__icon {
  background: var(--bg-elevated);
}

html[data-theme="dark"] .journey__wrap {
  background: var(--bg-elevated);
}

html[data-theme="dark"] .events {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

html[data-theme="dark"] .special-experience,
html[data-theme="dark"] .experience-card,
html[data-theme="dark"] .spotlight,
html[data-theme="dark"] .spotlight__panel,
html[data-theme="dark"] .community-card,
html[data-theme="dark"] .community-card__body,
html[data-theme="dark"] .nowruz-banner,
html[data-theme="dark"] .nowruz-banner__card {
  background: var(--bg-elevated);
}

html[data-theme="dark"] .special-experience {
  background: var(--bg);
}

html[data-theme="dark"] .noise {
  opacity: 0.05;
}

@media (max-width: 768px) {
  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .mobile-nav .theme-toggle {
    align-self: flex-start;
    margin: 4px 0 8px;
  }
}
