:root {
  --bg: #0a0a14;
  --panel: #12121f;
  --cyan: #00f0ff;
  --magenta: #ff2fb3;
  --yellow: #ffe14d;
  --text: #e8e8f0;
  --muted: #8a8aa3;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,240,255,.08), transparent),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(255,47,179,.07), transparent);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px);
  opacity: .5;
}
a { color: var(--cyan); text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header.top {
  border-bottom: 1px solid #23233a;
  padding: 18px 0;
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,10,20,.92); backdrop-filter: blur(8px);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: "Press Start 2P", monospace; font-size: 18px; color: var(--text);
  text-shadow: 0 0 12px var(--cyan);
}
.logo span { color: var(--magenta); text-shadow: 0 0 12px var(--magenta); }
nav a { margin-left: 22px; font-weight: 600; font-size: 15px; }
nav a:hover { color: var(--yellow); }

.hero { text-align: center; padding: 64px 20px 40px; }
.hero h1 {
  font-family: "Press Start 2P", monospace; font-size: clamp(22px, 4vw, 40px);
  line-height: 1.5; margin-bottom: 18px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(0,240,255,.35));
}
.hero p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto 26px; line-height: 1.7; }
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 10px; font-weight: 700;
  background: linear-gradient(90deg, var(--cyan), #00a8ff); color: #04121a;
  box-shadow: 0 0 24px rgba(0,240,255,.4); transition: transform .15s;
  border: none; cursor: pointer; font-size: 15px;
}
.btn:hover { transform: translateY(-2px); }
.btn.pink { background: linear-gradient(90deg, var(--magenta), #ff6b3d); color: #1a0412; box-shadow: 0 0 24px rgba(255,47,179,.4); }
.btn.ghost { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); box-shadow: none; }

.section-title {
  font-family: "Press Start 2P", monospace; font-size: 16px; margin: 44px 0 22px;
  color: var(--yellow); text-shadow: 0 0 10px rgba(255,225,77,.5);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid #26263e; border-radius: 14px; overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 8px 30px rgba(0,240,255,.15); }
.card .thumb {
  height: 150px; display: flex; align-items: center; justify-content: center; font-size: 56px;
  background: linear-gradient(135deg, #1b1b33, #2b1040);
}
.card .body { padding: 16px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card .genre {
  display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: rgba(0,240,255,.12); color: var(--cyan); margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 12px; min-height: 44px; }
.card .play-link { font-weight: 700; }

.player-shell {
  background: #000; border: 1px solid #2c2c48; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,240,255,.12);
}
#player-container { width: 100%; aspect-ratio: 11 / 8; background: #000; }
#player-container ruffle-player { width: 100% !important; height: 100% !important; display: block; }
.game-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 34px 0 18px; }
.game-head h2 { font-size: 26px; }
.game-head .actions { display: flex; gap: 10px; }
.back { display: inline-block; margin: 26px 0 0; color: var(--muted); }
.back:hover { color: var(--cyan); }
.desc { color: var(--muted); line-height: 1.7; margin: 18px 0 60px; max-width: 720px; }

.dropzone {
  border: 2px dashed #3a3a5c; border-radius: 16px; padding: 70px 30px; text-align: center;
  background: var(--panel); cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--cyan); background: #161628; }
.dropzone .big { font-size: 52px; margin-bottom: 14px; }
.dropzone p { color: var(--muted); }
.note {
  margin: 26px 0 60px; padding: 16px 20px; border-left: 3px solid var(--yellow);
  background: rgba(255,225,77,.06); color: var(--muted); font-size: 14px; line-height: 1.7; border-radius: 0 10px 10px 0;
}
.howto {
  background: var(--panel); border: 1px solid #26263e; border-radius: 14px; padding: 26px;
  margin: 10px 0 70px; line-height: 1.8; color: var(--muted); font-size: 15px;
}
.howto code { background: #0a0a14; padding: 2px 8px; border-radius: 6px; color: var(--cyan); font-size: 13px; }
.howto ol { margin: 10px 0 0 20px; }
.howto li { margin-bottom: 8px; }

footer { border-top: 1px solid #23233a; padding: 30px 0 46px; color: var(--muted); font-size: 13px; line-height: 1.8; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
