@font-face { font-family: "SST Sub"; src: url(/assets/fonts/ss3-300.woff2) format("woff2"); font-weight: 300; font-display: block; }
@font-face { font-family: "SST Sub"; src: url(/assets/fonts/ss3-400.woff2) format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "SST Sub"; src: url(/assets/fonts/ss3-500.woff2) format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "SST Sub"; src: url(/assets/fonts/ss3-600.woff2) format("woff2"); font-weight: 600; font-display: block; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; }
body {
  font-family: "SST", "SST Sub", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* 1920x1080 stage, scaled to fit the window (letterboxed like a TV) */
#viewport { position: fixed; inset: 0; display: grid; place-items: center; }
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  overflow: hidden; background: #000;
}

/* ---------- background ---------- */
#bg, .bg-layer, #shade { position: absolute; inset: 0; }
.bg-layer { opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.bg-layer.is-on { opacity: 1; transform: scale(1); }
.bg-layer video, .bg-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-layer img.wide { object-position: 70% 50%; }
.bg-layer.sys { background: radial-gradient(120% 90% at 75% 20%, #1f3b75 0%, #0b1a3d 45%, #050b1c 100%); }
.bg-layer.sys.lib { background: radial-gradient(120% 90% at 75% 20%, #3a3d44 0%, #1c1d21 50%, #0c0c0e 100%); }

/* readability shading, as on the console: darker left, top and bottom */
#shade {
  background:
    linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,0) 26%),
    linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 22%, rgba(0,0,0,0) 40%),
    linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.12) 38%, rgba(0,0,0,0) 60%);
  pointer-events: none;
}

