:root {
  --primary-color: #1a56db;
  --secondary-color: #e2e8f0;
  --accent-color: #f59e0b;
  --text-color: #1a202c;
  --light-text: #718096;
  --background: #ffffff;
  --light-background: #f7fafc;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --error-color: #ef4444;
  --rating-gold: #ffb400;
  
  /* Difficulty colors - muted versions for default state */
  --difficulty-very-easy-muted: #a7c7bd;
  --difficulty-easy-muted: #b8d4c7;
  --difficulty-medium-muted: #d4c5a0;
  --difficulty-hard-muted: #d4b8b8;
  --difficulty-very-hard-muted: #d4a5a5;
  
  /* Difficulty colors - bright versions for hover */
  --difficulty-very-easy: #10b981;
  --difficulty-easy: #34d399;
  --difficulty-medium: #fbbf24;
  --difficulty-hard: #f87171;
  --difficulty-very-hard: #ef4444;
}

/* Brand highlight animation */
.brand-highlight {
  color: var(--accent-color) !important;
  font-weight: 700 !important;
  animation: brandGlow 3s ease-in-out infinite !important;
  display: inline-block !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.2) !important;
  transition: all 0.4s ease !important;
  position: relative !important;
}

.brand-highlight:hover {
  transform: translateY(-1px) !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

@keyframes brandGlow {
  0%, 100% {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  }
  50% {
    color: var(--rating-gold);
    text-shadow: 0 0 12px rgba(255, 180, 0, 0.3);
  }
}

/* Dark mode brand highlight */
body.dark-mode .brand-highlight {
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4) !important;
  animation: brandGlowDark 3s ease-in-out infinite !important;
}

body.dark-mode .brand-highlight:hover {
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6) !important;
}

@keyframes brandGlowDark {
  0%, 100% {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
  }
  50% {
    color: #fcd34d;
    text-shadow: 0 0 15px rgba(252, 211, 77, 0.5);
  }
}

/* Responsive brand-highlight coordination */
@media (max-width: 768px) {
  .brand-highlight {
    font-size: 1.3rem !important;
  }
}

@media (max-width: 480px) {
  .brand-highlight {
    font-size: 1.2rem !important;
  }
}

/* Difficulty Bar Styles */
.difficulty-bar-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.difficulty-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--light-text);
  margin-top: 0.1rem;
  width: 150px;
  max-width: 100%;
}

.difficulty-bar {
  position: relative;
  height: 20px;
  width: 150px;
  max-width: 100%;
  background-color: var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.difficulty-bar input {
  display: none;
}

.difficulty-segments {
  display: flex;
  height: 100%;
  position: relative;
}

.difficulty-segments label {
  flex: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.difficulty-segments label:last-child {
  border-right: none;
}

.difficulty-segments label:hover {
  z-index: 2;
}

/* Default segment colors - muted difficulty colors */
.difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy-muted);
}

.difficulty-segments label[data-level="2"] {
  background-color: var(--difficulty-easy-muted);
}

.difficulty-segments label[data-level="3"] {
  background-color: var(--difficulty-medium-muted);
}

.difficulty-segments label[data-level="4"] {
  background-color: var(--difficulty-hard-muted);
}

.difficulty-segments label[data-level="5"] {
  background-color: var(--difficulty-very-hard-muted);
}

/* Progressive hover effects - light up current and all previous segments */

/* Hover level 1 */
.difficulty-segments label[data-level="1"]:hover {
  background-color: var(--difficulty-very-easy) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

/* Hover level 2 */
.difficulty-segments label[data-level="2"]:hover {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="2"]:hover) label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

/* Hover level 3 */
.difficulty-segments label[data-level="3"]:hover {
  background-color: var(--difficulty-medium) !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="3"]:hover) label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="3"]:hover) label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

