/* ============================================
   FasFerry Checker - Advanced Theme System
   6 Premium Themes with Smooth Transitions
   ============================================ */

/* === THEME TRANSITION === */
:root {
  --theme-transition: 0.3s ease;
}

body,
body * {
  transition:
    background-color var(--theme-transition),
    border-color var(--theme-transition),
    color var(--theme-transition),
    box-shadow var(--theme-transition);
}

/* Exclude elements that shouldn't transition */
.loading-bar,
.loading-bar *,
.animate-spin,
[class*="animate-"] {
  transition: none !important;
}

/* === THEME 1: GOLD DARK (Default) === */
[data-theme="gold-dark"],
:root {
  /* Primary Colors */
  --theme-primary: #ffd700;
  --theme-primary-light: #ffe44d;
  --theme-primary-dark: #ccac00;
  --theme-primary-rgb: 255, 215, 0;

  /* Background Colors */
  --theme-bg-primary: #0a0a0a;
  --theme-bg-secondary: #171717;
  --theme-bg-tertiary: #262626;
  --theme-bg-card: rgba(23, 23, 23, 0.6);
  --theme-bg-input: rgba(0, 0, 0, 0.3);

  /* Text Colors */
  --theme-text-primary: #f5f5f5;
  --theme-text-secondary: #a3a3a3;
  --theme-text-muted: #737373;

  /* Border Colors */
  --theme-border: rgba(255, 215, 0, 0.1);
  --theme-border-hover: rgba(255, 215, 0, 0.3);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #ffc61a 0%, #ccac00 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(255, 215, 0, 0.03) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(255, 215, 0, 0.3);
  --theme-shadow-glow-sm: 0 0 10px rgba(255, 215, 0, 0.2);

  /* Navbar */
  --theme-navbar-bg: rgba(23, 23, 23, 0.8);

  /* Accent Colors (keep consistent across themes) */
  --theme-success: #22c55e;
  --theme-error: #ef4444;
  --theme-warning: #eab308;
  --theme-info: #3b82f6;
}

/* === THEME 2: CYBER PURPLE === */
[data-theme="cyber-purple"] {
  /* Primary Colors */
  --theme-primary: #a855f7;
  --theme-primary-light: #c084fc;
  --theme-primary-dark: #7c3aed;
  --theme-primary-rgb: 168, 85, 247;

  /* Background Colors */
  --theme-bg-primary: #0c0a15;
  --theme-bg-secondary: #1a1625;
  --theme-bg-tertiary: #2d2640;
  --theme-bg-card: rgba(26, 22, 37, 0.6);
  --theme-bg-input: rgba(0, 0, 0, 0.4);

  /* Text Colors */
  --theme-text-primary: #f3e8ff;
  --theme-text-secondary: #c4b5fd;
  --theme-text-muted: #8b5cf6;

  /* Border Colors */
  --theme-border: rgba(168, 85, 247, 0.15);
  --theme-border-hover: rgba(168, 85, 247, 0.4);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(168, 85, 247, 0.05) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(168, 85, 247, 0.4);
  --theme-shadow-glow-sm: 0 0 10px rgba(168, 85, 247, 0.25);

  /* Navbar */
  --theme-navbar-bg: rgba(26, 22, 37, 0.85);
}

/* === THEME 3: NEON BLUE === */
[data-theme="neon-blue"] {
  /* Primary Colors */
  --theme-primary: #00d4ff;
  --theme-primary-light: #67e8f9;
  --theme-primary-dark: #0891b2;
  --theme-primary-rgb: 0, 212, 255;

  /* Background Colors */
  --theme-bg-primary: #020617;
  --theme-bg-secondary: #0f172a;
  --theme-bg-tertiary: #1e293b;
  --theme-bg-card: rgba(15, 23, 42, 0.6);
  --theme-bg-input: rgba(0, 0, 0, 0.4);

  /* Text Colors */
  --theme-text-primary: #e0f2fe;
  --theme-text-secondary: #7dd3fc;
  --theme-text-muted: #38bdf8;

  /* Border Colors */
  --theme-border: rgba(0, 212, 255, 0.15);
  --theme-border-hover: rgba(0, 212, 255, 0.4);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0891b2 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(0, 212, 255, 0.05) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(0, 212, 255, 0.4);
  --theme-shadow-glow-sm: 0 0 10px rgba(0, 212, 255, 0.25);

  /* Navbar */
  --theme-navbar-bg: rgba(15, 23, 42, 0.85);
}

