@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --bg-color: #0f1419;
  --bg-gradient: linear-gradient(135deg, #1a1f2e 0%, #16213e 100%);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --text-color: #e8e8e8;
  --text-secondary: #b0b0b0;
  --primary-color: #ff1c1c;
  --primary-hover: #ff3d3d;
  --border-color: rgba(255, 255, 255, 0.15);
}

body.light-mode {
  --bg-color: #f5f7fa;
  --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --text-color: #1a1a1a;
  --text-secondary: #4a5568;
  --primary-color: #d40000;
  --primary-hover: #ff1c1c;
  --border-color: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 20px;
}

.container {
  max-width: 1200px;
  width: 100%;
  background: var(--glass-bg);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid var(--border-color);
  margin: 0 auto;
}

/* REMOVED unwanted red underline */
.title::before {
  display: none;
}

.title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 20px;
}

.title::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 5px;
}

/* Remove decorative red line on landing and login pages */
.home-container .title::before,
.login-container .title::before {
  display: none;
}

.user-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.input-box {
  width: calc(100% / 2 - 20px);
  margin-bottom: 20px;
}

.input-box.full-width {
  width: 100%;
}

.input-box input {
  width: 100%;
  height: 45px;
  padding-left: 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

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

/* Buttons */

.button input,
.login-button {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.button input:hover,
.login-button:hover {
  background: #cc0000;
}

/* Home page */

.home-container {
  text-align: center;
}

.login-options {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.login-button {
  width: 45%;
  text-decoration: none;
  text-align: center;
}

/* Achievement Cards */

.achievement-card {
  background-color: #1e1e1e;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 15px;
  border: 1px solid #333;
}

/* FIXED HUGE SPACING ISSUE */
.achievement-box {
  max-width: 1000px;
  margin-top: 40px;
  padding: 40px;
  background-color: #1c1c1c;
  border-radius: 15px;
  border: 1px solid #333;
}

/* FIXED TRAILING COMMA BUG */
.dashboard-box {
  max-width: 1000px;
  margin: 20px auto;
  padding: 40px;
  background-color: #1c1c1c;
  border-radius: 15px;
  border: 1px solid #333;
}

/* Navigation Styles */
.navbar {
  display: flex;
  flex-direction: column;
  /* Stack items vertically */
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 140px;
  /* Increased height for specific 2-row layout */
}

.nav-brand {
  width: 100%;
  text-align: center;
}

.nav-brand h2 {
  color: var(--text-color);
  margin: 0;
  display: block;
  /* Ensure it's not hidden */
  font-size: 1.5rem;
  /* Explicit size */
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  /* Increased gap for better spacing */
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 3px 0;
  transition: 0.3s;
}

/* Header offset to account for fixed navbar */
.header {
  height: 140px;
  /* Match navbar height */
}

/* Main content with proper spacing */
.main-content {
  margin-top: 140px;
  /* Match navbar height */
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(90vh - 200px);
  /* Subtract navbar height to center in remaining space */
  background: var(--bg-gradient);
  padding: 0;
  text-align: center;
}

.hero-content {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: center;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Sections */
.features,
.about,
.faq,
.contact,
.stats {
  padding: 5rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 160px;
  /* Offset for fixed navbar (140px + 20px) */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem auto 0;
  max-width: 1200px;
  justify-content: center;
}

.feature-card {
  background: var(--glass-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease;
  margin: 0 auto;
  max-width: 350px;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto 0;
  max-width: 1200px;
  justify-content: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
  text-align: left;
  margin: 0 auto;
}

.faq-content {
  margin: 2rem auto 0;
  max-width: 800px;
  text-align: left;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto 0;
  max-width: 1200px;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  text-align: left;
  margin: 0 auto;
}

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info li {
  padding: 0.5rem 0;
}

/* Theme Toggle Button */
.toggle-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

/* Footer Styles */
.footer {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 2rem 0 1rem;
  margin-top: auto;
}

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

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive */

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    /* Restore row layout for mobile */
    justify-content: space-between;
    height: 80px;
    /* Restore original mobile height */
    padding: 1rem 70px 1rem 1rem;
    /* Increase right padding to clear fixed toggle */
    align-items: center;
  }

  .header {
    height: 80px;
  }

  .main-content {
    margin-top: 80px;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    /* Match header height */
    flex-direction: column;
    background-color: var(--bg-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem;
    gap: 1.5rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .toggle-container {
    top: 15px;
    right: 15px;
  }

  .theme-toggle {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .hero {
    min-height: 80vh;
    padding: 0 1rem;
  }

  .hero-content {
    max-width: 100%;
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .features,
  .about,
  .faq,
  .contact,
  .stats {
    padding: 3rem 1rem;
    max-width: 100%;
    scroll-margin-top: 80px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
  }

  .feature-card {
    max-width: 100%;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }

  .about-text {
    max-width: 100%;
    padding: 0 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 100%;
  }

  .stat-item {
    max-width: 100%;
  }

  .contact-content {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }

  .contact-info {
    max-width: 100%;
    padding: 0 1rem;
  }
}

/* Stats Section */
.stats {
  padding: 5rem 2rem;
  background: var(--glass-bg);
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem auto 0;
  max-width: 1200px;
  justify-content: center;
}

.stat-item {
  margin: 0 auto;
  max-width: 250px;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .input-box {
    width: 100%;
  }

  .login-options {
    flex-direction: column;
  }

  .login-button {
    width: 100%;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

  .features,
  .about,
  .faq,
  .contact,
  .stats {
    padding: 2.5rem 1rem;
    max-width: 100%;
    scroll-margin-top: 100px;
    /* Offset for mobile navbar (80px + 20px) */
  }
}