:root {
  color-scheme: dark;

  --bg-primary: #0a0e27;
  --bg-secondary: rgba(15, 20, 40, 0.8);
  --bg-card: rgba(20, 30, 60, 0.6);
  --text-primary: #e8eaf6;
  --text-secondary: #b8c5ff;
  --text-muted: #7986cb;
  --accent-primary: #00d4ff;
  --accent-secondary: #0096c7;
  --accent-gold: #ffd700;
  --accent-teal: #00bfa5;
  --border-color: rgba(0, 212, 255, 0.3);
  --shadow-color: rgba(0, 212, 255, 0.4);
  --poster-color: rgba(0, 212, 255, 0.15);
  --poster-hover-color: rgba(0, 212, 255, 0.25);
  --navbar-bg: rgba(10, 14, 39, 0.95);
  --chart-green: #00e676;
  --chart-red: #ff5252;
}

body.light-mode {
  --bg-primary: #f5f7fa;
  --bg-secondary: rgba(255, 255, 255, 0.9);
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-primary: #1a237e;
  --text-secondary: #283593;
  --text-muted: #5c6bc0;
  --accent-primary: #0288d1;
  --accent-secondary: #0277bd;
  --accent-gold: #f9a825;
  --accent-teal: #00897b;
  --border-color: rgba(2, 136, 209, 0.3);
  --shadow-color: rgba(2, 136, 209, 0.2);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --chart-green: #43a047;
  --chart-red: #e53935;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  transition:
    background 0.4s ease,
    color 0.4s ease;
  line-height: 1.6;
}

#canvas3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3;
  pointer-events: none;
}

body.light-mode #canvas3d {
  opacity: 0.15;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 20px 40px;
  box-shadow: 0 2px 20px var(--shadow-color);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.4s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-teal),
    var(--accent-gold)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.3s ease;
  letter-spacing: 1px;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 35px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.3s ease;
  border-radius: 6px;
  font-size: 0.95rem;
  position: relative;
  display: block;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link:hover {
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.1);
}

.dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--navbar-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 0;
  /* min-width: 200px; */
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px var(--shadow-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  list-style: none;
  z-index: 1100;
}

.dropdown-menu li {
  list-style: none;
}

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

.dropdown-link {
  display: block;
  padding: 12px 24px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown-link:hover {
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.15);
  padding-left: 30px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 150px 20px 80px;
  z-index: 10;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1s ease;
}

.hero-super {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-weight: 600;
  animation: fadeInDown 1s ease;
}

.hero-title {
  font-size: 6rem;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-teal),
    var(--accent-gold)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  letter-spacing: 2px;
  animation: fadeInDown 1s ease 0.2s both;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
  animation: fadeInUp 1s ease 0.3s both;
  text-align: center;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease 0.4s both;
  text-align: center;
}

.hero-prize {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin: 40px 0;
  animation: fadeInUp 1s ease 0.5s both;
}

.prize-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(0, 191, 165, 0.2)
  );
  border: 2px solid var(--accent-gold);
  border-radius: 15px;
  padding: 20px 40px;
  backdrop-filter: blur(10px);
}

.prize-label {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.prize-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  transition: transform 0.1s ease;
  display: inline-block;
}

.prize-highlight {
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--border-color);
  max-width: 70%;
  border-radius: 12px;
  padding: 20px 30px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  text-align: center;
}

.prize-highlight strong {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.prize-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.btn-hero {
  display: inline-block;
  padding: 18px 45px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 50px;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px var(--shadow-color);
  animation: fadeInUp 1s ease 0.6s both;
  position: relative;
  overflow: hidden;
}

.btn-hero:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px var(--shadow-color);
}

/* Page Sections */
.page-section {
  position: relative;
  padding: 100px 20px;
  z-index: 10;
  transition: background 0.4s ease;
}

.page-section:nth-child(2n-1) {
  background: var(--bg-secondary);
}

