/* ======================
   THEME VARIABLES
====================== */

/* LIGHT THEME (default) */
:root {
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;

  --gold-main: #e6c875;
  --gold-dark: #9c8435;

  --border-color: #e6c875;
  --shadow-card: 4px 4px 12px rgba(0, 0, 0, 0.1);
}

/* DARK THEME */
[data-theme="dark"] {
  --bg-main: #0b0f14;
  --bg-card: #111827;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --gold-main: #f1d67a;
  --gold-dark: #d4b75c;

  --border-color: #f1d67a;
  --shadow-card: 4px 4px 16px rgba(0, 0, 0, 0.6);
}

/* ======================
   FORCE PAGE BACKGROUND
   (Overrides Tailwind)
====================== */

html,
body {
  background-color: var(--bg-main) !important;
  color: var(--text-main) !important;
}

/* Override Tailwind body utilities ONLY */
body.bg-gray-50,
body.bg-white {
  background-color: var(--bg-main) !important;
}

body.text-gray-900,
body.text-gray-800 {
  color: var(--text-main) !important;
}

/* ======================
   THEME TOGGLE
====================== */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  color: var(--gold-dark);
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  background: var(--gold-main);
  color: #000;
}

/* Smooth transitions */
* {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}


/* ======================
   DARK THEME FIXES
====================== */

[data-theme="dark"] .attribution-banner {
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0.22),
    rgba(212, 175, 55, 0.12)
  );
  border-bottom: 1px solid rgba(212, 175, 55, 0.45);
}

[data-theme="dark"] .attribution-banner p {
  color: #e5e7eb; /* high contrast */
}

[data-theme="dark"] .attribution-banner a {
  color: #f1d67a;
}

[data-theme="dark"] .attribution-banner a:hover {
  color: #fde68a;
}


/* ---------- RESET BUTTON (DARK THEME) ---------- */

[data-theme="dark"] .reset-btn {
  background: #111827;
  color: #e5e7eb;
  border-color: #f1d67a;
}

[data-theme="dark"] .reset-btn:hover {
  background: #f1d67a;
  color: #111827;
}


/* ---------- THEME TOGGLE SWITCH ---------- */
.theme-toggle-switch {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 50px;      /* shorter */
  height: 28px;     /* thicker */
}

/* ---------- TRACK ---------- */
.toggle-track {
  width: 100%;
  height: 100%;
  background: #ccc;
  border-radius: 999px;
  position: relative;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;  /* space for icons */
  box-sizing: border-box;
}

.toggle-track.dark {
  background: var(--gold-main);
}

/* ---------- ICONS ---------- */
.toggle-track .icon {
  font-size: 14px;
  pointer-events: none;
  user-select: none;
}

.toggle-track .sun {
  color: #fbbf24;  /* subtle yellow */
}

.toggle-track .moon {
  color: #f3f4f6;  /* subtle white */
}

/* ---------- THUMB ---------- */
.toggle-thumb {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, background 0.3s ease;
}

.toggle-thumb.dark {
  transform: translateX(22px);
  background: #111827;
}

/* ---------- HOVER GLOW ---------- */
.theme-toggle-switch:hover .toggle-thumb {
  box-shadow: 0 0 8px rgba(230, 200, 117, 0.6);
}

