/* ============================================================
   SpinLuck – style.css
   Premium dark-neon design system
   ============================================================ */

/* ---------- CSS Variables / Tokens ---------- */
:root {
  --bg-base:       #0b0c1a;
  --bg-panel:      #12132a;
  --bg-panel-2:    #1a1b35;
  --accent-1:      #7c3aed;   /* violet */
  --accent-2:      #06b6d4;   /* cyan   */
  --accent-3:      #f59e0b;   /* amber  */
  --accent-danger: #ef4444;
  --text-primary:  #f1f5f9;
  --text-muted:    #94a3b8;
  --border:        rgba(124, 58, 237, 0.3);
  --glow-violet:   0 0 24px rgba(124, 58, 237, 0.55);
  --glow-cyan:     0 0 24px rgba(6, 182, 212, 0.45);
  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Wheel segment colors */
  --seg-colors: #7c3aed, #06b6d4, #f59e0b, #10b981, #ef4444,
                #ec4899, #3b82f6, #14b8a6, #f97316, #8b5cf6;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Background Particles ---------- */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
@keyframes float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.15; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2.5rem 1rem 1.2rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: var(--glow-violet);
}
.logo-icon { font-size: 2.4rem; }
.logo-accent { color: var(--accent-2); text-shadow: var(--glow-cyan); }
.tagline {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* ---------- Main Layout ---------- */
.main-layout {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 1.5rem 3rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ---------- Wheel Section ---------- */
.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  flex: 1 1 540px;
}

.wheel-wrapper {
  position: relative;
  width: 520px;
  height: 520px;
}

#wheelCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.55);
}

/* Pointer arrow */
.pointer {
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  z-index: 20;
  pointer-events: none;
}
.pointer-arrow {
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-right: 38px solid #f59e0b;
  filter: drop-shadow(0 0 8px rgba(245,158,11,0.9));
}

/* Spin button (center overlay) */
.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  background: radial-gradient(circle at 40% 35%, #a855f7, #7c3aed 60%, #4c1d95);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 0 0 6px rgba(124,58,237,0.3), var(--glow-violet), inset 0 2px 8px rgba(255,255,255,0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 0 8px rgba(124,58,237,0.4), 0 0 40px rgba(124,58,237,0.8), inset 0 2px 8px rgba(255,255,255,0.25);
}
.spin-btn:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.96);
}
.spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.spin-btn-inner {
  display: block;
  pointer-events: none;
}

/* ---------- Result ---------- */
.result-container {
  width: 100%;
  display: flex;
  justify-content: center;
}
.result-card {
  background: linear-gradient(135deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 3rem;
  text-align: center;
  box-shadow: var(--glow-violet);
  min-width: 260px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}
.result-card.pop {
  transform: scale(1.06);
  box-shadow: 0 0 40px rgba(6,182,212,0.6), var(--glow-violet);
}
.result-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.result-number {
  font-size: 3.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  transition: transform 0.3s;
}

/* ---------- Controls Section ---------- */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 0 1 360px;
  min-width: 300px;
}

/* ---------- Top Navigation Bar ---------- */
.top-nav-bar {
  width: 100%;
  flex: 1 1 100%;
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}
.nav-bar-buttons {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}
.nav-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition);
  border-right: 1px solid rgba(124, 58, 237, 0.1);
}
.nav-tab-btn:last-child {
  border-right: none;
}
.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}
.nav-tab-btn.active {
  background: rgba(124, 58, 237, 0.12);
  color: #fff;
  border-bottom: 2px solid var(--accent-1);
}
.nav-bar-collapse-container {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-nav-bar.active .nav-bar-collapse-container {
  grid-template-rows: 1fr;
}
.nav-collapse-wrapper {
  overflow: hidden;
}
.nav-collapse-content {
  display: none;
  padding: 1.6rem;
}
.nav-collapse-content.active {
  display: block;
}

/* Customize horizontal grid */
.customize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.customize-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.btn-reset-settings {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.2rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-reset-settings:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.btn-reset-settings:active {
  transform: scale(0.97);
}
.customize-grid .setting-row {
  border-bottom: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
}

/* Customize Grid Groups */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.settings-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.3rem;
}
.custom-file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.custom-file-upload input[type="file"] {
  display: none;
}
.btn-file-select {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-2);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-block;
  transition: all var(--transition);
}
.btn-file-select:hover {
  background: rgba(6, 182, 212, 0.25);
}
.file-name-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.custom-audio-row {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 0.4rem !important;
}

