/* Theme Toggle Styles */
.theme-toggle {
  position: fixed;
  top: 0.25rem;
  right: 2rem;
  z-index: 1001;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Light mode overrides */
body.light-mode {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #6d28d9;
  --accent-2: #0891b2;
}

body.light-mode {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

body.light-mode .blob {
  background: radial-gradient(
    circle at center,
    rgba(109, 40, 217, 0.12) 0%,
    rgba(8, 145, 178, 0.08) 50%,
    transparent 100%
  );
}

body.light-mode .card {
  background: #e8e8e8;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.light-mode .badge {
  background: rgba(109,40,217,.12);
  border: 1px solid rgba(109,40,217,.25);
  color: #5b21b6;
}

body.light-mode .pill {
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.12);
  color: var(--text);
}

body.light-mode button,
body.light-mode .btn {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  color: white;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}

body.light-mode button:hover,
body.light-mode .btn:hover {
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.35);
  transform: translateY(-1px);
}

body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background: #ffffff !important;
  border: 1.5px solid rgba(15,23,42,.15) !important;
  color: #475569 !important;
}

body.light-mode input:focus,
body.light-mode textarea:focus,
body.light-mode select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
  background: #ffffff;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #64748b;
}

body.light-mode .service-item {
  background: #f0f0f0;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.light-mode .service-item:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.15), 0 2px 4px rgba(15, 23, 42, 0.08);
  border-color: rgba(109, 40, 217, 0.2);
}

body.light-mode .service-message {
  background: rgba(109, 40, 217, 0.08);
  border-left: 3px solid #6d28d9;
}

body.light-mode .particle {
  background: radial-gradient(circle, rgba(109,40,217,0.4), transparent);
}

body.light-mode footer {
  border-top: 1px solid rgba(15,23,42,.12);
  background: rgba(226, 232, 240, 0.5);
}

body.light-mode .navbar-menu a {
  color: var(--muted);
}

body.light-mode .navbar-menu a:hover {
  color: var(--text);
}

body.light-mode .navbar-logo {
  color: var(--text);
  font-weight: 700;
}

body.light-mode .navbar-menu {
  background: rgba(255, 255, 255, 0.98);
}

/* H1 text outline for better visibility in light mode */
body.light-mode h1 {
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  -webkit-text-stroke: 0.3px rgba(15, 23, 42, 0.2);
}

/* Admin panel light mode */
body.light-mode .header {
  color: var(--text);
}

body.light-mode .stat-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.light-mode .table-container {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Status page light mode improvements */
body.light-mode .status-badge-large {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body.light-mode .status-operational {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.3);
  color: #15803d;
}

body.light-mode .status-degraded {
  background: rgba(251, 191, 36, 0.1);
  border: 2px solid rgba(251, 191, 36, 0.4);
  color: #b45309;
}

body.light-mode .status-outage {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #b91c1c;
}

body.light-mode table th {
  background: rgba(124,58,237,.1);
  border-bottom: 1px solid rgba(15,23,42,.15);
}

body.light-mode table td {
  border-bottom: 1px solid rgba(15,23,42,.08);
}

body.light-mode tr:hover {
  background: rgba(124,58,237,.05);
}

body.light-mode .navbar-menu {
  background: rgba(255, 255, 255, 0.98);
}

body.light-mode .accordion {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body.light-mode .accordion:hover {
  border-color: rgba(15,23,42,.18);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

body.light-mode .accordion-header:hover {
  background: rgba(109,40,217,.03);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    top: 1rem;
    right: 4.5rem;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  /* Fix form inputs overflowing on mobile */
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  textarea,
  select {
    width: 100% !important;
    margin-left: 0 !important;
    max-width: 100% !important;
  }
}
