@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-color: #0b0c10;
  --surface-color: #1f2833;
  --surface-color-light: #2c394b;
  --primary-color: #66fcf1;
  --primary-color-dim: #45a29e;
  --accent-color: #ff0055;
  --text-main: #c5c6c7;
  --text-light: #ffffff;
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background grid effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(var(--surface-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface-color) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-gradient {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(102, 252, 241, 0.1);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-brand span {
  color: var(--primary-color);
}

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

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(102, 252, 241, 0.5);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 3rem auto;
  color: var(--text-main);
}

.cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: inset 0 0 0 rgba(102, 252, 241, 0), 0 0 0 rgba(102, 252, 241, 0);
}

.btn-primary:hover {
  background-color: var(--primary-color);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.5);
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--surface-color-light);
}

/* Features/Game Modes Section */
.modes {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-light);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(31, 40, 51, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 252, 241, 0.1);
  padding: 2.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(102, 252, 241, 0.4);
}

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

.card p {
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* Leaderboard Page Specific */
.leaderboard-container {
  padding: 4rem 0;
}

.glass-panel {
  background: rgba(31, 40, 51, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 252, 241, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color-dim);
}

tbody tr {
  transition: background-color 0.3s ease;
}

tbody tr:hover {
  background-color: rgba(102, 252, 241, 0.05);
}

td {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-light);
}

.rank-1 {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  font-weight: bold;
}

.rank-2 {
  color: #c0c0c0;
  font-weight: bold;
}

.rank-3 {
  color: #cd7f32;
  font-weight: bold;
}

.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--primary-color-dim);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(102, 252, 241, 0.1);
  margin-top: 4rem;
  color: var(--primary-color-dim);
}

/* Manual Page Specific */
.manual-container {
  padding: 4rem 0;
}

.manual-section {
  margin-bottom: 3rem;
}

.manual-section h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(102, 252, 241, 0.2);
  padding-bottom: 0.5rem;
}

.manual-section p, .manual-section ul {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.manual-section ul {
  list-style-type: none;
  padding-left: 1.5rem;
}

.manual-section ul li {
  margin-bottom: 0.8rem;
  position: relative;
}

.manual-section ul li::before {
  content: "▹";
  color: var(--accent-color);
  position: absolute;
  left: -1.5rem;
  font-weight: bold;
}

.legend-table {
  width: 100%;
  max-width: 600px;
  background: rgba(31, 40, 51, 0.4);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(102, 252, 241, 0.1);
}

.legend-table th, .legend-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-table th {
  background: rgba(102, 252, 241, 0.05);
  color: var(--primary-color-dim);
}

.symbol {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent-color);
  text-align: center;
  width: 80px;
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.95rem;
  }
  
  .hero {
    padding: 3rem 0;
    min-height: auto;
    margin-top: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .btn {
    width: 100%;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }

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

  .glass-panel {
    padding: 1rem;
    overflow-x: auto;
  }
  
  table, .legend-table {
    font-size: 0.85rem;
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: normal;
  }

  th, td {
    padding: 0.8rem 0.5rem;
  }

  .symbol {
    width: 50px;
    font-size: 1.2rem;
  }

  .manual-section h2 {
    font-size: 1.5rem;
  }
}