/* Hover level 4 */
.difficulty-segments label[data-level="4"]:hover {
  background-color: var(--difficulty-hard) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="4"]:hover) label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="4"]:hover) label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="4"]:hover) label[data-level="3"] {
  background-color: var(--difficulty-medium) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

/* Hover level 5 */
.difficulty-segments label[data-level="5"]:hover {
  background-color: var(--difficulty-very-hard) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="5"]:hover) label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="5"]:hover) label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="5"]:hover) label[data-level="3"] {
  background-color: var(--difficulty-medium) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

.difficulty-segments:has(label[data-level="5"]:hover) label[data-level="4"] {
  background-color: var(--difficulty-hard) !important;
  transform: scale(1.02) !important;
  opacity: 1 !important;
}

/* Selected state - progressive fill effect with bright colors */

/* Reset all to muted when something is selected */
.difficulty-bar input:checked ~ .difficulty-segments label {
  opacity: 1;
  transform: scale(1);
}

/* Level 1 selected */
.difficulty-bar input[value="1"]:checked ~ .difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

/* Level 2 selected */
.difficulty-bar input[value="2"]:checked ~ .difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="2"]:checked ~ .difficulty-segments label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

/* Level 3 selected */
.difficulty-bar input[value="3"]:checked ~ .difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="3"]:checked ~ .difficulty-segments label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="3"]:checked ~ .difficulty-segments label[data-level="3"] {
  background-color: var(--difficulty-medium) !important;
  transform: scale(1.02);
  z-index: 1;
}

/* Level 4 selected */
.difficulty-bar input[value="4"]:checked ~ .difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="4"]:checked ~ .difficulty-segments label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="4"]:checked ~ .difficulty-segments label[data-level="3"] {
  background-color: var(--difficulty-medium) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="4"]:checked ~ .difficulty-segments label[data-level="4"] {
  background-color: var(--difficulty-hard) !important;
  transform: scale(1.02);
  z-index: 1;
}

/* Level 5 selected */
.difficulty-bar input[value="5"]:checked ~ .difficulty-segments label[data-level="1"] {
  background-color: var(--difficulty-very-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="5"]:checked ~ .difficulty-segments label[data-level="2"] {
  background-color: var(--difficulty-easy) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="5"]:checked ~ .difficulty-segments label[data-level="3"] {
  background-color: var(--difficulty-medium) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="5"]:checked ~ .difficulty-segments label[data-level="4"] {
  background-color: var(--difficulty-hard) !important;
  transform: scale(1.02);
  z-index: 1;
}

.difficulty-bar input[value="5"]:checked ~ .difficulty-segments label[data-level="5"] {
  background-color: var(--difficulty-very-hard) !important;
  transform: scale(1.02);
  z-index: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .difficulty-bar {
    height: 20px;
    width: 140px;
  }
  
  .difficulty-labels {
    font-size: 0.7rem;
    width: 140px;
  }
}

@media (max-width: 480px) {
  .difficulty-bar {
    height: 20px;
    width: 130px;
  }
  
  .difficulty-labels {
    font-size: 0.65rem;
    width: 130px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .difficulty-labels span {
    font-size: 0.65rem;
    text-align: center;
  }
}

body {
  font-family: 'Frank Ruhl Libre', 'Assistant', sans-serif;
  color: var(--text-color);
  background-color: var(--light-background);
  margin: 0;
  padding: 0;
}

/* Import Hebrew fonts */
@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;700&family=Assistant:wght@400;600;700&display=swap');

/* Responsive container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Authentication Styles */
.auth-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 100px;
  min-height: 36px;
  justify-content: center;
}

.auth-button.auth-loading {
  pointer-events: none;
}

/* Auth loading spinner */
.auth-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: authSpin 1s linear infinite;
}

@keyframes authSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-btn, .logout-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.login-btn:hover, .logout-btn:hover {
  background-color: #1649b8;
}

/* User Menu Dropdown Styles */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-email {
  font-size: 0.8rem;
  color: var(--light-text);
  margin-left: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.user-menu:hover .user-email {
  background-color: rgba(26, 86, 219, 0.1);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.profile-link:hover {
  background-color: var(--light-background);
}

.user-dropdown .logout-btn {
  width: 100%;
  text-align: right;
  border-radius: 0 0 6px 6px;
  margin: 0;
  border-top: none;
}

/* Mobile User Menu Styles */
.mobile-user-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.mobile-user-info {
  font-size: 0.8rem;
  color: var(--light-text);
  text-align: center;
  padding: 0.5rem;
  background-color: var(--light-background);
  border-radius: 4px;
}

.mobile-profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--secondary-color);
  border-radius: 4px;
  transition: background-color 0.2s;
  line-height: 1;
  box-sizing: border-box;
}

