/* Core Design System & CSS Variables */
:root {
  --bg-dark: #0a0a0f;
  --panel-bg: rgba(18, 18, 28, 0.75);
  --panel-border: rgba(255, 255, 255, 0.12);
  --panel-glow: rgba(57, 255, 140, 0.15);
  --text-main: #f0f4f8;
  --text-muted: #a0aec0;
  --accent-green: #39ff8c;
  --accent-green-hover: #2ee079;
  --accent-purple: #b843ff;
  --steam-btn-bg: linear-gradient(135deg, #171a21 0%, #1b2838 50%, #2a475e 100%);
  --steam-btn-border: #66c0f4;
  --steam-glow: rgba(102, 192, 244, 0.4);
  --press-btn-bg: rgba(255, 255, 255, 0.08);
  --press-btn-hover: rgba(255, 255, 255, 0.16);
  --footer-bg: rgba(10, 10, 15, 0.92);
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text-main);
  overflow-x: hidden;
  /* Dark grey fallback shown while background image loads */
  background-color: #1a1a22;
}

/* -------------------------------------------------------
   Background image element — fades in once loaded via JS
------------------------------------------------------- */
.bg-img {
  position: fixed;
  inset: 0;              /* top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  /* Start invisible */
  opacity: 0;
  /* Smooth fade-in over 0.9 s */
  transition: opacity 0.9s ease;
  pointer-events: none;
  user-select: none;
}

.bg-img.loaded {
  opacity: 1;
}

/* Main Layout Grid */
.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  /* Sit above the fixed background img */
  z-index: 1;
}

/* Hero Section Wrapper — vignette overlay for readability */
.hero-wrapper {
  flex-grow: 1;
  width: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(
    to right,
    rgba(10, 10, 15, 0.6) 0%,
    rgba(10, 10, 15, 0.35) 50%,
    rgba(10, 10, 15, 0.15) 100%
  );
}

.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 24px 60px 24px;
  display: flex;
  align-items: center;
}

/* Left Hero Panel */
.hero-card {
  width: 100%;
  max-width: 580px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 30px var(--panel-glow);
  animation: fadeInSlideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* Ensure it has a stable layout */
  display: flex;
  flex-direction: column;
}

@keyframes fadeInSlideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Logo Styling */
.logo-container {
  width: 100%;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-logo {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 15px rgba(57, 255, 140, 0.3));
  transition: transform 0.3s ease;
}

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

/* Intro Text */
.intro-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 20px;
  font-weight: 300;
  letter-spacing: 0.2px;
  text-align: center;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%; /* Make them round */
  color: var(--text-muted);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden; /* Ensure image stays inside bounds */
}

.tab-btn img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
  transform: translateY(-2px);
}

.tab-btn:hover img {
  opacity: 1;
}

.tab-btn.active {
  background: rgba(140, 225, 255, 0.1); /* Subtle green/blue background */
  border-color: var(--accent-green);
  color: #fff;
  box-shadow: 0 0 15px rgba(102, 192, 244, 0.4);
  transform: scale(1.05);
}

.tab-btn.active img {
  opacity: 1;
}

/* Dynamic Content */
.dynamic-content {
  margin-bottom: 16px;
  text-align: center;
  /* Min height to prevent buttons below from jumping */
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tab-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  margin-top: 0;
  letter-spacing: 0.5px;
}

.tab-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Video Wrapper (16:9 container) */
.video-wrapper {
  width: 100%;
  position: relative;
  /* 16:9 Aspect Ratio to preserve video proportions */
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Game Description */
.game-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 28px;
  font-weight: 300;
  letter-spacing: 0.2px;
}

/* Action Buttons Container */
.cta-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.btn svg {
  flex-shrink: 0;
}

/* Steam Button - Big & Prominent */
.btn-steam {
  width: 100%;
  padding: 16px 28px;
  font-size: 1.15rem;
  color: #ffffff;
  background: var(--steam-btn-bg);
  border: 1px solid var(--steam-btn-border);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-steam:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 30px var(--steam-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: #8ce1ff;
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 50%, #171a21 100%);
}

.btn-steam:active {
  transform: translateY(0);
}

/* Press Kit Button - Smaller */
.btn-presskit {
  width: 100%;
  padding: 11px 20px;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--press-btn-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}

.btn-presskit:hover {
  background: var(--press-btn-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  color: #ffffff;
}

/* Horizontal Footer */
.footer {
  width: 100%;
  background: #08080d;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px 24px 24px 24px;
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-top {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contact-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-box strong {
  color: var(--text-main);
}

.email-link {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.email-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

/* Social Buttons */
.social-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-btn.youtube:hover {
  border-color: #ff0000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.social-btn.twitter:hover {
  border-color: #1da1f2;
  box-shadow: 0 0 15px rgba(29, 161, 242, 0.3);
}

/* Copyright Row */
.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  padding-top: 16px;
}

.personal-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.personal-link:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #0284c7;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 24px 16px 40px 16px;
    justify-content: center;
  }

  .hero-card {
    padding: 24px;
    max-width: 100%;
  }

  .game-description {
    font-size: 0.98rem;
    margin-bottom: 22px;
  }

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

  .contact-box {
    flex-direction: column;
  }

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