/* Custom theme assets section */
.custom-themes-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.custom-theme-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  margin-bottom: 0.6rem;
}
.custom-theme-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.custom-image-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.custom-image-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.btn-remove-asset {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn-remove-asset:hover {
  background: rgba(239, 68, 68, 0.25);
}
.asset-names-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.3rem;
}

/* Horizontal Stats Layout */
.stats-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .stats-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}
.stats-details {
  flex: 1;
}

/* ---------- Panel ---------- */
.panel {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
  overflow: hidden;
  transition: border-color var(--transition);
}
.static-panel {
  padding: 1.4rem 1.6rem;
}
.static-panel .panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.panel-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1.2rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  text-align: left;
  transition: background var(--transition);
}
.panel-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.panel-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.panel-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.panel.active .panel-chevron {
  transform: rotate(180deg);
}
.panel-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.panel.active .panel-collapse {
  grid-template-rows: 1fr;
}
.panel-body {
  overflow: hidden;
  padding: 0 1.6rem 1.4rem 1.6rem;
}
.panel-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Themes Panel Styles */
.theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.theme-btn {
  flex: 1 1 170px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}
.theme-btn.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent-1);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
}
.theme-preview {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}
.theme-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Statistics Panel Styles */
.stats-container {
  margin-top: 0.5rem;
}
.stats-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-2);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.stats-list-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.stats-list {
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
  margin-top: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-1) transparent;
}
.stats-list::-webkit-scrollbar {
  width: 4px;
}
.stats-list::-webkit-scrollbar-thumb {
  background: var(--accent-1);
  border-radius: 2px;
}
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.stats-row:last-child {
  border-bottom: none;
}
.stats-row-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stats-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stats-row-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.stats-percentage-bar-bg {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.stats-percentage-bar-fill {
  height: 100%;
  background: var(--accent-1);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}
.stats-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 1rem 0;
}

/* Add number form */
.add-number-form {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.number-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.number-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}
.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.btn-add {
  background: linear-gradient(135deg, var(--accent-1), #9333ea);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 1.2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(124,58,237,0.4);
}
.btn-add:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,58,237,0.6); }
.btn-add:active { transform: translateY(0); }

/* Quick add */
.quick-add-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  margin-bottom: 0.8rem;
}
.quick-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.quick-btn {
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--accent-2);
  border-radius: 20px;
  padding: 0.28rem 0.52rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.quick-btn:hover {
  background: rgba(6,182,212,0.25);
  transform: translateY(-1px);
}

/* Custom range panel */
.custom-range-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-bottom: 0.8rem;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.range-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.range-row label { font-size: 0.82rem; color: var(--text-muted); }
.range-input {
  width: 70px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
}
.range-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-range-apply {
  width: 100%;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn-range-apply:hover { opacity: 0.9; }

/* Numbers list */
.numbers-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.4rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-1) transparent;
}
.numbers-list::-webkit-scrollbar { width: 4px; }
.numbers-list::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 2px; }

.number-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 20px;
  padding: 0.28rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c4b5fd;
  animation: chipIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: background var(--transition), filter var(--transition);
}
.number-chip:hover {
  background: rgba(124,58,237,0.3);
  filter: brightness(1.25);
}
@keyframes chipIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.chip-del {
  background: none;
  border: none;
  color: rgba(196,181,253,0.5);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  transition: color var(--transition);
}
.chip-del:hover { color: var(--accent-danger); }

.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(124,58,237,0.2);
}
.count-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.btn-clear {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-clear:hover { background: rgba(239,68,68,0.25); }

.list-footer-btns {
  display: flex;
  gap: 0.5rem;
}
.btn-share {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-2);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-share:hover {
  background: rgba(6, 182, 212, 0.25);
  transform: translateY(-1px);
}
.btn-share:active {
  transform: translateY(0);
}

/* ---------- Settings ---------- */
.settings-panel .panel-title { margin-bottom: 1rem; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
  gap: 1rem;
  cursor: pointer;
}
.setting-row:last-child { border-bottom: none; }

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.slider-wrap input[type="range"] {
  -webkit-appearance: none;
  width: 100px;
  height: 4px;
  background: rgba(124,58,237,0.3);
  border-radius: 2px;
  outline: none;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: var(--glow-violet);
  cursor: pointer;
}
.slider-val {
  font-size: 0.82rem;
  color: var(--accent-2);
  min-width: 28px;
  text-align: right;
}

.select-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.select-input option { background: var(--bg-panel-2); }

/* Toggle switch */
.toggle-row { cursor: pointer; }
.toggle-wrap { position: relative; }
.toggle-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: flex;
  align-items: center;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 3px;
  transition: background var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}