/* === THEME 4: RED FIRE === */
[data-theme="red-fire"] {
  /* Primary Colors */
  --theme-primary: #ff4d4d;
  --theme-primary-light: #ff7070;
  --theme-primary-dark: #dc2626;
  --theme-primary-rgb: 255, 77, 77;

  /* Background Colors */
  --theme-bg-primary: #0f0505;
  --theme-bg-secondary: #1a0a0a;
  --theme-bg-tertiary: #2d1515;
  --theme-bg-card: rgba(26, 10, 10, 0.6);
  --theme-bg-input: rgba(0, 0, 0, 0.4);

  /* Text Colors */
  --theme-text-primary: #fef2f2;
  --theme-text-secondary: #fca5a5;
  --theme-text-muted: #f87171;

  /* Border Colors */
  --theme-border: rgba(255, 77, 77, 0.15);
  --theme-border-hover: rgba(255, 77, 77, 0.4);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #ff4d4d 0%, #dc2626 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(255, 77, 77, 0.05) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(255, 77, 77, 0.4);
  --theme-shadow-glow-sm: 0 0 10px rgba(255, 77, 77, 0.25);

  /* Navbar */
  --theme-navbar-bg: rgba(26, 10, 10, 0.85);
}

/* === THEME 5: EMERALD GREEN === */
[data-theme="emerald-green"] {
  /* Primary Colors */
  --theme-primary: #10b981;
  --theme-primary-light: #34d399;
  --theme-primary-dark: #059669;
  --theme-primary-rgb: 16, 185, 129;

  /* Background Colors */
  --theme-bg-primary: #022c22;
  --theme-bg-secondary: #064e3b;
  --theme-bg-tertiary: #065f46;
  --theme-bg-card: rgba(6, 78, 59, 0.5);
  --theme-bg-input: rgba(0, 0, 0, 0.4);

  /* Text Colors */
  --theme-text-primary: #ecfdf5;
  --theme-text-secondary: #6ee7b7;
  --theme-text-muted: #34d399;

  /* Border Colors */
  --theme-border: rgba(16, 185, 129, 0.2);
  --theme-border-hover: rgba(16, 185, 129, 0.5);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(16, 185, 129, 0.05) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(16, 185, 129, 0.4);
  --theme-shadow-glow-sm: 0 0 10px rgba(16, 185, 129, 0.25);

  /* Navbar */
  --theme-navbar-bg: rgba(6, 78, 59, 0.85);
}

/* === THEME 6: LIGHT MODE === */
[data-theme="light-mode"] {
  /* Primary Colors */
  --theme-primary: #2563eb;
  --theme-primary-light: #3b82f6;
  --theme-primary-dark: #1d4ed8;
  --theme-primary-rgb: 37, 99, 235;

  /* Background Colors */
  --theme-bg-primary: #f8fafc;
  --theme-bg-secondary: #f1f5f9;
  --theme-bg-tertiary: #e2e8f0;
  --theme-bg-card: rgba(255, 255, 255, 0.8);
  --theme-bg-input: rgba(255, 255, 255, 0.9);

  /* Text Colors */
  --theme-text-primary: #1e293b;
  --theme-text-secondary: #475569;
  --theme-text-muted: #64748b;

  /* Border Colors */
  --theme-border: rgba(37, 99, 235, 0.15);
  --theme-border-hover: rgba(37, 99, 235, 0.3);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --theme-gradient-bg: radial-gradient(
    circle at 20% 30%,
    rgba(37, 99, 235, 0.03) 0%,
    transparent 40%
  );

  /* Shadows */
  --theme-shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);
  --theme-shadow-glow-sm: 0 0 10px rgba(37, 99, 235, 0.1);

  /* Navbar */
  --theme-navbar-bg: rgba(255, 255, 255, 0.9);

  /* Override accent colors for better visibility */
  --theme-success: #16a34a;
  --theme-error: #dc2626;
  --theme-warning: #ca8a04;
  --theme-info: #2563eb;
}

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