.mobile-profile-link:hover {
  background-color: var(--border-color);
}

.mobile-user-menu .logout-btn {
  width: 100%;
  margin-top: 0;
}

/* Authentication Modal */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}

.auth-modal-content {
  background-color: var(--background);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 90%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin: 0 auto;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.auth-modal-header h2 {
  margin: 0;
  color: var(--text-color);
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-text);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-close:hover {
  color: var(--text-color);
}

.auth-modal-body {
  padding: 1.5rem;
}

.auth-modal-body p {
  margin-bottom: 1rem;
  color: var(--light-text);
  line-height: 1.5;
}

.google-sign-in-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 1.5rem;
}

.google-sign-in-btn:hover {
  background-color: #3367d6;
}

.google-sign-in-btn img {
  background-color: white;
  padding: 2px;
  border-radius: 2px;
}

.auth-benefits {
  background-color: var(--light-background);
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.auth-benefits h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-size: 1rem;
}

.auth-benefits ul {
  margin: 0;
  padding-right: 1.5rem;
}

.auth-benefits li {
  margin-bottom: 0.25rem;
  color: var(--light-text);
  font-size: 0.9rem;
}

/* Modern Header styling */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.main-header:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
  font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--primary-color), #1649b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-image {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.1);
}

.logo::before {
  content: "";
  background-image: url('../images/yellow-ribbon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

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


.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  gap: 0.5rem;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Assistant', sans-serif;
  letter-spacing: 0.25px;
}

.main-nav a:hover {
  color: var(--primary-color);
  background-color: rgba(26, 86, 219, 0.08);
  transform: translateY(-1px);
}

.main-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), #3b82f6);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav a:hover::before {
  width: 80%;
}

/* Special styling for auth button in nav */
.main-nav .auth-button {
  margin-right: 0.5rem;
}

.main-nav .login-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(26, 86, 219, 0.2);
}

