/* Ice Turtle Games: the portal's look (home and game pages, generated by tools/build_portal.mjs). */
@font-face { font-family: 'Exo 2'; src: url('/studio-assets/fonts/Exo2.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #070a16; --panel: #10162b; --panel2: #161e38; --line: rgba(148, 178, 230, 0.16); --text: #eaf0fa; --dim: #a3b2ca;
  --gold: #fbbf24; --mint: #5eead4; --radius: 14px; --a: var(--gold);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 80px; }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.5 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(22px, 3vw, 28px); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--gold); color: #1a1205; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(7, 10, 22, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; white-space: nowrap; }
.top-links { display: flex; gap: 4px; }
.top-links a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--dim); font-weight: 600; }
.top-links a:hover { color: var(--text); background: var(--panel2); }
.search { margin-left: auto; flex: 0 1 300px; min-width: 120px; }
.search input { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.search input::placeholder { color: var(--dim); }

.hero { padding-top: 28px; }
.hero-intro h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -0.01em; }
.hero-intro p { max-width: 62ch; margin: 10px 0 22px; color: var(--dim); font-size: 18px; }
.tiles { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; background: var(--panel); min-height: 190px; }
.tile.lead { grid-row: 1 / 3; min-height: 400px; }
.tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 7, 15, 0.05) 30%, rgba(5, 7, 15, 0.92)); }
.tile:hover > img { transform: scale(1.03); }
.tile-text { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; display: grid; gap: 6px; justify-items: start; }
.tile .logo { max-height: 74px; width: auto; max-width: 70%; }
.tile.lead .logo { max-height: 112px; }
.tile .tag { color: var(--text); font-weight: 600; text-shadow: 0 1px 6px #000; }
.tile.lead .tag { font-size: 20px; }
.tile .cta { color: var(--a); font-weight: 700; font-size: 14px; text-shadow: 0 1px 6px #000; }

.shelf { padding-top: 44px; }
.shelf[hidden] { display: none; }
.shelf h2 { margin-bottom: 14px; }
.shelf .lead { margin: -8px 0 16px; color: var(--dim); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform 0.15s ease, border-color 0.15s ease; }
.card[hidden] { display: none; }
.card:hover { transform: translateY(-3px); border-color: var(--a); }
.card-link { display: block; height: 100%; text-decoration: none; }
.art { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel2); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(5, 7, 15, 0.82); font-size: 12px; font-weight: 700; color: var(--a); }
.body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.name { font-weight: 800; font-size: 17px; }
.tag { color: var(--dim); font-size: 14px; line-height: 1.35; }
.card .tag { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--dim); font-size: 12px; font-weight: 600; }
.meta em { color: var(--mint); font-style: normal; white-space: nowrap; }
.fav { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(5, 7, 15, 0.72); color: #cbd5e1; font-size: 18px; line-height: 1; cursor: pointer; }
.fav:hover { color: #fff; }
.fav[aria-pressed='true'], .fav-big[aria-pressed='true'] span:first-child { color: #fb7185; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed='true'] { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.count { margin: 12px 0; color: var(--dim); font-size: 14px; }
.empty { padding: 30px 0; color: var(--dim); }
.empty[hidden] { display: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 1px solid transparent; border-radius: 10px; background: linear-gradient(180deg, #fcd34d, #e0a516); color: #1a1205; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; font-weight: 700; }
.btn[hidden] { display: none; }

.studio { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 52px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); }
.studio p { max-width: 62ch; margin: 6px 0 0; color: var(--dim); }

.foot { margin-top: 40px; padding: 34px 0 44px; background: #050711; border-top: 1px solid var(--line); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 24px; }
.foot p { margin: 8px 0 0; color: var(--dim); }
.foot .fine { font-size: 13px; }
.foot ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.foot li a { display: inline-block; padding: 4px 0; color: var(--dim); text-decoration: none; }
.foot li a:hover { color: var(--text); text-decoration: underline; }

.game { padding-top: 16px; }
.crumbs { color: var(--dim); font-size: 14px; margin-bottom: 14px; }
.crumbs a { color: var(--dim); }
.game-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.stage { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--panel); text-decoration: none; }
.stage img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.stage:hover img { transform: scale(1.02); }
.stage-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; gap: 10px; padding: 14px 26px; border-radius: 999px; background: rgba(5, 7, 15, 0.84); border: 2px solid var(--a); font-size: 20px; font-weight: 800; white-space: nowrap; }
.beta { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 6px; background: var(--panel2); color: var(--a); font-size: 13px; font-weight: 700; }
.game h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.pitch { margin: 10px 0 18px; font-size: 18px; color: var(--dim); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li { padding: 3px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-size: 13px; font-weight: 600; }
.facts li[hidden] { display: none; }
.facts .live { color: var(--mint); }
.game section { margin-top: 36px; }
.game section > h2 { margin-bottom: 12px; }
.game section > p { max-width: 75ch; margin: 0; color: var(--dim); }
.how { max-width: 75ch; margin: 0; padding-left: 20px; color: var(--dim); }
.how li { margin: 4px 0; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }

.player { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #000; height: 100dvh; }
.player[hidden] { display: none; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); background: #0a0e1d; }
.player-bar b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-tools { display: flex; gap: 6px; flex: none; }
.player iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: #000; }
.player:fullscreen .player-bar { display: none; }
body.playing { overflow: hidden; }

@media (max-width: 860px) {
  .top-links { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .tile.lead { grid-column: 1 / 3; grid-row: auto; min-height: 280px; }
  .tile { min-height: 170px; }
  .tile .logo { max-height: 56px; }
  .tile:not(.lead) .tag, .tile:not(.lead) .long { display: none; }
  .game-top { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .top-row { gap: 10px; min-height: 58px; }
  .brand span { display: none; }
  .search { flex: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .name { font-size: 15px; }
  .body { padding: 10px; }
  .card .meta > span { display: none; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