/* ---------- header ---------- */
#top { position: absolute; left: 0; right: 0; top: 0; height: 126px; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.tabs { position: absolute; left: 93px; top: 40px; display: flex; gap: 0; }
.tab { font-size: 34px; line-height: 46px; font-weight: 400; color: rgba(255,255,255,.62); margin-right: 81px; letter-spacing: .1px; }
.tab.is-active { color: #fff; font-weight: 600; }
.sysbar { position: absolute; right: 87px; top: 39px; height: 48px; display: flex; align-items: center; }
.sys-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-right: 56px; }
.sys-icon svg { width: 31px; height: 31px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }
.sys-icon:nth-child(2) svg { width: 36px; height: 36px; }
.avatar { position: relative; width: 48px; height: 48px; border-radius: 50%; margin-right: 92px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar .online { position: absolute; right: -3px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; background: #2ad06c; }
#clock { font-size: 37px; font-weight: 300; letter-spacing: .5px; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }

/* ---------- tile row ---------- */
#row { position: absolute; left: 0; right: 0; top: 126px; height: 170px; }
#track {
  position: absolute; left: 0; top: 0; height: 168px; display: flex; align-items: flex-start;
  transition: transform .26s cubic-bezier(.25,.8,.25,1);
  will-change: transform;
}
.tile {
  position: relative; flex: none; width: 105px; height: 105px; margin-right: 9px;
  border-radius: 13px; overflow: visible; cursor: pointer;
  transition: width .22s cubic-bezier(.25,.8,.25,1), height .22s cubic-bezier(.25,.8,.25,1), margin .22s cubic-bezier(.25,.8,.25,1), border-radius .22s;
}
.tile .art {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background: rgba(32,33,37,.86); box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.tile .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.sys .art { display: grid; place-items: center; }
.tile.sys .art svg { width: 46%; height: 46%; transition: width .22s, height .22s; }
.tile.is-sel { width: 168px; height: 168px; margin: 0 17px 0 8px; border-radius: 18px; }
.tile::after {
  content: ""; position: absolute; inset: -7px; border-radius: 24px;
  border: 3px solid #fff; opacity: 0; transform: scale(.96);
  transition: opacity .18s ease, transform .22s cubic-bezier(.25,.8,.25,1);
  pointer-events: none; box-shadow: 0 0 18px rgba(255,255,255,.18);
}
#stage.focus-row .tile.is-sel::after { opacity: 1; transform: scale(1); }

#label {
  position: absolute; left: 357px; top: 122px; height: 30px; display: flex; align-items: center;
  white-space: nowrap; transition: opacity .2s ease, transform .25s ease;
}
#label.out { opacity: 0; transform: translateX(-8px); transition: none; }
.ps5-badge { display: none; width: 75px; height: 30px; border-radius: 4px; background: #fff; align-items: center; justify-content: center; margin-right: 11px; }
.ps5-badge svg { width: 49px; height: 11px; fill: #000; }
#label.game .ps5-badge { display: inline-flex; }
#label-text { font-size: 31px; font-weight: 400; line-height: 30px; letter-spacing: .1px; text-shadow: 0 1px 8px rgba(0,0,0,.3); }

/* ---------- hero (game hub) ---------- */
#hero { position: absolute; left: 172px; top: 300px; width: 900px; height: 620px; transition: opacity .35s ease; }
#hero.hidden { opacity: 0; pointer-events: none; }
#logo-box {
  position: absolute; left: 0; bottom: 140px; width: 500px; height: 250px;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
#logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
#logo-box .logo-gta6 { height: 250px; }
#logo-box .logo-text { font-size: 72px; font-weight: 300; line-height: 1.05; max-width: 900px; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
#logo-box.swap { animation: logoIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes logoIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#actions { position: absolute; left: 0; top: 545px; display: flex; gap: 17px; }
.btn-play, .btn-more {
  height: 72px; border-radius: 36px; position: relative;
  background: rgba(255,255,255,.17);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: background .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.btn-play { width: 333px; font-size: 30px; font-weight: 600; letter-spacing: .2px; }
.btn-more { width: 72px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-more i { width: 7px; height: 7px; border-radius: 50%; background: #fff; transition: background .18s; }
#stage.focus-play .btn-play,
#stage.focus-more .btn-more { background: #fff; color: #111; box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 8px 26px rgba(0,0,0,.3); }
#stage.focus-more .btn-more i { background: #111; }
.pressed { transform: scale(.96); }

/* ---------- cards ---------- */
#cards { position: absolute; left: 172px; top: 982px; display: flex; gap: 32px; transition: opacity .35s ease; }
#cards.hidden { opacity: 0; }
.card {
  width: 503px; height: 250px; border-radius: 14px; padding: 22px 22px;
  background: rgba(24,24,27,.94); box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.card h3 { font-size: 27px; font-weight: 600; margin-top: 18px; letter-spacing: .1px; }
.trophies { display: flex; gap: 38px; height: 38px; align-items: center; }
.trophies .t { display: flex; align-items: center; gap: 9px; font-size: 26px; }
.trophies .t b { font-weight: 400; color: rgba(255,255,255,.88); }
.trophies svg { width: 22px; height: 30px; }
.card-icon { display: block; height: 38px; }
.card-icon svg { width: 34px; height: 34px; }

/* ---------- sound hint (browser autoplay rule) ---------- */
#sound-hint {
  position: absolute; left: 50%; top: 42px; transform: translateX(-50%);
  height: 44px; padding: 0 20px 0 14px; border-radius: 22px; display: flex; align-items: center; gap: 10px;
  background: rgba(20,20,22,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 21px; font-weight: 400; color: rgba(255,255,255,.92); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .4s ease, transform .4s ease;
  animation: hintPulse 2.4s ease-in-out infinite;
}
#sound-hint svg { width: 24px; height: 24px; }
#sound-hint.gone { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; animation: none; }
@keyframes hintPulse { 0%,100% { box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 0 rgba(255,255,255,.0); } 50% { box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 6px rgba(255,255,255,.08); } }

#rotate { display: none; position: absolute; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.55); font-size: 15px; top: calc(50% + 28.125vw + 24px); }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: block; } }

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