/* =============================================
   Creator HQ — Theme Toggle System
   Light / Dark / System
   ============================================= */

/* --- Toggle button --- */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.75rem;
  gap: 0.35rem;
  background: rgba(5, 0, 16, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 999px;
  color: #C4B5FD;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, color 0.2s ease,
    background 0.2s ease;
  user-select: none;
}

.theme-toggle:hover {
  border-color: #F59E0B;
  color: #F59E0B;
}

/* --- Light mode overrides --- */
html.theme-light {
  --bg: #F9FAFB;
  --card: rgba(124, 58, 237, 0.05);
  --border: rgba(124, 58, 237, 0.25);
  --white: #111827;
  --lavender: #4B5563;
}

html.theme-light body {
  color: #111827;
  background: #F9FAFB;
}

html.theme-light .theme-toggle {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(124, 58, 237, 0.35);
  color: #4B5563;
}

html.theme-light body::before,
html.theme-light body::after {
  opacity: 0.08;
}

/* --- Smooth transition on switch --- */
html {
  transition: background 0.25s ease, color 0.25s ease;
}
