:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: #10141d;
  --panel-2: #151a25;
  --text: #f5f7fb;
  --muted: #969fb1;
  --line: #242b3a;
  --accent: #7b61ff;
  --accent-2: #31d6a4;
  --danger: #ff667d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 70% -10%, #1b1a39 0, transparent 35%), var(--bg); color: var(--text); }
body { min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; max-width: 1500px; margin: 0 auto; padding: 0 28px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, var(--accent), #a58cff); font-weight: 900; box-shadow: 0 8px 30px rgba(123,97,255,.32); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: .95; letter-spacing: .06em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.header-actions, .hero-actions { display: flex; gap: 10px; align-items: center; }
.button { border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; color: var(--text); background: var(--panel-2); transition: .18s ease; }
.button:hover { transform: translateY(-1px); border-color: #3a4358; }
.button.primary { background: linear-gradient(135deg, var(--accent), #6548fb); box-shadow: 0 8px 24px rgba(123,97,255,.24); }
.button.ghost { background: #11151e; border-color: var(--line); }
.button.large { padding: 13px 17px; }
.hero { min-height: 430px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 50px; padding: 52px 0 44px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--accent-2); font-size: 12px; }
h1 { font-size: clamp(42px, 6vw, 76px); letter-spacing: -.055em; line-height: .96; margin: 12px 0 20px; max-width: 850px; }
.hero-copy { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.7; margin-bottom: 28px; }
.console-art { min-height: 300px; position: relative; display: grid; place-items: center; }
.screen-glow { width: min(330px, 90%); aspect-ratio: 4 / 3; border: 14px solid #181d28; border-radius: 28px; background: radial-gradient(circle, rgba(49,214,164,.34), transparent 56%), #0d1118; box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 0 1px #30384b; display: grid; place-items: center; transform: rotate(-3deg); }
.screen-glow span { color: #bffff0; font-size: 42px; font-weight: 900; letter-spacing: .05em; text-shadow: 0 0 24px #31d6a4; }
.controller { position: absolute; right: 0; bottom: 10px; width: 260px; height: 102px; border-radius: 55px; background: linear-gradient(145deg, #e6e8ee, #b8bdc8); color: #313644; display: flex; align-items: center; justify-content: space-around; box-shadow: 0 20px 40px rgba(0,0,0,.34); transform: rotate(6deg); font-weight: 900; }
.dpad { font-size: 52px; line-height: 1; }.select { font-size: 15px; letter-spacing: 9px; }.buttons { color: var(--accent); font-size: 24px; line-height: .7; }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 18px 0 22px; }
.toolbar h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }.toolbar p { margin: 4px 0 0; color: var(--muted); }
.search-wrap { display: flex; align-items: center; gap: 8px; min-width: min(360px, 50vw); border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 0 13px; }
.search-wrap input { width: 100%; background: transparent; border: 0; outline: 0; color: var(--text); padding: 12px 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; min-height: 160px; }
.game-card { min-width: 0; }
.cover-button { display: block; width: 100%; border: 0; background: transparent; padding: 0; }
.game-cover { aspect-ratio: 3 / 4; border-radius: 18px; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, #29224b, #111827 58%, #0e2d31); border: 1px solid #2a3244; box-shadow: 0 18px 45px rgba(0,0,0,.28); transition: .2s ease; }
.cover-button:hover .game-cover { transform: translateY(-4px) scale(1.01); border-color: #554b83; }
.cover-initials { font-size: 56px; font-weight: 900; letter-spacing: -.06em; color: #ffffff22; }
.play-badge { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: #0a0c12; opacity: 0; transform: translateY(8px); transition: .18s ease; }
.cover-button:hover .play-badge { opacity: 1; transform: none; }
.game-info { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-top: 12px; }
.game-info h3 { margin: 0 0 4px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.game-info p { margin: 0; color: var(--muted); font-size: 12px; }
.more-button { color: var(--muted); background: transparent; border: 0; padding: 4px; letter-spacing: 2px; }
.empty-state { border: 1px dashed #333c50; background: linear-gradient(180deg, #10141d, #0d1017); border-radius: 22px; padding: 46px 24px; text-align: center; margin: 8px 0 40px; }
.empty-state[hidden] { display: none; }.empty-icon { font-size: 42px; }.empty-state h3 { margin: 10px 0 8px; }.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; line-height: 1.6; }
footer { display: flex; justify-content: space-between; gap: 12px; color: #687185; font-size: 12px; border-top: 1px solid var(--line); padding: 28px 0; margin-top: 54px; }
.dialog { width: min(620px, calc(100vw - 30px)); border: 1px solid #30384a; background: #11151e; color: var(--text); border-radius: 20px; padding: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.7); }.dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(8px); }.dialog h2 { margin-top: 6px; }.dialog p { color: var(--muted); line-height: 1.65; }.dialog-close { float: right; border: 0; background: transparent; color: var(--text); font-size: 28px; }.legal-note { border-top: 1px solid var(--line); padding-top: 16px; }
.player-overlay { position: fixed; inset: 0; z-index: 100; background: #030405; display: flex; flex-direction: column; }.player-overlay[hidden] { display: none; }.player-topbar { height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid #222733; background: #0a0c11; }.player-topbar > :last-child { justify-self: end; }.playing-meta { text-align: center; min-width: 0; display: flex; flex-direction: column; }.playing-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }.playing-meta span { color: var(--muted); font-size: 11px; margin-top: 3px; }#playerFrame { flex: 1; width: 100%; border: 0; background: #000; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; background: #1a202c; color: var(--text); border: 1px solid #354057; border-radius: 12px; padding: 12px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.45); max-width: min(540px, calc(100vw - 24px)); }
.context-menu { position: fixed; z-index: 80; min-width: 180px; padding: 6px; border-radius: 12px; background: #171b25; border: 1px solid #30384a; box-shadow: 0 20px 50px rgba(0,0,0,.5); }.context-menu button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 10px 12px; border-radius: 8px; }.context-menu button:hover { background: #232a39; }.context-menu .danger { color: var(--danger); }
@media (max-width: 820px) { .app-shell { padding: 0 16px; }.hero { grid-template-columns: 1fr; padding-top: 36px; }.console-art { min-height: 230px; order: -1; }.screen-glow { width: 230px; }.controller { width: 190px; height: 76px; right: 5%; }.dpad { font-size: 38px; }.toolbar { align-items: stretch; flex-direction: column; }.search-wrap { min-width: 100%; }.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.player-topbar { grid-template-columns: auto 1fr auto; }.playing-meta strong { max-width: 35vw; }.button { padding: 9px 11px; }.header-actions .ghost { display: none; } }
@media (max-width: 500px) { h1 { font-size: 40px; }.hero-actions { align-items: stretch; flex-direction: column; }.console-art { display: none; }.topbar { height: 68px; }.header-actions .button.primary { font-size: 0; }.header-actions .button.primary::after { content: "+ ROM"; font-size: 14px; }.player-topbar { height: 58px; }.player-topbar .button { font-size: 12px; padding: 8px; }.playing-meta span { display: none; } }