.toggle-wrap input:checked + .toggle-track {
  background: var(--accent-1);
  border-color: var(--accent-1);
}
.toggle-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.toggle-wrap input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

/* ---------- History ---------- */
.history-panel .panel-title { margin-bottom: 0.8rem; }
.history-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-1) transparent;
}
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 2px; }
.history-item {
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 20px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-2);
  animation: chipIn 0.2s ease;
}
.history-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---------- Confetti Canvas ---------- */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(124,58,237,0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .wheel-wrapper { width: 320px; height: 320px; }
  #wheelCanvas { width: 320px; height: 320px; }
  .spin-btn { width: 72px; height: 72px; font-size: 0.8rem; }
  .pointer { right: -16px; }
  .pointer-arrow { border-right-width: 26px; border-top-width: 13px; border-bottom-width: 13px; }
  .controls-section { min-width: unset; width: 100%; }
}

/* ---------- Winner Popup Modals ---------- */
.winner-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 420px;
  max-width: 90vw;
  background: rgba(18, 19, 42, 0.95);
  border: 2px solid var(--accent-1);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.8), var(--glow-violet);
  z-index: 100;
  padding: 2.8rem 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.winner-popup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.popup-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.popup-close-btn:hover {
  color: var(--accent-danger);
}
.popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.popup-emoji {
  font-size: 3.8rem;
}
.popup-title {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.popup-name {
  font-size: 3.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.4rem 0 1rem;
  word-break: break-word;
}
.popup-dismiss-btn {
  background: linear-gradient(135deg, var(--accent-1), #9333ea);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 2.6rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}
.popup-dismiss-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}
.popup-dismiss-btn:active {
  transform: translateY(0);
}
.popup-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
}
.popup-remove-btn {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.popup-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}
.popup-remove-btn:active {
  transform: translateY(1px);
}
#wheelCanvas.dimmed, .spin-btn.dimmed {
  filter: blur(2px) brightness(0.6);
  pointer-events: none;
  transition: filter 0.3s ease;
}

/* ---------- Theme Switch Toggle & Light Mode Overrides ---------- */
.theme-toggle-container {
  position: absolute;
  top: 2.2rem;
  right: 2.2rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: all var(--transition);
}

.theme-toggle-container:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.theme-toggle-container span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .theme-toggle-container {
    position: static;
    margin: 1.2rem auto 0.4rem;
    width: fit-content;
  }
}

/* ---------- SEO Rich Content Section ---------- */
.seo-rich-content {
  width: 100%;
  max-width: 1300px;
  margin: 2.5rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}
.seo-container {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 3rem;
}
.seo-header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 2rem;
}
.seo-main-heading {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}
.seo-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 900px;
  margin: 0 auto;
}
.seo-intro strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Key Features Grid */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}
.seo-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.seo-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15), var(--glow-violet);
}
.seo-card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.3));
}
.seo-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  letter-spacing: -0.2px;
}
.seo-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.seo-card strong {
  color: var(--text-primary);
}