/* Body */
body.dashboard {
  background: var(--theme-bg-primary);
  color: var(--theme-text-primary);
}

/* Animated Background */
.dashboard::before {
  background:
    var(--theme-gradient-bg),
    radial-gradient(
      circle at 80% 70%,
      rgba(var(--theme-primary-rgb), 0.02) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(var(--theme-primary-rgb), 0.015) 0%,
      transparent 40%
    );
}

/* Navbar */
.navbar {
  background: var(--theme-navbar-bg);
  border-bottom-color: var(--theme-border);
}

.navbar-brand {
  color: var(--theme-primary);
}

.navbar-brand i {
  filter: drop-shadow(0 0 10px rgba(var(--theme-primary-rgb), 0.5));
}

.navbar-link,
.navbar-btn {
  color: var(--theme-text-secondary);
}

.navbar-link:hover,
.navbar-btn:hover {
  color: var(--theme-primary-light);
  background: rgba(var(--theme-primary-rgb), 0.05);
  border-color: rgba(var(--theme-primary-rgb), 0.2);
}

.navbar-btn.primary {
  background: var(--theme-gradient-primary);
  color: var(--theme-bg-primary);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.2);
}

.navbar-btn.primary:hover {
  box-shadow: 0 6px 16px rgba(var(--theme-primary-rgb), 0.3);
}

/* Menu Toggle */
.menu-toggle {
  color: var(--theme-primary);
}

.menu-toggle:hover {
  background: rgba(var(--theme-primary-rgb), 0.1);
}

/* Dashboard Header */
.dashboard-title {
  background: var(--theme-gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
}

.dashboard-subtitle {
  color: var(--theme-text-secondary);
}

.logo-section img {
  filter: drop-shadow(0 0 30px rgba(var(--theme-primary-rgb), 0.4));
}

/* Checker Section */
.checker-section {
  background: var(--theme-bg-card);
  border-color: var(--theme-border);
  box-shadow: var(--shadow-xl), var(--theme-shadow-glow-sm);
}

.checker-section:hover {
  border-color: var(--theme-border-hover);
  box-shadow: var(--shadow-2xl), var(--theme-shadow-glow);
}

/* Input Area */
.input-label,
.control-label {
  color: var(--theme-primary-light);
}

.input-textarea {
  background: var(--theme-bg-input);
  border-color: rgba(var(--theme-primary-rgb), 0.2);
  color: var(--theme-text-primary);
}

.input-textarea::placeholder {
  color: var(--theme-text-muted);
}

.input-textarea:hover {
  border-color: rgba(var(--theme-primary-rgb), 0.3);
}

.input-textarea:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}

/* Control Group */
.control-group {
  background: var(--theme-bg-input);
  border-color: var(--theme-border);
}

/* Select */
.select-wrapper::after {
  color: var(--theme-primary);
}

.custom-select {
  background: var(--theme-bg-input);
  border-color: rgba(var(--theme-primary-rgb), 0.2);
  color: var(--theme-text-primary);
}

.custom-select:hover {
  border-color: rgba(var(--theme-primary-rgb), 0.3);
}

.custom-select:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}

.custom-select option {
  background: var(--theme-bg-secondary);
  color: var(--theme-text-primary);
}

/* Action Buttons */
.action-btn.start {
  background: var(--theme-gradient-primary);
  color: var(--theme-bg-primary);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.3);
}

.action-btn.start:hover {
  box-shadow: 0 6px 16px rgba(var(--theme-primary-rgb), 0.4);
}

/* Stats Section */
.stat-card {
  background: var(--theme-bg-card);
  border-color: var(--theme-border);
}

