/* Best Shot Web Game Showcase - Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Primary greens */
  --primary-dark: #1b4332;
  --primary-accent: #2d6a4f;
  --primary-secondary: #40916c;
  --primary-light: #74c69d;
  --primary-success: #52b788;
  --button-hover: #268a55;

  /* Text */
  --text-primary: #1a472a;
  --text-secondary: #2d5a3d;
  --text-muted: #5a8a6a;

  /* Backgrounds */
  --bg-hero-start: #c6e9d7;
  --bg-hero-mid: #d4f1e4;
  --bg-hero-end: #e8f8ef;
  --bg-page: #f8f9fa;

  /* Other */
  --sand: #d4a574;
  --sky: #4a9eff;
}

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

body {
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== HEADER ==================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-accent) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo span {
  color: var(--primary-light);
  font-size: 1.5rem;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: bold;
}

/* ==================== MAIN ==================== */
main {
  flex: 1;
  background: linear-gradient(180deg, var(--bg-hero-start) 0%, var(--bg-hero-mid) 50%, var(--bg-hero-end) 100%);
  padding: 20px 10px;
  /* Reduced from 40px 20px */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 20px;
  /* Reduced from 40px */
}

.hero h1 {
  color: var(--text-primary);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 8px;
  /* Reduced from 12px */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Game + Ads Layout */
.game-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  /* Reduced from 24px */
  margin-bottom: 20px;
  /* Reduced from 40px */
}

.game-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* Reduced from 20px */
}

.game-card {
  /* Removed border/frame styling as requested */
  display: flex;
  justify-content: center;
}

#unity-container {
  width: 432px;
  height: 768px;
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* ==================== AD PLACEHOLDERS ==================== */

.ad-placeholder {
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.ad-placeholder:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
}

.ad-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ad-size {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: monospace;
}

/* Ad sizes */
.ad-skyscraper {
  width: 160px;
  height: 600px;
}

.ad-leaderboard {
  width: 468px;
  height: 60px;
}

.ad-mobile-banner {
  width: 320px;
  height: 100px;
}

/* Side ads - hidden by default, shown on desktop */
.ad-side {
  flex-shrink: 0;
  display: none;
}

/* Banner containers */
.ad-banner {
  display: flex;
  justify-content: center;
}

.ad-banner-top {
  margin-bottom: 10px;
  display: none; /* Hidden by default, shown on tablet */
}

.ad-banner-bottom {
  margin-top: 10px;
}

/* Sticky mobile ad - hidden by default, shown on mobile */
.ad-sticky-mobile {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  justify-content: center;
  padding: 6px 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.ad-sticky-mobile .ad-placeholder {
  border: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.08);
}

/* ==================== RESPONSIVE AD LAYOUT ==================== */

/* Desktop: ≥1000px — side skyscrapers + bottom banner */
@media (min-width: 1000px) {
  .ad-side {
    display: block;
  }

  .ad-banner-top {
    display: none;
  }

  .ad-banner-bottom {
    display: flex;
  }
}

/* Tablet: 600-999px — top + bottom banners, no sidebars */
@media (min-width: 600px) and (max-width: 999px) {
  .ad-side {
    display: none;
  }

  .ad-banner-top {
    display: flex;
  }

  .ad-banner-bottom {
    display: flex;
  }
}

/* Mobile: <600px — sticky anchor ad, hide inline banners */
@media (max-width: 599px) {
  .ad-side {
    display: none;
  }

  .ad-banner-top {
    display: none;
  }

  .ad-banner-bottom {
    display: none;
  }

  .ad-sticky-mobile {
    display: flex;
  }

  /* Add bottom padding to body so sticky ad doesn't cover content */
  body {
    padding-bottom: 112px;
  }
}

#unity-canvas {
  width: 100%;
  height: 100%;
  background: #000;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#unity-logo {
  width: 100px;
  height: 100px;
  background: url('assets/logobestshot.png') no-repeat center;
  background-size: contain;
  margin: 0 auto 20px;
}

#unity-progress-bar-empty {
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: var(--primary-light);
  border-radius: 4px;
  transition: width 0.3s ease;
}

#unity-warning {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#unity-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

#unity-build-title {
  color: white;
  font-size: 0.9rem;
}

#unity-fullscreen-button {
  width: 32px;
  height: 32px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>') no-repeat center;
  background-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

#unity-fullscreen-button:hover {
  opacity: 1;
}

/* App Store Links */
.app-links {
  text-align: center;
}

.app-links h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-block;
  transition: all 0.3s ease;
}

.store-btn:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.25);
}

.store-btn img {
  height: 40px;
  width: auto;
}

/* ==================== FOOTER ==================== */
footer {
  background: var(--primary-dark);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: auto;
  font-size: 0.85rem;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer .separator {
  color: var(--primary-success);
  margin: 0 10px;
}

/* ==================== RESPONSIVE (non-ad) ==================== */

@media (max-width: 768px) {
  .logo span {
    font-size: 1rem;
  }

  nav {
    display: none;
  }

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

  .hero p {
    font-size: 1rem;
  }

  #unity-container {
    width: 100%;
    height: auto;
    aspect-ratio: 9/16;
    max-height: 80vh;
  }

  .game-card {
    width: 100%;
    padding: 10px;
  }

  .store-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}