@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --font-display: 'Fraunces', serif;
  --font-ui: 'Space Grotesk', sans-serif;
  --bg: #f5efe6;
  --bg-accent: #fbd9b4;
  --ink: #1f1a12;
  --muted: #5c5348;
  --card: #fef7ee;
  --accent: #e86b2c;
  --accent-2: #2e9f9c;
  --shadow: rgba(24, 17, 10, 0.15);
  --shadow-strong: rgba(24, 17, 10, 0.25);
  --border: rgba(24, 17, 10, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background: radial-gradient(circle at top, #fce4c6 0%, var(--bg) 48%);
  color: var(--ink);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  padding: 28px clamp(20px, 4vw, 64px) 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.page::before {
  content: '';
  position: absolute;
  inset: -20% 40% auto -10%;
  height: 45vh;
  background: radial-gradient(circle, rgba(46, 159, 156, 0.24), transparent 70%);
  z-index: 0;
}

.page::after {
  content: '';
  position: absolute;
  inset: auto -15% -10% 35%;
  height: 50vh;
  background: radial-gradient(circle, rgba(232, 107, 44, 0.2), transparent 70%);
  z-index: 0;
}

.site-header,
.content,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 46px);
  letter-spacing: -0.02em;
}

.brand__sub {
  color: var(--muted);
  font-size: 0.98rem;
}

.game-nav {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px;
  box-shadow: 0 10px 20px var(--shadow);
  backdrop-filter: blur(8px);
}

.game-nav__scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.game-nav__scroller::-webkit-scrollbar {
  height: 6px;
}

.game-nav__scroller::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

.game-tab {
  border: none;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.game-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px var(--shadow);
}

.game-tab[data-active='true'] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px var(--shadow-strong);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: grid;
  gap: 14px;
  max-width: 720px;
  animation: rise 0.6s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 54px);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.status {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px var(--shadow);
  font-weight: 600;
}

.status__label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.status__meta {
  color: var(--accent-2);
  font-weight: 600;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 28px;
  align-items: stretch;
}

.stage__frame {
  position: relative;
  background: #0f0c08;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 40px var(--shadow-strong);
  overflow: hidden;
  min-height: 380px;
  height: min(68vh, 720px);
}

.stage__frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0f0c08;
}

.stage__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15, 12, 8, 0.92), rgba(15, 12, 8, 0.6));
  color: #fef6ed;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.stage__loading.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.stage__panel {
  background: var(--card);
  border-radius: 24px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 30px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slide-in 0.6s ease both;
}

.stage__panel h2 {
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--font-display);
}

.stage__panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  background: rgba(46, 159, 156, 0.14);
  color: #1b4c4a;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

.meta-pill span {
  color: var(--muted);
  font-weight: 500;
  margin-right: 6px;
}

.game-link {
  margin-top: auto;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-accent);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(232, 107, 44, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px var(--shadow);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-links a {
  color: inherit;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
  }

  .stage__frame {
    height: min(62vh, 620px);
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 18px 32px;
  }

  .game-nav {
    border-radius: 18px;
  }

  .status {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
