/* =====================
   VARIABLES & RESET
   ===================== */
:root {
  --bg:         #262626;
  --bg-alt:     #2f2f2f;
  --bg-card:    #323232;
  --bg-nav:     #1e1e1ecc;
  --border:     #444;
  --accent:     #f0a030;
  --accent-hover: #e08e18;
  --text:       #e2e2e2;
  --text-muted: #888;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); background: #ffffff10; }

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-btn {
  color: var(--accent);
  background: none;
  border: none;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* =====================
   HEADER / NAV
   ===================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-nav);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  width: 28px;
  height: 32px;
  color: var(--accent);
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 5px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================
   HERO
   ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 1.5rem 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, #f0a03015 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 420px;
}

/* =====================
   SECTIONS
   ===================== */
.section {
  padding: 5rem 1.5rem;
}

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

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.01em;
}

/* =====================
   GAMES GRID
   ===================== */
.games-section { background: var(--bg-alt); }

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

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Thumbnails */
.game-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
}

/* Bouncin' Around thumbnail */
.bouncin-thumb {
  background: #7db8e8;
}
.thumb-square {
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--accent);
  bottom: 70px;
  left: 45%;
  border-radius: 2px;
  animation: bounce-demo 1.4s ease-in-out infinite;
}
.thumb-platform {
  position: absolute;
  height: 3px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  bottom: 60px;
  left: 35%;
  width: 80px;
}
.thumb-platform.p2 { bottom: 110px; left: 55%; width: 60px; }
.thumb-platform.p3 { bottom: 140px; left: 20%; width: 70px; }

@keyframes bounce-demo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* Emoji Catch thumbnail */
.emoji-thumb {
  background: #1e1e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.thumb-emoji {
  font-size: 2.5rem;
  animation: float-emoji 2s ease-in-out infinite;
}
.thumb-emoji.e2 { animation-delay: 0.4s; font-size: 2rem; }
.thumb-emoji.e3 { animation-delay: 0.8s; font-size: 1.8rem; }
@keyframes float-emoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Bradley Acres thumbnail */
.bradley-thumb {
  background: linear-gradient(180deg, #3a5a3a 0%, #4a7a4a 60%, #6a9a4a 100%);
}
.thumb-tree {
  position: absolute;
  bottom: 30px;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 60px solid #2d4a2d;
}
.thumb-tree::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -15px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 40px solid #4a6a2a;
}
.thumb-tree.t1 { left: 25%; }
.thumb-tree.t2 { left: 60%; bottom: 20px; border-bottom-width: 80px; border-left-width: 28px; border-right-width: 28px; }
.thumb-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: #5a3a1a;
}

.game-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.game-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.game-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Badges */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.badge-live    { background: #1a3a1a; color: #5adb5a; }
.badge-soon    { background: #1a2a3a; color: #5aaff0; }
.badge-proto   { background: #3a2a1a; color: #f0aa5a; }

/* =====================
   ABOUT
   ===================== */
.about-section { background: var(--bg); }

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 520px;
  font-size: 1rem;
}
.about-text .section-title { margin-bottom: 1.5rem; }

.about-logo-large svg {
  width: 120px;
  height: 100px;
  color: var(--accent);
  opacity: 0.2;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: #1e1e1e;
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
}

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

.footer-logo {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

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

/* =====================
   MODALS
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* Game modal */
.game-modal-inner {
  width: min(960px, 95vw);
}

#game-frame {
  display: block;
  width: 100%;
  height: min(540px, 60vh);
  border: none;
  background: #000;
}

/* Nav user pill (shown when signed in) */
.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

#nav-username {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 640px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    background: #1e1e1ef5;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
  }
  .nav-links.open { display: flex; }

  .nav-link { padding: 0.6rem 0; }
  .btn-ghost, .btn-accent { width: 100%; }

  .about-grid { grid-template-columns: 1fr; }
  .about-logo-large { display: none; }
}
