/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0f0a;
  --bg-secondary: #121a12;
  --bg-card: #1a251a;
  --accent: #ffcc00;
  --accent-dark: #d4a800;
  --text-primary: #f0f4f0;
  --text-secondary: #b0c0b0;
  --text-muted: #7a8a7a;
  --border-color: #2a3a2a;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 15, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.nav-logo .logo-icon {
  font-size: 1.8rem;
}

.nav-logo .accent {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: #fff;
}

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

.nav-toggle .bar {
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s;
}

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

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

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #0a0f0a;
}

.btn-primary:hover {
  background: #ffe066;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.3);
}

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

.btn-secondary:hover {
  background: var(--accent);
  color: #0a0f0a;
  transform: translateY(-2px);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  background: rgba(255, 204, 0, 0.15);
  color: var(--accent);
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #0a0f0a 0%, #121a12 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 204, 0, 0.05),
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-text {
  flex: 1.2;
}

.hero-tag {
  background: rgba(255, 204, 0, 0.2);
  padding: 4px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  margin: 28px 0 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-image {
  flex: 0.8;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

/* ===== LEADERBOARD ===== */
.leaderboard {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.leaderboard-table-wrap {
  overflow-x: auto;
  margin: 32px 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-card);
}

.leaderboard-table th {
  background: rgba(255, 204, 0, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.leaderboard-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table .top-1 td {
  background: rgba(255, 204, 0, 0.08);
}

.leaderboard-table .top-2 td {
  background: rgba(192, 192, 192, 0.08);
}

.leaderboard-table .top-3 td {
  background: rgba(205, 127, 50, 0.08);
}

.rank-medal {
  font-size: 1.6rem;
  line-height: 1;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-cell .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
}

.flag {
  font-size: 1.2rem;
}

.leaderboard-footer {
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 8px;
}

/* ===== GUILDS ===== */
.guilds {
  padding: 80px 0;
  background: var(--bg-primary);
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.guild-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.guild-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.guild-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--accent);
}

.guild-body {
  padding: 20px;
}

.guild-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.guild-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.guild-region {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 12px;
  border-radius: 50px;
  color: var(--text-secondary);
}

.guild-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.guild-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.guild-meta i {
  margin-right: 4px;
  color: var(--accent);
}

.guild-status {
  padding: 2px 14px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.guild-status.open {
  background: rgba(0, 200, 80, 0.2);
  color: #4caf50;
}

.guild-status.closed {
  background: rgba(255, 80, 80, 0.2);
  color: #f44336;
}

/* ===== TOURNAMENTS ===== */
.tournaments {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.tournament-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 32px 0 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 32px;
}

.tournament-info {
  flex: 1 1 300px;
}

.tournament-prize {
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.prize-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.prize-amount {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
}

.tournament-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tournament-dates i {
  color: var(--accent);
  width: 20px;
}

.tournament-teams p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.tournament-bracket {
  flex: 1 1 300px;
}

.bracket-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.bracket-schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bracket-round {
  background: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.bracket-round.final {
  border-color: var(--accent);
  background: rgba(255, 204, 0, 0.1);
}

.round-label {
  font-weight: 600;
}

.round-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.bracket-matches p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tournament-cta {
  text-align: center;
  margin: 24px 0 16px;
}

.tournament-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 80px 0;
  background: var(--bg-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: transform 0.3s;
}

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

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  padding: 16px;
  background: var(--bg-card);
}

.gallery-overlay h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-overlay .artist {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.gallery-overlay .gallery-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.upvotes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.upvotes i {
  color: #ff4757;
}

.gallery-collage {
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.gallery-collage img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 12px 0 16px;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-newsletter h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

.footer-newsletter p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: #fff;
  font-family: var(--font-body);
  outline: none;
  transition: border 0.3s;
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  background: var(--accent);
  color: #0a0f0a;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter-form button:hover {
  background: #ffe066;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    gap: 40px;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .hero-image {
    flex: 1;
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tournament-layout {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    display: none;
    backdrop-filter: blur(10px);
    background: rgba(10, 15, 10, 0.96);
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .hero-text h1 {
    font-size: 2.4rem;
  }
  .hero-subtitle {
    font-size: 1.4rem;
  }
  .hero-stats {
    gap: 20px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .section-header h2 {
    font-size: 2rem;
  }
  .guild-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .tournament-dates {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    justify-content: center;
  }
  .bracket-schedule {
    flex-direction: column;
    align-items: stretch;
  }
}
