/* styles/themes.css - Elegant Theme System Integration with Cyberpunk */

/* Theme selector container */
.theme-selector-container {
  flex: 1;
  margin: 0 16px;
  max-width: 350px;
}

.theme-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--panel-bg);
  border-radius: 8px; /* Cyberpunk sharp corners */
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.theme-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

.theme-label i {
  color: var(--primary);
}

.theme-demo {
  display: flex;
  gap: 8px;
}

.theme-sample {
  width: 30px;
  height: 30px;
  border-radius: 4px; /* Cyberpunk sharp corners */
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.theme-sample:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.theme-sample.active {
  border-color: white;
  box-shadow: 0 0 0 3px var(--primary-color), 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: scale(1.15);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 3px var(--primary-color), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 5px var(--primary-color), 0 12px 30px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 0 3px var(--primary-color), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

/* CYBERPUNK THEME SAMPLE */
.theme-sample.cyberpunk-neon { 
  background: linear-gradient(135deg, #FF5E00, #00F3FF, #0A0E17); 
  border: 2px solid rgba(255, 94, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 94, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.theme-sample.cyberpunk-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(0, 243, 255, 0.3), 
    transparent);
  animation: cyber-shine 2s infinite linear;
  z-index: 1;
}

@keyframes cyber-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.theme-sample.cyberpunk-neon.active {
  border-color: #00F3FF;
  box-shadow: 
    0 0 20px rgba(0, 243, 255, 0.7), 
    0 0 0 3px rgba(255, 94, 0, 0.5);
}

.theme-sample.cyberpunk-neon::after {
  content: '✦';
  position: absolute;
  color: #00F3FF;
  font-size: 16px;
  text-shadow: 0 0 10px #00F3FF;
  z-index: 2;
}

/* OTHER THEME SAMPLES */
.theme-sample.sunset-glow { 
  background: linear-gradient(135deg, #FF6B6B, #FFA726); 
  border: 2px solid rgba(255, 107, 107, 0.3);
}
.theme-sample.aurora-magic { 
  background: linear-gradient(135deg, #00D4AA, #667EEA, #8B5CF6); 
  border: 2px solid rgba(0, 212, 170, 0.3);
}
.theme-sample.serenity-bliss { 
  background: linear-gradient(135deg, #7C3AED, #60A5FA); 
  border: 2px solid rgba(124, 58, 237, 0.3);
}
.theme-sample.ocean-deep { 
  background: linear-gradient(135deg, #2563EB, #06B6D4); 
  border: 2px solid rgba(37, 99, 235, 0.3);
}
.theme-sample.auto { 
  background: linear-gradient(135deg, #666, #999);
  border: 2px solid rgba(100, 100, 100, 0.3);
  position: relative;
}

.theme-sample.auto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #7C3AED 50%, #0F172A 50%);
  opacity: 0.7;
  border-radius: inherit;
}

/* Tooltip for theme samples */
.theme-sample::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 6px 10px;
  border-radius: 4px; /* Cyberpunk sharp corners */
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
  z-index: 100;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
  border: 1px solid var(--panel-border);
}

.theme-sample:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Particles effect */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.08;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-1000px) rotate(720deg); }
}

/* Theme Change Animation */
@keyframes themeChange {
  0% { opacity: 0.9; }
  50% { opacity: 0.95; }
  100% { opacity: 1; }
}

.theme-change {
  animation: themeChange 0.4s ease;
}

/* Responsive theme selector */
@media (max-width: 1024px) {
  .theme-selector-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 12px 0 0 0;
  }
  
  .theme-selector {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }
  
  .theme-label {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .theme-selector {
    gap: 6px;
  }
  
  .theme-sample {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}
/* ===========================================
   Theme selector readability tweaks
   =========================================== */

.theme-label {
  font-size: 14px;
}

.theme-sample {
  font-size: 13px;
}

/* Tooltip text slightly larger */
.theme-sample::after {
  font-size: 12px;
}

/* CYBERPUNK ENHANCEMENTS FOR THEME SELECTOR */
[data-app-theme="cyberpunk-neon"] .theme-selector {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--primary);
  box-shadow: 
    0 0 15px rgba(255, 94, 0, 0.3),
    inset 0 0 10px rgba(0, 0, 0, 0.3);
}

[data-app-theme="cyberpunk-neon"] .theme-label {
  color: var(--primary);
  text-shadow: 0 0 5px rgba(255, 94, 0, 0.3);
}

[data-app-theme="cyberpunk-neon"] .theme-label i {
  color: var(--secondary);
}

/* Enhanced active state for cyberpunk */
[data-app-theme="cyberpunk-neon"] .theme-sample.cyberpunk-neon.active {
  animation: cyberpunk-pulse 1.5s infinite;
}

@keyframes cyberpunk-pulse {
  0% {
    box-shadow: 
      0 0 0 3px var(--primary-color),
      0 0 15px rgba(255, 94, 0, 0.5);
  }
  50% {
    box-shadow: 
      0 0 0 3px var(--secondary-color),
      0 0 25px rgba(0, 243, 255, 0.7);
  }
  100% {
    box-shadow: 
      0 0 0 3px var(--primary-color),
      0 0 15px rgba(255, 94, 0, 0.5);
  }
}

/* Cyberpunk particles effect */
[data-app-theme="cyberpunk-neon"] .particle {
  background: var(--secondary-color);
  opacity: 0.05;
  animation: cyber-float 15s infinite linear;
}

@keyframes cyber-float {
  0% { 
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.1; }
  90% { opacity: 0.1; }
  100% { 
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Matrix-like grid effect for cyberpunk background */
[data-app-theme="cyberpunk-neon"] .particles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: matrix-grid 20s linear infinite;
  pointer-events: none;
}

@keyframes matrix-grid {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

/* Theme selector cyberpunk hover effects */
[data-app-theme="cyberpunk-neon"] .theme-sample:hover {
  transform: translateY(-3px) scale(1.15);
  box-shadow: 0 0 20px currentColor;
}

/* Specific hover effects for each theme */
[data-app-theme="cyberpunk-neon"] .theme-sample.sunset-glow:hover {
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.7);
}
[data-app-theme="cyberpunk-neon"] .theme-sample.aurora-magic:hover {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.7);
}
[data-app-theme="cyberpunk-neon"] .theme-sample.serenity-bliss:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.7);
}
[data-app-theme="cyberpunk-neon"] .theme-sample.ocean-deep:hover {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.7);
}
[data-app-theme="cyberpunk-neon"] .theme-sample.auto:hover {
  box-shadow: 0 0 20px rgba(100, 100, 100, 0.7);
}

/* Cyberpunk theme change animation */
[data-app-theme="cyberpunk-neon"] .theme-change {
  animation: cyber-theme-change 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cyber-theme-change {
  0% {
    opacity: 0.8;
    filter: hue-rotate(0deg);
  }
  50% {
    opacity: 0.9;
    filter: hue-rotate(180deg);
  }
  100% {
    opacity: 1;
    filter: hue-rotate(360deg);
  }
}

/* Theme tooltip cyberpunk style */
[data-app-theme="cyberpunk-neon"] .theme-sample::after {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 94, 0, 0.5);
  color: var(--secondary);
  backdrop-filter: blur(10px);
}
