/* ===================== */
/* Color Variables */
/* ===================== */
:root {
  --primary-color: #ff5722; /* Orange */
  --secondary-color: #4caf50; /* Green */
  --accent-color: #9c27b0; /* Purple */
  --neutral-light: #f4f4f4; /* Light gray */
  --neutral-dark: #333333; /* Dark gray */
  --neutral-white: #ffffff; /* White */
}


/* ===================== */
/* General Reset & Setup */
/* ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: var(--neutral-light);
  color: var(--neutral-dark);
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Body takes full viewport height */
  text-align: center;
}

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

/* ===================== */
/* Common Typography Styles */
/* ===================== */
h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--neutral-dark);
}

/* Consistent h2 Styles */
h2 {
  font-size: 2rem;
  margin: 0 0 15px 0; /* Consistent margin */
  padding: 0; /* Ensure no padding */
  color: var(--neutral-dark);
  text-align: center; /* Center align all h2 elements */
}

p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--neutral-dark);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--neutral-dark); /* Darker shade of primary color */
}

span {
  font-size: 1.2rem; /* Base font size (14px equivalent) */
  color: var(--neutral-dark); /* Dark text color */
  margin: 4px; /* Small margin between spans */
  padding: 8px 12px; /* Padding inside the span */
  align-items: center; /* Center text vertically */
}

span:hover {
  background-color: var(--neutral-light); /* Light gray on hover */
  transition: background-color 0.3s ease; /* Smooth transition */
}

/* ===================== */
/* Table Styles */
/* ===================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px auto 0; /* 20px top, auto left/right, 0 bottom */
}

table th, table td {
  padding: 12px 15px;
  text-align: center; /* Center-align table content */
  border-bottom: 1px solid var(--neutral-light);
}

table th {
  background-color: var(--neutral-dark);
  color: var(--neutral-white);
  font-weight: bold;
}

table tr:hover {
  background-color: #f5f5f5; /* Light hover effect */
}

#loading {
    display: none;
    font-weight: bold;
}

#message {
    font-weight: bold;
    color: red;
}


/* ===================== */
/* Utility Classes */
/* ===================== */
.cta-button {
  background-color: var(--primary-color);
  color: var(--neutral-white);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  margin-top: 10px;
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
}

.cta-button:hover {
  background-color: var(--primary-color); 
  color: var(--neutral-dark);
  transform: scale(1.05); /* Slight zoom effect */
}

.secondary-button {
  background-color: var(--secondary-color);
  color: var(--neutral-white);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  margin-top: 10px;
}

.secondary-button:hover {
  background-color: var(--primary-color); 
  color: var(--neutral-dark);
}

.highlight {
  background-color: var(--accent-color);
  color: var(--neutral-white);
  padding: 10px 20px;
  border-radius: 5px;
  display: inline-block;
}

/* ===================== */
/* Header Styles */
/* ===================== */
header {
  background-color: var(--neutral-dark);
  color: var(--neutral-white);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  display: flex;
  align-items: center;
  margin-left: 40px; /* Move logo a little more to the right */
}

header .logo img {
  height: 30px; /* Reduced logo size */
  margin-right: 10px;
}


header .logo h1 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--neutral-white);
  letter-spacing: 1px; /* Optional: text-transform: uppercase; */
}

/* Logo Link Styles */
header .logo a {
  display: flex;
  align-items: center;
  text-decoration: none; /* Remove underline */
  color: inherit; /* Inherit text color */
}

header .logo a:hover {
  opacity: 0.8; /* Optional: Add hover effect */
}


header nav {
  margin-right: 40px; /* Equal spacing on the right side */
}

header nav ul {
  list-style: none;
  display: flex;
}

header nav ul li {
  margin-left: 30px; /* Increased spacing between menu items */
  position: relative;
}

header nav ul li a {
  color: var(--neutral-white);
  text-decoration: none;
  padding: 5px 10px;
  display: block;
}


header nav ul li a:hover {
  background-color: var(--primary-color); 
  color: var(--neutral-dark);
  border-radius: 5px;
  transition: background-color 0.3s ease; /* Smooth transition */
}


/* Dropdown Menu Styles */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--neutral-dark);
  padding: 5px;
  border-radius: 5px;
  z-index: 1000;
  text-align: left;
  min-width: 160px; /* Set a minimum width for the dropdown */
  white-space: nowrap; /* Prevent text from wrapping */
}

.dropdown-menu li a {
  padding: 8px 16px; /* Add padding for better spacing */
  display: block;
  color: var(--neutral-white);
  text-decoration: none;
}


.dropdown-menu li a:hover {
  background-color: var(--primary-color); 
  color: var(--neutral-dark);
  border-radius: 5px;
  transition: background-color 0.3s ease; /* Smooth transition */
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--neutral-white);
  font-size: 24px;
  cursor: pointer;
}

/* ===================== */
/* Mobile Navigation */
/* ===================== */


/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--neutral-dark);
    position: absolute;
    top: 60px;
    left: 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    margin: 1px 0; /* Reduced vertical margin */
    padding: 3px 10px; /* Reduced vertical padding */
    text-align: left;
  }

  .dropdown-menu {
    display: none; /* Hide submenu by default */
    position: static; /* Reset position for mobile */
    background-color: var(--neutral-dark);
    padding-left: 20px; /* Indent submenu items */
  }

  .dropdown-menu.active {
    display: block; /* Show submenu when active */
  }

  .dropdown-menu li {
    margin: 1px 0; /* Reduced vertical margin for submenu items */
    padding: 3px 0; /* Reduced vertical padding for submenu items */
  }
}

/* ===================== */
/* Main Content Styles */
/* ===================== */
main {
  flex: 1; /* Takes up remaining space in the body */
  padding: 20px 0;
}

/* Ensure sections have consistent padding */
section {
  padding: 20px 0; /* Consistent padding for all sections */
  text-align: center; /* Center align section content */
}

/* Hero Section */
#hero {
 
}

/* Quiz Section */
#quiz {

}

/* Details Section */
#details {

}

/* Leaderboard Section */
#leaderboard {

}

/* Your Score Section */
#your-score {

}

.score-card {
  background-color: var(--neutral-white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* About Section */
#about {
  text-align: center;
}

/* ===================== */
/* Footer Styles */
/* ===================== */
footer {
  background-color: var(--neutral-dark);
  color: var(--neutral-white);
  text-align: center;
  padding: 10px 20px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer p {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: var(--neutral-white);
}

/* ===================== */
/* Responsive Styles */
/* ===================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1rem;
  }

  span {
    font-size: 0.8125rem; 
    padding: 6px 10px; 
  }

  table {
    font-size: 0.9rem; /* Reduce font size for smaller screens */
  }

  table th, table td {
    padding: 8px 10px; /* Reduce padding for smaller screens */
  }

  .cta-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

}

@media (max-width: 480px) {
  .container {
    width: 90%;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  p {
    font-size: 0.9rem;
  }

  span {
    font-size: 0.75rem; 
    padding: 4px 8px; 
  }


  table {
    font-size: 0.9rem; /* Reduce font size for smaller screens */
  }

  table th, table td {
    padding: 8px 10px; /* Reduce padding for smaller screens */
  }

  .cta-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

}
