@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Syne:wght@600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --ink: #07090b;
  --ink-2: #0e1216;
  --panel: #12181f;
  --line: rgba(232, 240, 230, 0.12);
  --bone: #e8f0e6;
  --muted: rgba(232, 240, 230, 0.62);
  --lime: #c8ff3d;
  --lime-dim: #9fd61f;
  --teal: #2ee6c5;
  --warn: #ff6b4a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --nav-h: 64px;
  --f-display: 'Syne', 'Noto Sans SC', sans-serif;
  --f-body: 'IBM Plex Sans', 'Noto Sans SC', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--bone);
  font-family: var(--f-body);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(200, 255, 61, 0.12), transparent 55%),
    radial-gradient(900px 600px at 95% 8%, rgba(46, 230, 197, 0.1), transparent 50%),
    linear-gradient(180deg, #050607 0%, var(--ink) 40%, #05080a 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--lime);
  color: #06100a;
  padding: 8px 12px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 11, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}

.brand span {
  color: var(--lime);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--bone);
  background: rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: var(--lime);
  color: #07110a;
  box-shadow: 0 0 0 1px rgba(200, 255, 61, 0.25), 0 10px 30px rgba(200, 255, 61, 0.18);
}

.btn-primary:hover {
  background: #d6ff66;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--bone);
}

.btn-ghost:hover {
  border-color: rgba(232, 240, 230, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

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

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 11, 0.25) 0%, rgba(7, 9, 11, 0.55) 45%, rgba(7, 9, 11, 0.92) 100%),
    linear-gradient(90deg, rgba(7, 9, 11, 0.75) 0%, rgba(7, 9, 11, 0.2) 55%, rgba(7, 9, 11, 0.55) 100%);
}

.hero-visual iframe,
.hero-visual .hero-fallback {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
}

.hero-fallback {
  background:
    radial-gradient(circle at 30% 40%, rgba(200, 255, 61, 0.22), transparent 35%),
    radial-gradient(circle at 70% 60%, rgba(46, 230, 197, 0.18), transparent 40%),
    repeating-linear-gradient(
      -18deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 14px
    ),
    #0b1117;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) clamp(40px, 7vw, 80px);
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 14vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
}

.hero-brand em {
  font-style: normal;
  color: var(--lime);
}

.hero-line {
  margin: 0 0 28px;
  max-width: 28ch;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--muted);
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 42ch;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.game-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 220px;
  isolation: isolate;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: rise 0.7s var(--ease) both;
}

.game-tile:nth-child(2) {
  animation-delay: 0.06s;
}
.game-tile:nth-child(3) {
  animation-delay: 0.12s;
}
.game-tile:nth-child(4) {
  animation-delay: 0.18s;
}

.game-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 255, 61, 0.35);
  box-shadow: var(--shadow);
}

.game-tile .thumb {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(46, 230, 197, 0.18), transparent 45%),
    linear-gradient(220deg, rgba(200, 255, 61, 0.12), transparent 40%),
    var(--ink-2);
}

.game-tile .thumb iframe {
  width: 140%;
  height: 140%;
  border: 0;
  transform: translate(-10%, -8%) scale(0.72);
  transform-origin: top left;
  pointer-events: none;
  filter: brightness(0.85);
  opacity: 0.9;
}

.game-tile .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 9, 0.92) 55%);
}

.game-tile h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.game-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(46, 230, 197, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
}

.empty {
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 28px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.92rem;
}

.site-footer strong {
  color: var(--bone);
  font-family: var(--f-display);
}

/* Upload / forms */
.page-shell {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px) 72px;
}

.page-shell h1 {
  margin: 0 0 10px;
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
}

.lead {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(18, 24, 31, 0.72);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--bone);
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(200, 255, 61, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 255, 61, 0.12);
}

.dropzone {
  border: 1px dashed rgba(232, 240, 230, 0.22);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(200, 255, 61, 0.5);
  background: rgba(200, 255, 61, 0.05);
}

.dropzone strong {
  display: block;
  color: var(--bone);
  margin-bottom: 6px;
}

.status {
  min-height: 1.4em;
  font-size: 0.95rem;
}

.status.ok {
  color: var(--teal);
}

.status.err {
  color: var(--warn);
}

/* Play shell */
.play-body {
  margin: 0;
  background: #000;
  overflow: hidden;
  height: 100svh;
}

.play-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 12px;
  background: rgba(7, 9, 11, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.play-bar.is-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.play-bar .title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-frame {
  position: fixed;
  inset: 52px 0 0;
  border: 0;
  width: 100%;
  height: calc(100% - 52px);
  background: #000;
}

.play-frame.is-immersive {
  inset: 0;
  height: 100%;
}

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

@media (max-width: 720px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  .hero-brand {
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .game-tile .thumb iframe {
    display: none;
  }
}

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