:root {
  --bg: #0f1220;
  --surface: #171a2b;
  --card: #1e2338;
  --text: #e9ecf8;
  --muted: #a9b0d2;
  --accent: #ff7f00;   /* Orange */
  --accent-2: #0077ff; /* Blue */
}

html.light {
  --bg: #f5f7ff;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #1a1d2b;
  --muted: #4e5670;
  --accent: #ff7f00;   /* Orange */
  --accent-2: #0077ff; /* Blue */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

header {
  padding: 84px 20px 18px;
  text-align: center;
  position: relative;
}

header h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  color: var(--accent);
}

/* Header with less transparent black */
.header-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  background: rgba(0,0,0,0.85);
  position: relative;
  z-index: 10;
}

/* Logo */
.logo { display:flex; align-items:center; }
.logo img { height: 50px; }

/* NAV */
nav {
  display:flex;
  gap: 18px;
  align-items:center;
}

/* Apply same hover to all header buttons (links & dropdown triggers) */
nav a,
nav a:visited,
nav a:focus,
nav a:active,
nav .dropdown > a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 180ms ease, transform 180ms ease, background 180ms ease;
  display: inline-block;
}

/* Unified hover/active effect for all header items */
nav a:hover,
nav .dropdown > a:hover,
nav a:focus,
nav .dropdown > a:focus {
  color: var(--accent);
  transform: translateY(-2px);
  background: rgba(255,102,0,0.06);
}

/* Active nav button */
nav a.active,
nav .dropdown > a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Dropdown menu */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: var(--card);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 10px 14px; color: var(--text); }
.dropdown-menu a:hover { background: var(--accent); color: #fff; }

/* Background animation */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,127,0,0.06), transparent 40%), 
              radial-gradient(circle at bottom right, rgba(0,119,255,0.06), transparent 40%);
  z-index: -1;
  animation: gradientMove 10s infinite alternate;
}
@keyframes gradientMove {
  0% { background-position: 0% 0%, 100% 100%; }
  100% { background-position: 100% 0%, 0% 100%; }
}

@keyframes textGlow {
  0% { text-shadow: 0 0 10px var(--accent); }
  100% { text-shadow: 0 0 20px var(--accent-2); }
}

/* Rules Section */
.rules-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 20px;
  max-width: 1100px;
  margin: auto;
}
.rule-card {
  background: var(--card);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  text-align: center;
  transform: translateY(40px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  transition: transform 0.3s, box-shadow 0.3s;
}
.rule-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
.rule-card:nth-child(1){ animation-delay: 0.2s; }
.rule-card:nth-child(2){ animation-delay: 0.4s; }
.rule-card:nth-child(3){ animation-delay: 0.6s; }
.rule-card:nth-child(4){ animation-delay: 0.8s; }
.rule-card:nth-child(5){ animation-delay: 1s; }
.rule-card:nth-child(6){ animation-delay: 1.2s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.rule-card .emoji {
  font-size: 50px;
  margin-bottom: 10px;
  animation: bounce 1.5s infinite;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.rule-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  color: var(--accent);
}
.rule-card p {
  font-size: 15px;
  color: var(--muted);
}

/* Footer Animation */
footer {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  margin-top: 70px;
  font-size: 14px;
  position: relative;
}
.footer-anim {
  position: relative;
  height: 150px;
  overflow: hidden;
  margin-top: 30px;
}
.runner {
  position: absolute;
  font-size: 60px;
  bottom: 0;
  animation: run linear infinite;
}
.runner:nth-child(1) { animation-duration: 6s; right: -10%; }
.runner:nth-child(2) { animation-duration: 8s; right: -20%; font-size: 50px; opacity: 0.8; }
.runner:nth-child(3) { animation-duration: 10s; right: -30%; font-size: 70px; opacity: 0.7; }

@keyframes run {
  0% { transform: translateX(0); }
  100% { transform: translateX(-140vw); }
}

/* Contact Modal - Updated */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff; /* White background */
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  color: #000; /* All text black by default */
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: popIn 0.3s ease;
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #ff7f00; /* Orange heading */
}

.modal-content p {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000; /* Black text */
}

.modal-content i {
  color: #ff7f00; /* Orange icons */
  font-size: 1.1rem;
}

.close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  color: #000; /* Black close button */
  cursor: pointer;
  background: transparent;
  border: none;
}

.close:hover {
  color: #ff7f00; /* Orange on hover */
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
/* Hamburger hidden by default */
.hamburger {
  display: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 101;
}

/* Mobile responsive menu */
@media (max-width: 768px) {
  .header-overlay {
    padding: 14px 20px;
  }

  .hamburger {
    display: block; /* show hamburger only in mobile */
  }

  nav {
    display: none;
    flex-direction: column;
    background: rgba(0,0,0,0.95);
    position: absolute;
    top: 70px;
    right: 20px;
    width: 220px;
    padding: 15px;
    border-radius: 10px;
    z-index: 100;
  }

  nav.show {
    display: flex;
  }

  nav a, nav .dropdown > a {
    padding: 10px;
    display: block;
  }

  .dropdown-menu {
    position: relative;
    background: transparent;
    box-shadow: none;
    padding-left: 10px;
  }
}
