:root {
  --bg: #030308;
  --blue: #00b4ff;
  --white: #f0f6ff;
  --gray: #1a1a2e;
  --glow: 0 0 16px rgba(0, 180, 255, 0.6);
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* HUD Grid Overlay */
.hud-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  background: 
    linear-gradient(90deg, rgba(0, 180, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(0, 180, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(12px);
  background: rgba(3, 3, 8, 0.7);
  border-bottom: 1px solid rgba(0, 180, 255, 0.2);
  transition: var(--transition);
}

.logo {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--blue), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--glow);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.4rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--blue);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem 6rem;
  position: relative;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin: 0 0 1rem;
  margin-top: 10%;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.3rem);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.cta-button {
  padding: 0.8rem 2.2rem;
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
}

.cta-button:hover {
  background: var(--blue);
  color: var(--bg);
  box-shadow: var(--glow);
  transform: translateY(-3px) scale(1.05);
}

.canvas-container {
  width: 100%;
  height: clamp(280px, 50vh, 500px);
  max-width: 900px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(10, 10, 20, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  touch-action: none; /* Better touch control on mobile */
}

.canvas-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.1), transparent);
  pointer-events: none;
}

/* Loading indicator (optional - you can add this if needed) */
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--blue);
  font-size: 1.2rem;
  z-index: 10;
}

/* Sections */
section {
  padding: clamp(5rem, 10vw, 10rem) 2rem;
  scroll-margin-top: 80px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--blue);
  position: relative;
  letter-spacing: -1px;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: var(--blue);
  margin: 1rem auto;
  border-radius: 2px;
  box-shadow: var(--glow);
}

.panel {
  background: rgba(15, 15, 30, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 1000px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.panel:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 180, 255, 0.25);
  border-color: var(--blue);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(0, 180, 255, 0.05);
  border: 1px solid rgba(0, 180, 255, 0.2);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(0, 180, 255, 0.1);
  box-shadow: var(--glow);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

/* Gallery */
#gallery {
  padding: 5rem 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 180, 255, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Competitions List */
#competitions .panel ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

#competitions .panel li {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(0, 180, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

#competitions .panel li:last-child {
  border-bottom: none;
}

#competitions .panel li span {
  color: var(--blue);
  font-size: 1.5rem;
}

#competitions .panel li div {
  flex: 1;
}

#competitions .panel li strong {
  display: block;
}

#competitions .panel li small {
  display: block;
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 0.2rem;
}

/* Button Groups */
.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.button-group.center {
  justify-content: center;
}

/* Footer */
footer {
  background: rgba(2, 2, 6, 0.9);
  padding: 5rem 2rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(0, 180, 255, 0.1);
}

.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--blue), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  transition: var(--transition);
  display: block;
  padding: 0.5rem;
  border-radius: 50%;
}

.social-links a:hover {
  color: var(--blue);
  transform: translateY(-5px) scale(1.1);
  background: rgba(0, 180, 255, 0.1);
}

.footer-text {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #aaa;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background: rgba(3, 3, 8, 0.95);
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 0;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(0, 180, 255, 0.2);
    backdrop-filter: blur(20px);
  }

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

  .hamburger {
    display: flex;
  }

  .panel {
    padding: 1.8rem 1.5rem;
  }

  .stats-grid {
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item {
    height: 220px;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }
}

/* Ultra Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-top: 20%;
  }

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

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

  .cta-button {
    padding: 0.7rem 1.8rem;
    font-size: 0.9rem;
  }
}