.stat-card:hover {
  border-color: var(--theme-border-hover);
  box-shadow: var(--shadow-xl), var(--theme-shadow-glow-sm);
}

.stat-icon.gold {
  background: linear-gradient(
    135deg,
    rgba(var(--theme-primary-rgb), 0.2) 0%,
    rgba(var(--theme-primary-rgb), 0.1) 100%
  );
  color: var(--theme-primary-light);
}

.stat-label {
  color: var(--theme-text-secondary);
}

.stat-value {
  color: var(--theme-text-primary);
}

/* Results Section */
.result-card {
  background: var(--theme-bg-card);
  border-color: var(--theme-border);
}

.result-card:hover {
  border-color: var(--theme-border-hover);
  box-shadow: var(--shadow-xl), var(--theme-shadow-glow-sm);
}

.result-item {
  background: var(--theme-bg-input);
  color: var(--theme-text-secondary);
}

.result-item:hover {
  background: var(--theme-bg-tertiary);
}

.empty-state {
  color: var(--theme-text-muted);
}

/* Result Content Scrollbar */
.result-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.result-content::-webkit-scrollbar-thumb {
  background: rgba(var(--theme-primary-rgb), 0.3);
}

.result-content::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--theme-primary-rgb), 0.5);
}

/* Loading Bar */
.loading-bar {
  background: var(--theme-gradient-primary);
}

/* System Messages */
.system-message {
  background: var(--theme-bg-card);
  border-color: var(--theme-border);
}

.system-message.info {
  border-left-color: var(--theme-primary);
}

.system-message.info i {
  color: var(--theme-primary);
}

/* Admin Panel Link */
.admin-link-card {
  background: var(--theme-bg-card);
  border-color: var(--theme-primary);
  box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.1);
}

.admin-link-card:hover {
  box-shadow: 0 8px 30px rgba(var(--theme-primary-rgb), 0.2);
  background: linear-gradient(
    135deg,
    rgba(var(--theme-primary-rgb), 0.05),
    rgba(var(--theme-primary-rgb), 0.02)
  );
}

.admin-link-icon {
  background: var(--theme-gradient-primary);
  box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
}

.admin-link-icon i {
  color: var(--theme-bg-primary);
}

.admin-link-content h3 {
  color: var(--theme-primary);
}

.admin-link-content p {
  color: var(--theme-text-secondary);
}

.admin-link-arrow {
  background: rgba(var(--theme-primary-rgb), 0.1);
}

.admin-link-arrow i {
  color: var(--theme-primary);
}

.admin-link-card:hover .admin-link-arrow {
  background: var(--theme-primary);
}

.admin-link-card:hover .admin-link-arrow i {
  color: var(--theme-bg-primary);
}

/* Maintenance Modal */
.maintenance-modal-content {
  background: linear-gradient(
    135deg,
    var(--theme-bg-secondary) 0%,
    var(--theme-bg-tertiary) 100%
  );
  border-color: rgba(var(--theme-primary-rgb), 0.2);
  box-shadow:
    0 0 60px rgba(var(--theme-primary-rgb), 0.2),
    var(--shadow-2xl);
}

.maintenance-icon {
  background: var(--theme-gradient-primary);
  box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.3);
}

.maintenance-icon i {
  color: var(--theme-bg-primary);
}

.maintenance-modal-content h2 {
  color: var(--theme-primary);
  text-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3);
}

.maintenance-modal-content p {
  color: var(--theme-text-secondary);
}

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

/* Generator Modal */
.generator-modal-content {
  background: linear-gradient(
    135deg,
    var(--theme-bg-secondary) 0%,
    var(--theme-bg-tertiary) 100%
  );
  border-color: rgba(var(--theme-primary-rgb), 0.2);
}

.generator-modal-header {
  border-bottom-color: rgba(var(--theme-primary-rgb), 0.2);
}

.generator-modal-title {
  color: var(--theme-primary);
}

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

.generator-input,
.generator-select {
  background: var(--theme-bg-input);
  border-color: rgba(var(--theme-primary-rgb), 0.2);
  color: var(--theme-text-primary);
}

