/* Theme System - CSS Custom Properties */

:root {
  /* Default Theme: Cyber (Cyan/Purple) */
  --theme-primary: #06b6d4;
  --theme-primary-rgb: 6, 182, 212;
  --theme-secondary: #8b5cf6;
  --theme-secondary-rgb: 139, 92, 246;
  --theme-accent: #10b981;
  --theme-accent-rgb: 16, 185, 129;

  /* Opacity variations */
  --theme-primary-03: rgba(var(--theme-primary-rgb), 0.03);
  --theme-primary-05: rgba(var(--theme-primary-rgb), 0.05);
  --theme-primary-10: rgba(var(--theme-primary-rgb), 0.1);
  --theme-primary-15: rgba(var(--theme-primary-rgb), 0.15);
  --theme-primary-20: rgba(var(--theme-primary-rgb), 0.2);
  --theme-primary-30: rgba(var(--theme-primary-rgb), 0.3);
  --theme-primary-40: rgba(var(--theme-primary-rgb), 0.4);
  --theme-primary-50: rgba(var(--theme-primary-rgb), 0.5);
  --theme-primary-70: rgba(var(--theme-primary-rgb), 0.7);

  --theme-secondary-10: rgba(var(--theme-secondary-rgb), 0.1);
  --theme-secondary-20: rgba(var(--theme-secondary-rgb), 0.2);
  --theme-secondary-30: rgba(var(--theme-secondary-rgb), 0.3);

  /* Gradients */
  --theme-gradient: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
  --theme-gradient-bg: linear-gradient(135deg, var(--theme-primary-20) 0%, var(--theme-secondary-20) 100%);
  --theme-gradient-light: linear-gradient(135deg, var(--theme-primary-15) 0%, var(--theme-secondary-10) 100%);
}

/* Theme 1: Cyber (Cyan/Purple) - Default */
[data-theme="cyber"] {
  --theme-primary: #06b6d4;
  --theme-primary-rgb: 6, 182, 212;
  --theme-secondary: #8b5cf6;
  --theme-secondary-rgb: 139, 92, 246;
  --theme-accent: #10b981;
  --theme-accent-rgb: 16, 185, 129;
}

/* Theme 2: Sunset (Amber/Orange) */
[data-theme="sunset"] {
  --theme-primary: #f59e0b;
  --theme-primary-rgb: 245, 158, 11;
  --theme-secondary: #f97316;
  --theme-secondary-rgb: 249, 115, 22;
  --theme-accent: #eab308;
  --theme-accent-rgb: 234, 179, 8;
}

/* Theme 3: Forest (Emerald/Teal) */
[data-theme="forest"] {
  --theme-primary: #10b981;
  --theme-primary-rgb: 16, 185, 129;
  --theme-secondary: #14b8a6;
  --theme-secondary-rgb: 20, 184, 166;
  --theme-accent: #22c55e;
  --theme-accent-rgb: 34, 197, 94;
}

/* Theme 4: Neon (Pink/Red) - Original Theme */
[data-theme="neon"] {
  --theme-primary: #e94560;
  --theme-primary-rgb: 233, 69, 96;
  --theme-secondary: #ff006e;
  --theme-secondary-rgb: 255, 0, 110;
  --theme-accent: #ec4899;
  --theme-accent-rgb: 236, 72, 153;
}

/* Theme Switcher UI */
.theme-switcher {
  position: relative;
  display: inline-block;
}

.theme-button {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid var(--theme-primary-30);
  color: var(--theme-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.theme-button:hover {
  background: var(--theme-primary-20);
  transform: scale(1.05);
}

.theme-button i {
  font-size: 1rem;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid var(--theme-primary-30);
  border-radius: 0.75rem;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-option:hover {
  background: rgba(31, 41, 55, 0.6);
  color: #ffffff;
}

.theme-option.active {
  background: var(--theme-gradient-bg);
  color: #ffffff;
  border: 1px solid var(--theme-primary-30);
}

.theme-option i {
  font-size: 1.25rem;
}

/* Theme color indicators */
.theme-option[data-theme="cyber"] i {
  background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-option[data-theme="sunset"] i {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-option[data-theme="forest"] i {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-option[data-theme="neon"] i {
  background: linear-gradient(135deg, #e94560 0%, #ff006e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile theme switcher */
@media (max-width: 768px) {
  .theme-button {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .theme-button span {
    display: none;
  }

  .theme-dropdown {
    min-width: 150px;
    right: 0;
    left: auto;
  }

  .theme-option {
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
  }
}
