:root {
  /* Light theme variables */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-overlay: rgba(255, 255, 255, 0.9);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-navbar: linear-gradient(135deg, #112250 0%, #1a3a6b 100%);
  --bg-button: #E4B55D;
  
  --text-primary: #112250;
  --text-secondary: #495057;
  --text-accent: #E4B55D;
  --text-light: #6c757d;
  
  --border-primary: #dee2e6;
  --border-accent: #E4B55D;
  --border-card: rgba(228, 181, 93, 0.3);
  
  --shadow-primary: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  /* Dark theme variables */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2d2d2d;
  --bg-overlay: rgba(0, 0, 0, 0.9);
  --bg-card: rgba(45, 45, 45, 0.95);
  --bg-navbar: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  --bg-button: #E4B55D;
  
  --text-primary: #ffffff;
  --text-secondary: #e9ecef;
  --text-accent: #E4B55D;
  --text-light: #adb5bd;
  
  --border-primary: #404040;
  --border-accent: #E4B55D;
  --border-card: rgba(228, 181, 93, 0.4);
  
  --shadow-primary: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Theme toggle button styles */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background: var(--bg-button);
  color: var(--text-primary);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-hover);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
  background: var(--text-accent);
  color: var(--bg-primary);
}

.theme-toggle .icon {
  transition: var(--transition);
}

.theme-toggle[data-theme="dark"] .icon {
  transform: rotate(180deg);
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Apply theme variables to common elements */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.navbar {
  background: var(--bg-navbar);
  box-shadow: var(--shadow-primary);
}

.card, .clinician-card {
  background: var(--bg-card);
  border-color: var(--border-card);
  box-shadow: var(--shadow-card);
}

.card:hover, .clinician-card:hover {
  box-shadow: var(--shadow-hover);
}

/* Override specific styles for Index.html background */
body[data-theme="light"] {
  background-color: #f8f9fa;
}

body[data-theme="dark"] {
  background-color: #000000;
}

/* Responsive adjustments for theme toggle */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }
}