.generator-input:focus,
.generator-select:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}

.generator-btn-primary {
  background: var(--theme-gradient-primary);
  color: var(--theme-bg-primary);
  box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
}

.generator-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.4);
}

/* === THEME SWITCHER STYLES === */

.theme-switcher {
  position: relative;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px solid var(--theme-border);
  color: var(--theme-primary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-toggle-btn:hover {
  background: rgba(var(--theme-primary-rgb), 0.2);
  border-color: var(--theme-border-hover);
  transform: scale(1.05);
}

.theme-toggle-btn i {
  font-size: 1.1rem;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: var(--shadow-xl), var(--theme-shadow-glow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: var(--z-dropdown);
}

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

.theme-dropdown-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.theme-option:hover {
  background: rgba(var(--theme-primary-rgb), 0.05);
}

.theme-option.active {
  background: rgba(var(--theme-primary-rgb), 0.1);
  border-color: var(--theme-primary);
}

.theme-color-preview {
  display: flex;
  gap: 2px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.theme-color-preview span {
  width: 12px;
  height: 24px;
}

.theme-option-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--theme-text-primary);
}

.theme-option-check {
  color: var(--theme-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.theme-option.active .theme-option-check {
  opacity: 1;
}

/* Theme Color Previews */
.theme-option[data-theme="gold-dark"] .theme-color-preview span:nth-child(1) {
  background: #ffd700;
}
.theme-option[data-theme="gold-dark"] .theme-color-preview span:nth-child(2) {
  background: #171717;
}
.theme-option[data-theme="gold-dark"] .theme-color-preview span:nth-child(3) {
  background: #0a0a0a;
}

.theme-option[data-theme="cyber-purple"]
  .theme-color-preview
  span:nth-child(1) {
  background: #a855f7;
}
.theme-option[data-theme="cyber-purple"]
  .theme-color-preview
  span:nth-child(2) {
  background: #1a1625;
}
.theme-option[data-theme="cyber-purple"]
  .theme-color-preview
  span:nth-child(3) {
  background: #0c0a15;
}

.theme-option[data-theme="neon-blue"] .theme-color-preview span:nth-child(1) {
  background: #00d4ff;
}
.theme-option[data-theme="neon-blue"] .theme-color-preview span:nth-child(2) {
  background: #0f172a;
}
.theme-option[data-theme="neon-blue"] .theme-color-preview span:nth-child(3) {
  background: #020617;
}

.theme-option[data-theme="red-fire"] .theme-color-preview span:nth-child(1) {
  background: #ff4d4d;
}
.theme-option[data-theme="red-fire"] .theme-color-preview span:nth-child(2) {
  background: #1a0a0a;
}
.theme-option[data-theme="red-fire"] .theme-color-preview span:nth-child(3) {
  background: #0f0505;
}

.theme-option[data-theme="emerald-green"]
  .theme-color-preview
  span:nth-child(1) {
  background: #10b981;
}
.theme-option[data-theme="emerald-green"]
  .theme-color-preview
  span:nth-child(2) {
  background: #064e3b;
}
.theme-option[data-theme="emerald-green"]
  .theme-color-preview
  span:nth-child(3) {
  background: #022c22;
}

.theme-option[data-theme="light-mode"] .theme-color-preview span:nth-child(1) {
  background: #2563eb;
}
.theme-option[data-theme="light-mode"] .theme-color-preview span:nth-child(2) {
  background: #f1f5f9;
}
.theme-option[data-theme="light-mode"] .theme-color-preview span:nth-child(3) {
  background: #f8fafc;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .theme-dropdown {
    right: -50px;
    min-width: 200px;
  }

  .navbar-menu.active .theme-switcher {
    width: 100%;
  }

  .navbar-menu.active .theme-toggle-btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-3);
  }

  .navbar-menu.active .theme-toggle-btn::after {
    content: "Cambiar Tema";
    margin-left: var(--space-2);
  }

  .navbar-menu.active .theme-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    min-width: 100%;
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Light mode specific overrides */
[data-theme="light-mode"] .navbar-btn.danger {
  color: #dc2626;
}

[data-theme="light-mode"] .navbar-btn.danger:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

[data-theme="light-mode"] .result-item {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light-mode"] .result-item:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light-mode"] .system-message {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-lg);
}

[data-theme="light-mode"] .generator-modal-content,
[data-theme="light-mode"] .maintenance-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

[data-theme="light-mode"] .generator-close-btn {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

[data-theme="light-mode"] .generator-info {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
  color: #16a34a;
}

[data-theme="light-mode"] .generator-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--theme-text-primary);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light-mode"] .generator-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* === GATES STATUS INDICATOR === */

.gates-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

/* Connecting State - Yellow pulsing */
.status-indicator.connecting {
  background: #eab308 !important;
  animation: statusPulse 1.5s ease-in-out infinite;
}

/* Online State - Green */
.status-indicator.online {
  background: #22c55e !important;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5) !important;
  animation: none !important;
}

.status-indicator.online::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.3);
  animation: statusRing 2s ease-out infinite;
}