.main-nav .login-btn:hover {
  background: linear-gradient(135deg, #1649b8 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 86, 219, 0.3);
}

.main-nav .logout-btn {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.main-nav .logout-btn:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  transform: translateY(-1px);
}

.main-nav .user-email {
  font-size: 0.8rem;
  color: var(--light-text);
  margin-left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(26, 86, 219, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(26, 86, 219, 0.1);
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background-color: var(--background);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  padding: 2rem 0;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.mobile-menu-header .logo {
  font-size: 1.2rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-nav {
  padding: 0;
}

.mobile-menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-nav li {
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s;
}

.mobile-menu-nav a:hover {
  background-color: var(--light-background);
}

.mobile-menu-auth {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.mobile-menu-auth .login-btn,
.mobile-menu-auth .logout-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mobile-menu-auth .login-btn:hover,
.mobile-menu-auth .logout-btn:hover {
  background-color: #1649b8;
}

.mobile-menu-auth .user-email {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--light-text);
  text-align: center;
  margin-bottom: 1rem;
}

/* Mobile Navigation - Extended to tablets/iPads */
@media (max-width: 1024px) {
  .main-header {
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    flex-direction: row;
  }
  
  .logo {
    font-size: 1.8rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu,
  .mobile-menu-overlay {
    display: block;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 0.75rem 1rem;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
  }
  
  .logo {
    font-size: 1.6rem;
  }
  
  .mobile-menu {
    width: 100%;
    right: -100%;
  }
  
  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Hero section */
.hero-search {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--background);
  margin-bottom: 2rem;
}

.hero-search h1 {
  font-size: 2rem;
  margin-bottom: 0.2rem;
  color: var(--text-color);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.highlight-number {
  font-size: 1.4em;
  font-weight: 700;
  color: #fbbf24;
}

.hero-logo {
  margin-bottom: 0.2rem;
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-logo {
  max-height: 500px;
  max-width: 500px;
  height: auto;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.main-logo:hover {
  transform: scale(1.05);
}

/* Search bar styling */
.search-container {
  display: flex;
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Search suggestions dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-suggestions.show {
  display: block;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
  text-align: right;
  direction: rtl;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background-color: var(--light-background);
}

.suggestion-name {
  font-weight: 600;
  color: var(--text-color);
  text-align: right;
  direction: rtl;
  width: 100%;
  padding-right: 0;
  margin-right: 0;
}

.suggestion-details {
  font-size: 0.9rem;
  color: var(--light-text);
  text-align: right;
}

.suggestion-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.suggestion-stars {
  color: var(--rating-gold);
}

.no-results {
  padding: 1rem;
  text-align: center;
  color: var(--light-text);
  font-style: italic;
}

.search-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: bold;
}

/* Advanced filters */
.advanced-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.advanced-filters select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Professor cards section */
.top-professors {
  padding: 2rem 1rem;
}

@media (max-width: 480px) {
  .top-professors {
    padding: 1.5rem 0.5rem;
  }
  
  .top-professors h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}

.top-professors h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.professors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Professor card styling */
.professor-card {
  background-color: var(--background);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.professor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


.professor-card h3 {
  margin: 0.5rem 0;
}

.professor-card p {
  color: var(--light-text);
  margin-bottom: 1rem;
}

/* Rating stars */
.stars {
  color: var(--rating-gold);
  font-size: 1.25rem;
  letter-spacing: 2px;
}

/* Autocomplete and Search Suggestions */
.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-suggestions,
.professor-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-suggestions.show,
.professor-suggestions.show {
  display: block;
}

.suggestion-item,
.professor-suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.suggestion-item:last-child,
.professor-suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted,
.professor-suggestion-item:hover,
.professor-suggestion-item.highlighted {
  background-color: var(--light-background);
}

.suggestion-name,
.professor-suggestion-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.suggestion-details,
.professor-suggestion-details {
  font-size: 0.9rem;
  color: var(--light-text);
}

.suggestion-rating {
  text-align: left;
  font-size: 0.9rem;
}

.suggestion-stars {
  color: var(--rating-gold);
  margin-left: 0.5rem;
}

.no-results {
  padding: 1rem;
  text-align: center;
  color: var(--light-text);
  font-style: italic;
}

/* Professor search wrapper for add-review page */
.professor-search-wrapper {
  position: relative;
}

/* About Platform Section Styles */
.about-platform {
  padding: 3rem 1rem;
  background: var(--light-background);
  margin: 2rem 0;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
}

.about-content h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2rem;
}

.about-content > p {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Platform Stats */
.platform-stats {
  margin: 3rem 0;
  text-align: center;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  background: var(--background);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--light-text);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Features Section */
.features-section {
  margin: 5rem 0;
}

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.feature-item {
  background: var(--background);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.feature-item p {
  color: var(--light-text);
  line-height: 1.6;
}

/* Universities Section */
.universities-section {
  margin: 5rem 0;
}

.universities-section > p {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.universities-list-clean {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.uni-group {
  background: var(--background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.uni-group h4 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid var(--light-background);
  padding-bottom: 0.5rem;
}

.uni-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.uni-group li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-background);
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-right: 1.5rem;
}

.uni-group li:last-child {
  border-bottom: none;
}

.uni-group li:before {
  content: "🎓";
  position: absolute;
  right: 0;
  top: 0.75rem;
}

/* How It Works Section */
.how-works-section {
  margin: 5rem 0;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.step-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.step-item p {
  color: var(--light-text);
  line-height: 1.5;
}

/* In-Content Ad Styling */
.ad-in-content {
  margin: 3rem auto;
  max-width: 728px;
  text-align: center;
  padding: 1rem;
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--background);
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
  /* Grid layouts */
  .professors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Hero section mobile */
  .hero-search {
    padding: 2.5rem 1rem;
  }
  
  .hero-search h1 {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .main-logo {
    width: 220px;
    height: auto;
  }
  
  .hero-logo {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
  }
  
  .logo-image {
    height: 26px;
  }
  
  /* Enhanced search container for tablet */
  .search-container {
    flex-direction: row;
    margin: 1.5rem auto;
    width: calc(100% - 2rem);
    max-width: 600px;
    gap: 0;
    padding: 0 1rem;
    box-sizing: border-box;
  }
  
  .search-container input {
    border-radius: 8px 0 0 8px;
    border: 2px solid var(--border-color);
    border-right: none;
    margin-bottom: 0;
    min-width: 0;
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-sizing: border-box;
  }
  
  .search-button {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 75px;
    font-size: 0.95rem;
    box-sizing: border-box;
    border: 2px solid var(--primary-color);
    border-left: none;
  }
  
  /* Advanced filters mobile */
  .advanced-filters {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .advanced-filters select {
    width: 100%;
    max-width: 300px;
    font-size: 1rem;
  }
  
  /* Professor cards mobile */
  .professor-card {
    padding: 1rem;
  }
  
  .professor-card h3 {
    font-size: 1.1rem;
  }
  
  .professor-info {
    font-size: 0.9rem;
  }
  
  /* Search suggestions mobile */
  .search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  
  .suggestion-item {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    text-align: right;
  }
  
  .suggestion-name {
    font-size: 0.9rem;
    line-height: 1.3;
    width: 100%;
    text-align: right;
    padding: 0;
    margin: 0;
    direction: rtl;
    display: block;
  }
  
  .suggestion-details {
    font-size: 0.8rem;
    width: 100%;
    text-align: right;
    color: var(--light-text);
  }
  
  .suggestion-rating {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    align-self: flex-start;
    flex-direction: row-reverse;
  }
  
  /* About Platform Mobile */
  .about-platform {
    padding: 2rem 1rem;
  }
  
  .about-content h2 {
    font-size: 1.5rem;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .features-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .universities-list-clean {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .steps-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  /* In-content ads mobile */
  .ad-in-content {
    margin: 2rem auto;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  /* Two column layout instead of single column */
  .professors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  /* Header stays horizontal */
  .main-header {
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    padding: 1rem 0.5rem;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .main-nav li {
    margin: 0.25rem;
  }
  
  .main-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Hero section very mobile */
  .hero-search {
    padding: 1.75rem 0.5rem;
  }
  
  .hero-search h1 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .main-logo {
    width: 180px;
  }
  
  .hero-logo {
    margin-bottom: 1.25rem;
    margin-top: 0.75rem;
  }
  
  /* Enhanced search container for small mobile */
  .search-container {
    margin: 1.25rem auto;
    width: calc(100% - 1rem);
    max-width: 400px;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }
  
  .search-container input {
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    box-sizing: border-box;
    border: 2px solid var(--border-color);
    border-right: none;
  }
  
  .search-button {
    padding: 0.65rem 0.7rem;
    min-width: 70px;
    font-size: 0.9rem;
    box-sizing: border-box;
    border: 2px solid var(--primary-color);
    border-left: none;
  }
  
  /* Container padding */
  .container {
    padding: 0 0.5rem;
  }
  
  /* Modal mobile adjustments */
  .auth-modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .auth-modal-header,
  .auth-modal-body {
    padding: 1rem;
  }
  
  /* Compact professor cards for 2-column layout */
  .professor-card {
    padding: 0.6rem;
  }
  
  .professor-card h3 {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0.25rem 0 0.5rem 0;
    font-weight: 700;
  }
  
  .professor-info {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
    color: var(--light-text);
    line-height: 1.3;
  }
  
  .professor-card .rating {
    display: block;
  }
  
  .professor-card .rating .stars {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }
  
  .professor-card .rating .rating-value {
    font-size: 0.75rem;
    margin-left: 0.3rem;
  }
  
  .professor-card .rating .rating-count {
    font-size: 0.65rem;
    color: var(--light-text);
    display: block;
    margin-top: 0.2rem;
  }
  
  /* About Platform Mobile Small */
  .about-platform {
    padding: 1.5rem 0.5rem;
  }
  
  .about-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }
  
  .about-content > p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .stat-item {
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
  
  .feature-item {
    padding: 1.5rem;
  }
  
  .feature-item h3 {
    font-size: 1.1rem;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .uni-group {
    padding: 1.5rem;
  }
  
  .uni-group h4 {
    font-size: 1rem;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .step-item h3 {
    font-size: 1.1rem;
  }
  
  /* In-content ads mobile small */
  .ad-in-content {
    margin: 1.5rem auto;
    padding: 0.5rem;
  }

  /* Search suggestions for very small screens */
  .suggestion-item {
    padding: 0.6rem 0.75rem;
    gap: 0.2rem;
  }
  
  .suggestion-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    padding: 0;
    margin: 0;
    direction: rtl;
    width: 100%;
    display: block;
  }
  
  .suggestion-details {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  
  .suggestion-rating {
    font-size: 0.75rem;
    gap: 0.15rem;
  }
  
  .suggestion-stars {
    font-size: 0.7rem;
  }
}

/* Touch and Mobile Interaction Improvements */
@media (max-width: 768px) {
  /* Improve touch targets */
  button, 
  .button,
  .btn-primary,
  .btn-secondary,
  a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve form controls for mobile */
  input, 
  select, 
  textarea {
    min-height: 44px;
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  /* Better spacing for touch */
  .main-nav a {
    padding: 0.75rem 1rem;
    margin: 0.25rem;
  }
  
  /* Improve dropdown touch interaction */
  .advanced-filters select {
    padding: 1rem;
    border-radius: 8px;
  }
  
  /* Better touch feedback */
  .professor-card,
  .university-card,
  .course-card,
  .review-card {
    cursor: pointer;
    transition: transform 0.1s ease;
  }
  
  .professor-card:active,
  .university-card:active,
  .course-card:active,
  .review-card:active {
    transform: scale(0.98);
  }
}

/* Accessibility and readability improvements */
@media (max-width: 480px) {
  /* Improve text readability */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* Better contrast for small screens */
  .professor-card,
  .university-card {
    border: 2px solid var(--border-color);
  }
  
  /* Improve star rating for touch */
  .star-rating input {
    min-width: 30px;
    min-height: 30px;
  }
  
  .star-rating label {
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}




/* ================================
   UNIVERSITIES SECTION STYLES
   ================================ */

.uni-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0,0,0,0.15) !important;
}

.institution-item:hover {
  background: #f8fafc !important;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

@media (max-width: 768px) {
  .universities-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .uni-category-card {
    padding: 1.5rem !important;
  }
  
  .category-header {
    flex-direction: column !important;
    text-align: center !important;
  }
  
  .category-icon {
    margin: 0 0 1rem 0 !important;
  }
  
  .stats-mini-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Dark Mode Support for Universities Section */
body.dark-mode .uni-category-card {
  background: linear-gradient(135deg, var(--light-background) 0%, var(--background) 100%) !important;
  border-right: 4px solid var(--primary-color) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
}

body.dark-mode .uni-category-card:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.4) !important;
}

body.dark-mode .institution-item {
  background: var(--background) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
}

body.dark-mode .institution-item:hover {
  background: var(--light-background) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

body.dark-mode .category-header h3 {
  color: var(--primary-color) !important;
}

body.dark-mode .category-header p {
  color: var(--light-text) !important;
}

/* ================================
   GLOBAL DARK MODE STYLES
   ================================ */

/* Dark mode CSS variables */
body.dark-mode {
  --background: #1a1a1a;
  --light-background: #2d2d2d;
  --text-color: #ffffff;
  --light-text: #a0a0a0;
  --border-color: #404040;
  --secondary-color: #374151;
}

/* Header dark mode */
body.dark-mode .main-header {
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
}

body.dark-mode .main-header .logo {
  color: var(--text-color);
}

body.dark-mode .main-nav a {
  color: var(--text-color);
}

body.dark-mode .main-nav a:hover {
  color: var(--primary-color);
}

body.dark-mode .login-btn {
  background: var(--primary-color);
  color: white;
}

body.dark-mode .mobile-menu {
  background: var(--background);
  border-left: 1px solid var(--border-color);
}

body.dark-mode .mobile-menu .logo {
  color: var(--text-color);
}

body.dark-mode .mobile-menu-nav a {
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

body.dark-mode .mobile-menu-close {
  color: var(--text-color);
}

body.dark-mode .mobile-menu-toggle {
  color: var(--text-color);
}

/* Main content dark mode */
body.dark-mode .hero-section {
  background: var(--background);
}

body.dark-mode .search-container {
  background: var(--light-background);
  border-color: var(--border-color);
}

body.dark-mode .search-input {
  background: var(--background);
  border-color: var(--border-color);
  color: var(--text-color);
}

body.dark-mode .search-input::placeholder {
  color: var(--light-text);
}

body.dark-mode .professor-suggestions {
  background: var(--background);
  border-color: var(--border-color);
}

body.dark-mode .suggestion-item {
  border-bottom-color: var(--border-color);
}

body.dark-mode .suggestion-item:hover {
  background: var(--light-background);
}

/* Professor cards dark mode */
body.dark-mode .professor-card {
  background: var(--background);
  border-color: var(--border-color);
}

body.dark-mode .professor-card:hover {
  border-color: var(--primary-color);
}

/* Footer dark mode */
body.dark-mode footer {
  background: var(--background);
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
}

/* Form elements dark mode */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: var(--background);
  border-color: var(--border-color);
  color: var(--text-color);
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  border-color: var(--primary-color);
}

/* Buttons dark mode */
body.dark-mode .btn-secondary {
  background: var(--secondary-color);
  color: var(--text-color);
}

body.dark-mode .btn-secondary:hover {
  background: #4b5563;
}

/* University cards dark mode */
body.dark-mode .university-card {
  background: var(--background);
  border-color: var(--border-color);
}

body.dark-mode .university-card:hover {
  border-color: var(--primary-color);
}

/* Ad containers dark mode */

/* General content containers */
body.dark-mode .content-section,
body.dark-mode .page-section {
  background: var(--background);
}

/* Tables dark mode */
body.dark-mode table {
  background: var(--background);
}

body.dark-mode th,
body.dark-mode td {
  border-color: var(--border-color);
}

body.dark-mode th {
  background: var(--light-background);
}

/* ================================
   HEADER DARK MODE TOGGLE STYLES
   ================================ */

/* Header right section with logo and dark mode toggle */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Desktop dark mode toggle */
.dark-mode-toggle-container {
  display: flex;
  align-items: center;
}

.dark-mode-toggle-btn {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
}

/* Header specific toggle button */
.dark-mode-toggle-btn.header-toggle {
  margin: 0;
  width: 32px;
  height: 32px;
}

.dark-mode-toggle-btn:hover {
  border-color: var(--primary-color);
  background: var(--primary-color);
}

.dark-mode-toggle-btn:hover .dark-mode-icon {
  filter: brightness(0) invert(1);
}

.dark-mode-icon {
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Dark mode active state */
body.dark-mode .dark-mode-toggle-btn {
  border-color: var(--accent-color);
  background: var(--accent-color);
}

body.dark-mode .dark-mode-toggle-btn .dark-mode-icon {
  filter: brightness(0) invert(1);
}

/* Remove the ::before rule that was causing double icons */

/* Mobile dark mode toggle */
.mobile-dark-mode-toggle {
  border-top: 1px solid var(--border-color);
}

.dark-mode-toggle-btn.mobile {
  background: none;
  border: none;
  width: 100%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-color);
  border-radius: 0;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.dark-mode-toggle-btn.mobile:hover {
  background: var(--light-background);
}

.dark-mode-text {
  font-weight: 600;
}

/* Mobile dark mode in dark mode */
body.dark-mode .dark-mode-toggle-btn.mobile {
  color: var(--text-color);
}

body.dark-mode .dark-mode-toggle-btn.mobile:hover {
  background: var(--light-background);
}

/* Dynamic icon switching */
body.dark-mode .dark-mode-icon {
  font-size: 1rem;
}

body.dark-mode .mobile .dark-mode-icon::after {
  content: ' ☀️';
  margin-right: 0.5rem;
}

/* Simplified mobile text without extra content */

/* Responsive adjustments */
@media (max-width: 768px) {
  .dark-mode-toggle-container {
    display: none;
  }
  
  .header-right .dark-mode-toggle-btn {
    display: none;
  }
}
