:root {
  --bg: #0b0912; --panel: #14102a; --panel-2: #1a1535; --line: #2a2350; --line-2: #3a3170;
  --text: #efeaff; --muted: #9a93b8; --violet: #8f7cff; --violet-2: #b5a8ff; --twitch: #9146ff; --red: #ff5468;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Figtree", system-ui, sans-serif;
  --r: 6px; --gap: 14px; --pad: clamp(16px, 3vw, 44px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .92em; background: #231c4a; border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; color: var(--violet-2); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--pad); }
.word { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { padding: 8px 12px; color: var(--muted); font-weight: 500; transition: color .2s; }
.top nav a:hover { color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--twitch); color: #fff !important; font-weight: 600; padding: 9px 16px; border-radius: 4px; transition: background .2s, transform .2s; }
.btn:hover { background: #a46cff; transform: translateY(-1px); }
.btn.big { padding: 13px 22px; font-size: 16px; }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(170px, auto); gap: var(--gap); padding: 6px var(--pad) var(--pad); max-width: 1500px; margin: 0 auto; }
.tile { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; animation: up .6s calc(var(--i) * 70ms) cubic-bezier(.2, .8, .2, 1) both; transition: border-color .25s, transform .25s; }
a.tile:hover, .tile:hover { border-color: var(--line-2); }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-2); }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -.03em; line-height: 1.02; }

.hero { grid-column: span 2; grid-row: span 2; min-height: 360px; justify-content: flex-end; background: #17123a; }
.hero-t { position: relative; z-index: 2; max-width: 22em; }
.hero h1 { font-size: clamp(38px, 5vw, 76px); font-weight: 800; }
.lead { margin: 14px 0 24px; max-width: 24em; color: #cfc7ee; font-size: clamp(16px, 1.4vw, 19px); }
.hero-logo { position: absolute; right: 3%; top: 4%; width: min(42%, 340px); height: auto; z-index: 1; animation: sway 7s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes sway { 50% { transform: rotate(-3deg) translateY(-6px); } }

.player { grid-column: span 2; grid-row: span 2; padding: 0; background: #0f0b22; }
.player-poster { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; height: 100%; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: clamp(18px, 2vw, 28px); position: relative; background: repeating-linear-gradient(135deg, #130e2b 0 14px, #17123a 14px 15px); }
.player-poster b { font: 700 clamp(22px, 2.4vw, 32px)/1.1 var(--display); letter-spacing: -.02em; }
.player-poster small { color: var(--muted); font-size: 14px; }
.live-tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-2); }
.live-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--twitch); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.play { position: absolute; left: 50%; top: 42%; width: 84px; height: 84px; margin: -42px 0 0 -42px; display: grid; place-items: center; background: var(--twitch); border-radius: 50%; transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .2s; }
.play svg { width: 36px; height: 36px; fill: #fff; margin-left: 4px; }
.player-poster:hover .play, .player-poster:focus-visible .play { transform: scale(1.1); background: #a46cff; }
.player-poster:focus-visible { outline: 2px solid var(--violet); outline-offset: -4px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.game { grid-column: span 2; justify-content: flex-start; gap: 8px; }
.game h2 { font-size: clamp(26px, 2.6vw, 38px); }
.game p { margin: 0; max-width: 28em; color: #cfc7ee; }
.go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-weight: 600; color: #fff; }
.go svg, .more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform .25s; }
.game:hover .go svg { transform: translateX(5px); }
.fan { position: absolute; right: 22px; bottom: -34px; width: 190px; height: 150px; }
.fan i { position: absolute; bottom: 0; left: 50%; width: 92px; height: 128px; margin-left: -46px; border-radius: 5px; border: 1px solid var(--line-2); background: #1a1440 url("/assets/logo-tcg.png?v=2") center / 58% no-repeat; transform-origin: 50% 120%; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.fan i:nth-child(1) { transform: rotate(-24deg) translateX(-28px); filter: brightness(.7); }
.fan i:nth-child(2) { transform: rotate(-8deg) translateX(-10px); filter: brightness(.85); }
.fan i:nth-child(3) { transform: rotate(8deg) translateX(10px); filter: brightness(.95); }
.fan i:nth-child(4) { transform: rotate(24deg) translateX(28px); }
.game:hover .fan i:nth-child(1) { transform: rotate(-32deg) translateX(-40px) translateY(-8px); }
.game:hover .fan i:nth-child(2) { transform: rotate(-11deg) translateX(-14px) translateY(-14px); }
.game:hover .fan i:nth-child(3) { transform: rotate(11deg) translateX(14px) translateY(-14px); }
.game:hover .fan i:nth-child(4) { transform: rotate(32deg) translateX(40px) translateY(-8px); }

.board { grid-row: span 2; }
.board ol { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: 10px; }
.board li { display: grid; grid-template-columns: 26px 38px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); animation: up .5s calc(var(--k, 0) * 90ms) both; }
.board li:last-child { border-bottom: 0; }
.rk { font: 800 20px/1 var(--display); color: var(--violet-2); }
.board li:first-child .rk { color: #e8b84a; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--panel-2) center / cover; display: grid; place-items: center; font: 700 15px var(--display); color: var(--violet-2); }
.nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.more { display: inline-flex; margin-top: 14px; font-weight: 600; color: var(--violet-2); transition: color .2s; }
.more:hover { color: #fff; }
.sk-li { display: block !important; grid-template-columns: none !important; }
.sk { display: block; height: 40px; border-radius: 3px; background: var(--panel-2); position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(100deg, transparent 20%, rgba(184, 162, 255, .3) 45%, rgba(130, 210, 255, .24) 55%, transparent 80%); animation: sweep 1.5s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes sweep { to { transform: translateX(100%); } }

.stat { justify-content: flex-end; gap: 4px; }
.num { font: 800 clamp(44px, 5vw, 72px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14.5px; max-width: 14em; }

.cmds { grid-column: span 2; }
.cmds ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; }
.cmds li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cmds li span { color: var(--muted); font-size: 14px; text-align: right; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 6px var(--pad) 30px; max-width: 1500px; margin: 0 auto; color: var(--muted); font-size: 13.5px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: #fff; }

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .hero, .player, .game, .cmds { grid-column: span 2; }
  .hero { grid-row: span 1; min-height: 360px; }
  .player { grid-row: span 1; }
  .board { grid-row: span 1; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .hero, .player, .game, .cmds, .board, .stat { grid-column: span 1; }
  .hero-logo { width: 50%; right: 2%; top: 2%; }
  .hero { min-height: 400px; }
  .cmds ul { grid-template-columns: 1fr; }
  .top nav a:not(.btn) { display: none; }
  .fan { right: 8px; transform: scale(.85); transform-origin: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (min-width: 1001px) and (max-width: 1220px) { .fan { display: none; } }