/* Maintenance State - Orange */
.status-indicator.maintenance {
  background: #f97316 !important;
  animation: statusPulse 1s ease-in-out infinite;
}

/* Offline State - Red */
.status-indicator.offline {
  background: #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
  animation: none !important;
}

.status-text {
  color: var(--theme-text-secondary);
}

/* Status text colors based on state */
.gates-status.online .status-text {
  color: #22c55e;
}

.gates-status.maintenance .status-text {
  color: #f97316;
}

.gates-status.offline .status-text {
  color: #ef4444;
}

.gates-status.connecting .status-text {
  color: #eab308;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes statusRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ============================================
   PLANS MODAL STYLES
   ============================================ */

.plans-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.plans-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.plans-modal {
  background: var(--theme-bg-primary);
  border-radius: 24px;
  border: 1px solid var(--theme-border);
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.plans-modal-overlay.active .plans-modal {
  transform: scale(1) translateY(0);
}

.plans-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.plans-modal-close:hover {
  background: var(--theme-primary);
  color: var(--theme-bg-primary);
  transform: rotate(90deg);
}

.plans-modal-header {
  text-align: center;
  padding: 40px 40px 20px;
}

.plans-modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--theme-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--theme-bg-primary);
  box-shadow: 0 10px 30px rgba(var(--theme-primary-rgb), 0.3);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.plans-modal-title {
  font-size: 2rem;
  font-weight: 700;
  background: var(--theme-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.plans-modal-subtitle {
  color: var(--theme-text-muted);
  font-size: 1rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 40px 40px;
}

/* Plan Card Base */
.plan-card {
  background: var(--theme-bg-secondary);
  border-radius: 20px;
  border: 2px solid var(--theme-border);
  padding: 30px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-8px);
  border-color: var(--theme-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--theme-bg-secondary);
  border: 2px solid var(--theme-border);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--theme-text-secondary);
}

.plan-ribbon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.plan-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(var(--theme-primary-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  font-size: 1.5rem;
  color: var(--theme-primary);
}

.plan-name {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 15px;
}

.plan-price {
  text-align: center;
  margin-bottom: 25px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.plan-price .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--theme-primary);
  margin-top: 8px;
}

.plan-price .amount {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: var(--theme-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-price .period {
  font-size: 1rem;
  color: var(--theme-text-muted);
  align-self: flex-end;
  margin-bottom: 8px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
  flex-grow: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--theme-border);
  color: var(--theme-text-primary);
  font-size: 0.95rem;
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li i {
  width: 20px;
  text-align: center;
  color: var(--theme-primary);
}

.plan-features li.disabled {
  color: var(--theme-text-muted);
  opacity: 0.6;
}

.plan-features li.disabled i {
  color: var(--theme-text-muted);
}

.plan-features li strong {
  color: var(--theme-primary);
}

.plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--theme-bg-tertiary);
  border: 2px solid var(--theme-border);
  color: var(--theme-text-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.plan-btn:hover {
  background: var(--theme-gradient-primary);
  border-color: transparent;
  color: var(--theme-bg-primary);
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(var(--theme-primary-rgb), 0.3);
}

/* Featured Plan */
.plan-card.featured {
  border-color: var(--theme-primary);
  background: linear-gradient(
    145deg,
    var(--theme-bg-secondary) 0%,
    rgba(var(--theme-primary-rgb), 0.05) 100%
  );
  transform: scale(1.02);
}

.plan-card.featured .plan-badge {
  background: var(--theme-gradient-primary);
  border-color: transparent;
  color: var(--theme-bg-primary);
}

.plan-card.featured:hover {
  transform: scale(1.02) translateY(-8px);
}

.plan-card.featured .plan-btn {
  background: var(--theme-gradient-primary);
  border-color: transparent;
  color: var(--theme-bg-primary);
}

.plan-card.featured .plan-btn:hover {
  box-shadow: 0 15px 35px rgba(var(--theme-primary-rgb), 0.4);
}

/* Elite Plan */
.plan-card.elite {
  border-color: #a855f7;
  background: linear-gradient(
    145deg,
    var(--theme-bg-secondary) 0%,
    rgba(168, 85, 247, 0.05) 100%
  );
}

.plan-card.elite .plan-badge {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-color: transparent;
  color: white;
}

.plan-card.elite .plan-icon {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.plan-card.elite .plan-price .currency,
.plan-card.elite .plan-features li i:not(.fa-times),
.plan-card.elite .plan-features li strong {
  color: #a855f7;
}

.plan-card.elite .plan-price .amount {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-card.elite .plan-btn {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-color: transparent;
  color: white;
}

.plan-card.elite .plan-btn:hover {
  box-shadow: 0 15px 35px rgba(168, 85, 247, 0.4);
}

.plans-modal-footer {
  text-align: center;
  padding: 20px 40px 30px;
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-muted);
  font-size: 0.95rem;
}

.plans-modal-footer a {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 600;
}

.plans-modal-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .plans-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .plan-card.featured {
    transform: scale(1);
    order: -1;
  }

  .plan-card.featured:hover {
    transform: translateY(-8px);
  }

  .plans-modal-header {
    padding: 30px 20px 15px;
  }

  .plans-modal-title {
    font-size: 1.5rem;
  }

  .plans-modal-footer {
    padding: 15px 20px 20px;
  }
}

/* Light Mode overrides for Plans Modal */
[data-theme="light-mode"] .plans-modal {
  background: #f8fafc;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

[data-theme="light-mode"] .plans-modal-title {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light-mode"] .plans-modal-subtitle {
  color: #64748b;
}

[data-theme="light-mode"] .plans-modal-icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

[data-theme="light-mode"] .plans-modal-close {
  background: white;
  border-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light-mode"] .plans-modal-close:hover {
  background: #2563eb;
  color: white;
}

[data-theme="light-mode"] .plan-card {
  background: white;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light-mode"] .plan-card:hover {
  border-color: #2563eb;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light-mode"] .plan-badge {
  background: white;
  border-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light-mode"] .plan-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

[data-theme="light-mode"] .plan-name {
  color: #1e293b;
}

[data-theme="light-mode"] .plan-price .currency {
  color: #2563eb;
}

[data-theme="light-mode"] .plan-price .amount {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light-mode"] .plan-price .period {
  color: #64748b;
}

[data-theme="light-mode"] .plan-features li {
  color: #334155;
  border-color: #e2e8f0;
}

[data-theme="light-mode"] .plan-features li i {
  color: #2563eb;
}

[data-theme="light-mode"] .plan-features li strong {
  color: #2563eb;
}

[data-theme="light-mode"] .plan-features li.disabled {
  color: #94a3b8;
}

[data-theme="light-mode"] .plan-features li.disabled i {
  color: #cbd5e1;
}

[data-theme="light-mode"] .plan-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

[data-theme="light-mode"] .plan-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

[data-theme="light-mode"] .plan-card.featured {
  border-color: #2563eb;
  background: linear-gradient(145deg, white 0%, rgba(37, 99, 235, 0.03) 100%);
}

[data-theme="light-mode"] .plan-card.featured .plan-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

[data-theme="light-mode"] .plan-card.featured .plan-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

[data-theme="light-mode"] .plans-modal-footer {
  border-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light-mode"] .plans-modal-footer a {
  color: #2563eb;
}

/* Light Mode Theme Switcher (Navbar) */
[data-theme="light-mode"] .theme-toggle-btn {
  background: white !important;
  border-color: #e2e8f0 !important;
  color: #2563eb !important;
}

[data-theme="light-mode"] .theme-toggle-btn:hover {
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

[data-theme="light-mode"] .theme-dropdown {
  background: white !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light-mode"] .theme-dropdown-title {
  color: #64748b !important;
}

[data-theme="light-mode"] .theme-option {
  color: #334155 !important;
}

[data-theme="light-mode"] .theme-option:hover {
  background: #f1f5f9 !important;
}

[data-theme="light-mode"] .theme-option.active {
  background: #2563eb !important;
  color: white !important;
}

[data-theme="light-mode"] .theme-option-name {
  color: inherit !important;
}

/* ============================================
   SELLERS MODAL STYLES
   ============================================ */

.sellers-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.sellers-modal.open {
  display: block;
}

.sellers-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.sellers-modal-card {
  position: relative;
  width: min(560px, calc(100% - 30px));
  margin: 90px auto 0 auto;
  background: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sellers-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 14px 20px;
  border-bottom: 1px solid var(--theme-border);
}

.sellers-modal-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sellers-modal-title > i {
  margin-top: 4px;
  color: var(--theme-primary);
  font-size: 1.3rem;
}

.sellers-modal-title h3 {
  margin: 0;
  color: var(--theme-text-primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.sellers-modal-title p {
  margin: 4px 0 0 0;
  color: var(--theme-text-muted);
  font-size: 0.85rem;
}

.sellers-modal-close {
  border: 0;
  background: transparent;
  color: var(--theme-text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sellers-modal-close:hover {
  color: var(--theme-text-primary);
  background: rgba(var(--theme-primary-rgb), 0.1);
}

.sellers-modal-body {
  padding: 16px 20px 20px 20px;
}

.seller-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--theme-border);
  background: rgba(var(--theme-primary-rgb), 0.03);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.seller-row:hover {
  border-color: var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.08);
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--theme-primary-rgb), 0.1);
  color: var(--theme-primary);
  overflow: hidden;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-info {
  flex: 1;
  min-width: 0;
}

.seller-name {
  color: var(--theme-text-primary);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-meta {
  color: var(--theme-text-muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.seller-actions {
  display: flex;
  align-items: center;
}

.seller-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--theme-text-primary);
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px solid var(--theme-border);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.seller-buy:hover {
  background: var(--theme-gradient-primary);
  border-color: transparent;
  color: var(--theme-bg-primary);
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
}

.sellers-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.sellers-note strong {
  color: var(--theme-text-primary);
}

/* ============================================
   BOTTOM ACTIONS STYLES
   ============================================ */

.bottom-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 16px;
  z-index: 999;
  pointer-events: none;
}

.bottom-link {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-bg-secondary);
  color: var(--theme-text-secondary);
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 500;
}

.bottom-link:hover {
  color: var(--theme-text-primary);
  border-color: var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bottom-link i {
  color: var(--theme-primary);
  font-size: 1rem;
}

/* Light Mode overrides for Sellers Modal */
[data-theme="light-mode"] .sellers-modal-card {
  background: #ffffff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

[data-theme="light-mode"] .seller-row {
  background: #f8fafc;
}

[data-theme="light-mode"] .seller-row:hover {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="light-mode"] .seller-buy:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

[data-theme="light-mode"] .bottom-link {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light-mode"] .bottom-link:hover {
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 600px) {
  .sellers-modal-card {
    margin: 60px auto 0 auto;
  }

  .bottom-actions {
    bottom: 15px;
    gap: 10px;
  }

  .bottom-link {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .bottom-link span {
    display: none;
  }
}
