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

:root {
  --bg-primary: #0D0E14;
  --bg-secondary: #13141C;
  --bg-card: #1A1B25;
  --bg-card-hover: #22232F;
  --accent: #FFDE00;
  --accent-dim: rgba(255, 222, 0, 0.15);
  --accent-glow: rgba(255, 222, 0, 0.4);
  --text-primary: #E8E8ED;
  --text-secondary: #9A9AAF;
  --text-muted: #5A5A72;
  --border: #2A2B38;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Orbitron', var(--font-body);
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

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

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

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

a:hover {
  color: #FFF3A0;
}

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

ul, ol {
  list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ===== CONTAINER ===== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 5rem 0;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(13, 14, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
  image-rendering: pixelated;
}

.nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

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

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 14, 20, 0.6) 0%,
    rgba(13, 14, 20, 0.3) 40%,
    rgba(13, 14, 20, 0.8) 80%,
    var(--bg-primary) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 2rem;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.hero h1 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #FFF3A0;
  color: var(--bg-primary);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FEATURED GAME CARD ===== */
.featured-game {
  background: var(--bg-secondary);
}

.game-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.game-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition);
}

.game-image:hover {
  transform: scale(1.02);
}

.game-image img {
  width: 100%;
  display: block;
  image-rendering: auto;
}

.game-info h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

.game-info h2 {
  margin-bottom: 1rem;
}

.game-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.game-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
  border: 1px solid rgba(255, 222, 0, 0.2);
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  image-rendering: pixelated;
  max-width: 300px;
  filter: drop-shadow(0 0 40px rgba(255, 222, 0, 0.15));
}

/* ===== FEATURES / STATS ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 222, 0, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 1rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== GAME DETAIL PAGE ===== */
.game-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.game-hero .hero-bg img {
  opacity: 0.35;
}

.game-hero .hero-content {
  padding-bottom: 3rem;
  text-align: left;
  max-width: var(--max-width);
  width: 90%;
  margin: 0 auto;
}

.game-hero .game-logo {
  max-width: 400px;
  margin-bottom: 1.5rem;
  image-rendering: pixelated;
}

.game-detail-section {
  background: var(--bg-secondary);
}

.game-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.game-detail-grid h2 {
  margin-bottom: 1.5rem;
}

.game-detail-grid p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.game-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  height: fit-content;
}

.game-sidebar h3 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-label {
  color: var(--text-muted);
}

.sidebar-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Screenshot Gallery */
.screenshots {
  padding: 4rem 0;
}

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

.screenshot-grid img {
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: transform var(--transition);
  cursor: pointer;
  width: 100%;
}

.screenshot-grid img:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

/* ===== GAMES LIST PAGE ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.game-card:hover {
  border-color: rgba(255, 222, 0, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-card-image {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.game-card:hover .game-card-image img {
  transform: scale(1.05);
}

.game-card-body {
  padding: 1.5rem;
}

.game-card-body h3 {
  margin-bottom: 0.5rem;
}

.game-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ===== TEAM ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.team-card:hover {
  border-color: rgba(255, 222, 0, 0.3);
  transform: translateY(-4px);
}

.team-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  image-rendering: pixelated;
  border-radius: 50%;
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.team-card .role {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.team-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.blog-card:hover {
  border-color: rgba(255, 222, 0, 0.3);
  transform: translateY(-4px);
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-date {
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.blog-card-body h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.blog-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== BLOG LISTING ===== */
.blog-year-heading {
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-year-heading:first-child {
  margin-top: 0;
}

a.blog-card {
  color: var(--text-primary);
  display: block;
}

a.blog-card:hover {
  color: var(--text-primary);
}

a.blog-card:hover h3 {
  color: var(--accent);
}

/* ===== BLOG POST PAGE ===== */
.blog-post-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.blog-post-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.blog-post-content h2 {
  color: var(--text-primary);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  color: var(--accent);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  margin-bottom: 1.25rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-post-content ul {
  list-style: disc;
}

.blog-post-content ol {
  list-style: decimal;
}

.blog-post-content li {
  margin-bottom: 0.4rem;
}

.blog-post-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-post-content code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--accent);
}

.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

.blog-post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ===== CONTACT ===== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-content > p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 2.5rem;
  transition: all var(--transition);
}

.contact-email:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.contact-email span {
  font-size: 1.1rem;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: var(--text-secondary);
  transition: fill var(--transition);
}

.social-link:hover svg {
  fill: var(--accent);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo img {
  height: 32px;
  image-rendering: pixelated;
}

.footer-logo span {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== PAGE HEADER (non-home pages) ===== */
.page-header {
  padding: 8rem 0 3rem;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-header p {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== SCANLINE EFFECT ===== */
.scanlines::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== CRT GLOW for accent elements ===== */
.glow {
  text-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(13, 14, 20, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

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

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 0;
  }

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

  .games-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