.alt-bg {
  background: var(--bg-secondary);
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-teal)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 1px;
}

.result-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0;
  text-align: center;
  margin-top: 50px;
}

/* About Section */
.about-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 50px;
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

.about-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 70px var(--shadow-color);
}

.about-text {
  font-size: 1.2rem;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* Event Cards */
.event-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--shadow-color);
  border-color: var(--accent-primary);
}

.event-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.event-icon {
  font-size: 3rem;
  animation: pulse 2s infinite;
}

.event-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0;
}

.event-badge {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(
    135deg,
    var(--accent-teal),
    var(--accent-secondary)
  );
  color: white;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.event-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.detail-item {
  background: rgba(0, 212, 255, 0.1);
  padding: 15px 20px;
  border-radius: 10px;
  border-left: 3px solid var(--accent-primary);
}

.detail-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 600;
}

.detail-value {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.syllabus-box {
  background: rgba(0, 191, 165, 0.1);
  border: 1px solid var(--accent-teal);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.syllabus-title {
  font-size: 1.3rem;
  color: var(--accent-teal);
  margin-bottom: 15px;
  font-weight: 700;
}

.syllabus-list {
  list-style: none;
  padding: 0;
}

.syllabus-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  color: var(--text-secondary);
  font-size: 1rem;
}

.syllabus-list li::before {
  content: "▹";
  position: relative;
  left: 0;
  color: var(--accent-teal);
  font-size: 1.5rem;
}

.challenge-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.rewards-box {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.15),
    rgba(0, 191, 165, 0.15)
  );
  border: 2px solid var(--accent-gold);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.rewards-box p {
  margin: 10px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Key Dates Section */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.date-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  backdrop-filter: blur(15px);
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.date-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px var(--shadow-color);
  border-color: var(--accent-primary);
}

.date-card.highlight {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.2),
    rgba(0, 191, 165, 0.2)
  );
  border-color: var(--accent-primary);
}

.date-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.date-title {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-weight: 600;
}

.date-value {
  font-size: 1.3rem;
  color: var(--accent-primary);
  font-weight: 700;
}

.coming-soon {
  color: var(--accent-gold);
  font-style: italic;
  animation: pulse 2s infinite;
}

/* Footer */
.footer {
  position: relative;
  background: var(--navbar-bg);
  border-top: 2px solid var(--border-color);
  padding: 50px 20px 30px;
  text-align: center;
  z-index: 100;
  transition: all 0.4s ease;
}

.footer * {
  position: relative;
  z-index: 101;
}

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

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-teal),
    var(--accent-gold)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.footer-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-contact {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.contact-item {
  font-size: 1rem;
  color: var(--text-secondary);
  background: rgba(0, 212, 255, 0.5);
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-block;
}

.contact-item a {
  text-decoration: none;
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--accent-primary);
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .theme-toggle {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .toggle-icon {
    font-size: 1.5rem;
  }

  .hero {
    padding: 120px 20px 60px;
    min-height: 80vh;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-super {
    font-size: 0.9rem;
  }

  .prize-badge {
    padding: 15px 25px;
  }

  .prize-amount {
    font-size: 2rem;
  }

  .prize-highlight {
    padding: 15px 20px;
    font-size: 0.9rem;
  }

  .prize-highlight strong {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-card {
    padding: 30px;
  }

  .about-text {
    font-size: 1rem;
  }

  .event-card {
    padding: 25px;
  }

  .event-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .event-icon {
    font-size: 2.5rem;
  }

  .event-title {
    font-size: 1.5rem;
  }

  .event-details {
    grid-template-columns: 1fr;
  }

  .dates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .registration-box {
    padding: 30px 20px;
  }

  .form-placeholder {
    padding: 50px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .btn-hero {
    padding: 14px 30px;
    font-size: 1rem;
  }

  .poster-icon,
  .form-icon {
    font-size: 3.5rem;
  }
}