/* Detailed Information */
.seo-detailed-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 3rem;
}
@media (max-width: 900px) {
  .seo-detailed-info {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.seo-info-block h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-2);
  margin-bottom: 1.2rem;
  letter-spacing: -0.3px;
}
.seo-info-block p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.seo-list, .seo-steps {
  margin-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.seo-list {
  list-style: none;
}
.seo-list li {
  position: relative;
  padding-left: 1.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.seo-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-2);
  font-weight: 900;
  font-size: 1.1rem;
}
.seo-list li strong {
  color: var(--text-primary);
}
.seo-steps {
  list-style: none;
  counter-reset: steps-counter;
}
.seo-steps li {
  position: relative;
  padding-left: 2.2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  counter-increment: steps-counter;
}
.seo-steps li::before {
  content: counter(steps-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--accent-1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
}
.seo-steps li strong {
  color: var(--text-primary);
}

/* FAQ Accordion Styling */
.seo-faqs {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 3rem;
}
.seo-faq-heading {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.seo-faq-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.seo-faq-item[open] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(124, 58, 237, 0.25);
}
.seo-faq-item:hover {
  border-color: rgba(6, 182, 212, 0.3);
}
.seo-faq-question {
  padding: 1.2rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
  user-select: none;
}
.seo-faq-question::-webkit-details-marker {
  display: none;
}
.seo-faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent-2);
  transition: transform var(--transition), color var(--transition);
  display: inline-block;
  line-height: 1;
}
.seo-faq-item[open] .seo-faq-question::after {
  content: "−";
  transform: rotate(180deg);
  color: var(--accent-1);
}
.seo-faq-answer {
  padding: 0 1.5rem 1.2rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  animation: fadeIn 0.3s ease;
}
.seo-faq-answer strong {
  color: var(--text-primary);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Light Mode Overrides ---------- */
.light-mode {
  --bg-base:       #f1f5f9;   /* slate 100 */
  --bg-panel:      #ffffff;   /* white */
  --bg-panel-2:    #f8fafc;   /* slate 50 */
  --text-primary:  #0f172a;   /* slate 900 */
  --text-muted:    #475569;   /* slate 600 */
  --border:        rgba(124, 58, 237, 0.15);
  --glow-violet:   0 0 20px rgba(124, 58, 237, 0.25);
  --glow-cyan:     0 0 20px rgba(6, 182, 212, 0.2);
}

/* Specific elements that need styling adjustments in light mode */
.light-mode .panel {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.light-mode .panel-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.light-mode .number-input,
.light-mode .select-input,
.light-mode .range-input {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.light-mode .custom-range-panel {
  background: rgba(0, 0, 0, 0.02);
}

.light-mode .quick-btn {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
}

.light-mode .quick-btn:hover {
  background: rgba(6, 182, 212, 0.18);
}

.light-mode .btn-share {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
}

.light-mode .btn-share:hover {
  background: rgba(6, 182, 212, 0.18);
}

.light-mode .btn-clear {
  background: rgba(239, 68, 68, 0.08);
  color: #c53030;
}

.light-mode .btn-clear:hover {
  background: rgba(239, 68, 68, 0.18);
}

.light-mode .btn-reset-settings {
  background: rgba(239, 68, 68, 0.08);
  color: #c53030;
}

.light-mode .btn-reset-settings:hover {
  background: rgba(239, 68, 68, 0.18);
}

.light-mode .theme-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-mode .theme-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.light-mode .theme-btn.active {
  background: rgba(124, 58, 237, 0.08);
}

.light-mode .stat-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .top-nav-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .nav-bar-buttons {
  background: var(--accent-1);
  border-bottom: 1px solid var(--accent-1);
}

.light-mode .nav-tab-btn {
  color: rgba(255, 255, 255, 0.8);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.light-mode .nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.light-mode .nav-tab-btn.active {
  background: #ffffff;
  color: var(--accent-1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  border-bottom: 2px solid #ffffff;
}

.light-mode .number-chip {
  color: var(--text-primary) !important;
}

.light-mode .number-chip:hover {
  filter: brightness(0.92);
}

.light-mode .chip-del {
  color: var(--text-muted);
}

.light-mode .history-item {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
}

.light-mode .theme-toggle-container {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .theme-toggle-container:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.10);
}

.light-mode .custom-file-upload {
  background: rgba(0, 0, 0, 0.04);
}

.light-mode .btn-file-select {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.light-mode .winner-popup {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--accent-1);
  box-shadow: 0 10px 50px rgba(15, 23, 42, 0.15);
}

.light-mode .popup-remove-btn {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
  color: #c53030;
}

.light-mode .popup-remove-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}

.light-mode #wheelCanvas {
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

/* Light Mode overrides for SEO Content Section */
.light-mode .seo-container {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
.light-mode .seo-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
.light-mode .seo-main-heading {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.light-mode .seo-card {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.04);
}
.light-mode .seo-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.08);
}
.light-mode .seo-detailed-info {
  border-top-color: rgba(15, 23, 42, 0.06);
}
.light-mode .seo-steps li::before {
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}
.light-mode .seo-faqs {
  border-top-color: rgba(15, 23, 42, 0.06);
}
.light-mode .seo-faq-item {
  background: rgba(0, 0, 0, 0.005);
  border-color: rgba(0, 0, 0, 0.03);
}
.light-mode .seo-faq-item[open] {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(124, 58, 237, 0.15);
}
.light-mode .seo-faq-item:hover {
  border-color: rgba(6, 182, 212, 0.2);
}
.light-mode .seo-faq-answer {
  border-top-color: rgba(0, 0, 0, 0.015);
}
