/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #16213e;
  --color-surface: #16213e;
  --color-accent: #c9a227;
  --color-text: #e8e8e8;
  --color-text-muted: #a0a0a0;
  --color-border: #888888;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Georgia', serif;
  --max-width: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a:hover {
  color: #e0b830;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-overlay .description a {
  color: var(--color-accent);
  text-decoration: none;
}

.hero-overlay .description a:hover {
  color: #e0b830;
}

/* === Header / Nav === */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid #888888;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  height: 36px;
  width: auto;
}

.site-title:hover {
  color: #e0b830;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin-left: auto;
  justify-content: flex-end;
}

.nav-links a {
  color: #888888;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #aaaaaa;
}

/* === Hero Section (Home) === */
.hero {
  position: relative;
  height: calc(100vh - 170px);
  overflow: hidden;
  background: var(--color-bg);
}

.hero-slider {
  width: 100%;
  height: 100%;
}

.hero-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem;
  background: linear-gradient(transparent, rgba(26, 26, 46, 0.95));
  z-index: 10;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay .tagline {
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.hero-overlay .description {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Swiper nav styling */
.hero .swiper-button-prev,
.hero .swiper-button-next {
  color: #888888;
}

.hero .swiper-pagination-bullet-active {
  background: #888888;
}

/* === Intro Section === */
.intro {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.intro p {
  margin-bottom: 1rem;
}

/* === Page Headers === */
.page-header {
  text-align: center;
  padding: 3rem 2rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #888888;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header p {
  color: var(--color-text-muted);
}

/* === Game Grid (Cards) === */
.recent-games,
.games-list {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 2rem;
}

.recent-games h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #888888;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.recent-games h2 a {
  color: #888888;
  text-decoration: none;
}

.recent-games h2 a:hover {
  color: #aaaaaa;
}

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

.game-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: var(--color-text);
}

.game-card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  background: var(--color-bg);
}

.game-card-info {
  padding: 1.2rem;
}

.game-card-info time {
  font-size: 0.85rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-card-info h3 {
  margin: 0.4rem 0;
  font-size: 1.1rem;
}

.game-card-info .winner {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.game-card-info .summary {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* === Single Game Page === */
.game-single {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

.game-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.game-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #888888;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-meta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.game-meta .winner {
  color: #888888;
  font-weight: 600;
}

.game-content {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.game-content p {
  margin-bottom: 1rem;
}

/* === Gallery === */
.game-gallery {
  margin-top: 3rem;
}

.game-gallery h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #888888;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-slider {
  border-radius: 8px;
  overflow: hidden;
}

.gallery-slider .swiper-slide img {
  width: 100%;
  height: 500px;
  object-fit: contain;
  background: var(--color-bg);
}

.gallery-slider .swiper-button-prev,
.gallery-slider .swiper-button-next {
  color: #888888;
}

.gallery-slider .swiper-pagination-bullet-active {
  background: #888888;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.gallery-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.gallery-thumbs img:hover {
  opacity: 1;
}

/* === Generic Pages (About etc) === */
.page-single {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-single.about {
  position: relative;
  padding-bottom: 5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-single.about::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/medal-bg.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 50vh;
  opacity: 0.10;
  pointer-events: none;
  z-index: -1;
}

.page-single h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #888888;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.page-content p {
  margin-bottom: 1rem;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #888888;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .hero {
    height: calc(100vh - 100px);
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero {
    height: calc(100vh - 80px);
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
  }

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

  .hero-overlay .description {
    font-size: 0.85rem;
  }

  .hero-overlay {
    padding: 2rem 1rem;
  }

  .site-nav {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-header h1 {
    font-size: 1.8rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .gallery-slider .swiper-slide img {
    max-height: 400px;
  }

  .gallery-thumbs img {
    width: 60px;
    height: 45px;
  }

  .recent-games h2,
  .games-list h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: calc(100vh - 70px);
  }

  .hero-overlay h1 {
    font-size: 1.4rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .game-card img {
    height: 160px;
  }
}
