:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7fbff;
  background: #030611;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(22, 214, 255, .18), transparent 31rem),
    radial-gradient(circle at 90% 0%, rgba(240, 46, 255, .18), transparent 34rem),
    linear-gradient(155deg, #060a19, #030611 68%);
}

.activity-shell { width: min(1760px, 100%); margin: 0 auto; padding: clamp(15px, 3vw, 34px); }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand div { display: grid; line-height: 1; }
.brand span { color: #74ecff; font-size: .62rem; font-weight: 950; letter-spacing: .2em; }
.brand strong { margin-top: 4px; font-size: 1.2rem; font-style: italic; letter-spacing: .15em; }
.mode { padding: 8px 11px; border: 1px solid rgba(112, 231, 255, .25); border-radius: 999px; color: #aaf8ff; background: rgba(6, 13, 33, .8); font-size: .61rem; font-weight: 900; letter-spacing: .11em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(255px, auto);
  gap: 28px;
  align-items: end;
  margin: 22px 0 15px;
  padding: clamp(26px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid rgba(105, 228, 255, .2);
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(9, 19, 45, .94), rgba(23, 10, 55, .92));
  box-shadow: 0 26px 80px rgba(0, 0, 0, .34), inset 0 1px rgba(255,255,255,.04);
}
.eyebrow, .game-copy > span, .board-heading span, .board-picker > span { color: #73f0dc; font-size: .65rem; font-weight: 950; letter-spacing: .16em; }
.hero h1 { margin: 9px 0 13px; max-width: 760px; font-size: clamp(2.35rem, 6vw, 5rem); line-height: .93; letter-spacing: -.045em; }
.hero p:not(.eyebrow) { max-width: 670px; margin: 0; color: #abb6cd; line-height: 1.6; }
.player { display: flex; align-items: center; gap: 10px; min-width: 235px; padding: 12px 14px; border: 1px solid rgba(117, 231, 255, .2); border-radius: 14px; background: rgba(1, 5, 17, .58); }
.player > div { display: grid; gap: 2px; min-width: 0; }
.player strong, .player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player span { color: #8e9bb3; font-size: .7rem; }
.avatar, .rank-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #061019; background: linear-gradient(135deg, #77f2d9, #67dfff); font-weight: 950; }
.avatar { flex: 0 0 40px; width: 40px; height: 40px; }
.avatar img, .rank-avatar img { width: 100%; height: 100%; object-fit: cover; }

.catalogue { margin-top: 18px; counter-reset: arcade-card; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); align-items: end; gap: 28px; margin: 0 3px 16px; }
.section-heading .eyebrow, .scoreboard-header .eyebrow { margin: 0 0 7px; }
.section-heading h2, .scoreboard-header h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.4rem); letter-spacing: -.035em; }
.section-heading > p, .scoreboard-header > div > p:last-child { margin: 0; color: #a9b6cd; font-size: .88rem; line-height: 1.55; }
.featured-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.game-card { position: relative; display: block; min-width: 0; overflow: hidden; counter-increment: arcade-card; border: 1px solid rgba(107, 223, 255, .22); border-radius: 18px; color: inherit; text-decoration: none; background: #071022; box-shadow: 0 16px 40px rgba(0,0,0,.22); isolation: isolate; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.game-card::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 3px; background: var(--accent, #73f0dc); opacity: .75; }
.game-card::after { content: counter(arcade-card, decimal-leading-zero); position: absolute; z-index: 3; top: 12px; right: 12px; display: grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #f8fbff; background: rgba(3, 7, 18, .72); box-shadow: 0 8px 22px rgba(0,0,0,.22); font-size: .67rem; font-weight: 950; letter-spacing: .08em; }
.game-card:hover, .game-card:focus-visible { border-color: rgba(112, 244, 213, .62); outline: none; transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 28px rgba(80,230,219,.06); }
.game-card.featured { aspect-ratio: 16 / 10; min-height: 400px; }
.game-card.compact { aspect-ratio: 16 / 11; min-height: 348px; }
.game-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; align-content: end; min-height: 47%; padding: 86px 22px 21px; background: linear-gradient(180deg, transparent, rgba(3, 7, 18, .68) 28%, rgba(3, 7, 18, .96)); }
.game-copy h3 { margin: 6px 0 7px; max-width: 18ch; font-size: clamp(1.35rem, 2.5vw, 2.15rem); line-height: 1.03; text-shadow: 0 3px 18px rgba(0,0,0,.48); }
.game-copy p { margin: 0; max-width: 34ch; color: #d2daea; font-size: .86rem; line-height: 1.42; text-shadow: 0 2px 14px rgba(0,0,0,.52); }
.game-copy > strong { margin-top: 15px; color: #83ffe4; font-size: .72rem; letter-spacing: .08em; }
.game-copy > strong b { display: inline-block; margin-left: 3px; transition: transform .18s ease; }
.game-card:hover .game-copy > strong b { transform: translateX(4px); }
.game-card.compact .game-copy { min-height: 54%; padding: 78px 18px 18px; }
.game-card.compact .game-copy h3 { font-size: 1.38rem; line-height: 1.04; }
.game-card.compact .game-copy > strong { margin-top: 13px; }
.game-visual { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; overflow: hidden; background: #060a16; }
.game-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 35%, transparent 42%, rgba(2,5,14,.04) 76%), linear-gradient(180deg,rgba(2,5,14,0),rgba(2,5,14,.06)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.game-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: saturate(1.28) brightness(1.24); transition: transform .28s ease,filter .28s ease; }
.game-card:hover .game-visual img,.game-card:focus-visible .game-visual img { transform: scale(1.035); filter: saturate(1.08) brightness(1.04); }
.trivia { --accent: #62eaff; --glow: rgba(51,202,255,.24); }.guard { --accent: #bd78ff; --glow: rgba(162,74,255,.25); }.defence { --accent: #ef3f49; --glow: rgba(239,63,73,.2); }.mod { --accent: #70f0d6; --glow: rgba(70,232,205,.22); }.clash { --accent: #f15f4f; --glow: rgba(241,95,79,.23); }.bomb { --accent: #b8db7a; --glow: rgba(184,219,122,.24); }.dash { --accent: #58dfff; --glow: rgba(52,192,255,.23); }.match { --accent: #ff7bc1; --glow: rgba(255,77,174,.2); }.rescue { --accent: #ffcf5c; --glow: rgba(245,184,47,.2); }.start { --accent: #ff568e; --glow: rgba(255,54,119,.22); }.emoji { --accent: #9c86ff; --glow: rgba(125,93,255,.22); }.pit { --accent: #ff825d; --glow: rgba(255,91,53,.22); }
.guard .game-visual img { object-position: center 54%; }
.defence .game-visual img { object-position: center 52%; }
.clash .game-visual img { object-position: center 64%; }
.bomb .game-visual img { object-position: center 58%; }
.dash .game-visual img { object-position: center 52%; }
.rescue .game-visual img { object-position: center 52%; }

.scoreboards { margin-top: 28px; padding: clamp(18px, 4vw, 30px); border: 1px solid rgba(105,226,255,.17); border-radius: 23px; background: linear-gradient(135deg, rgba(8,16,37,.92), rgba(15,9,38,.88)); }
.scoreboard-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 15px; }
.scoreboard-header > div > p:last-child { max-width: 620px; margin-top: 8px; }
.board-picker { display: grid; gap: 6px; min-width: 230px; }
.board-picker select { width: 100%; padding: 11px 38px 11px 12px; border: 1px solid rgba(111,224,255,.26); border-radius: 10px; color: #eafcff; background: #0b1530; font: inherit; font-size: .78rem; cursor: pointer; }
.board-panel { min-width: 0; padding: 20px; border: 1px solid rgba(110,225,255,.14); border-radius: 17px; background: rgba(3,7,20,.66); }
.board-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.board-heading > div { display: grid; gap: 4px; }
.board-heading h3 { margin: 0; font-size: 1.2rem; }
.board-heading a { color: #79f0da; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-decoration: none; }
.scoreboards ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.scoreboards li { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 49px; padding: 8px 10px; border-radius: 11px; background: rgba(255,255,255,.035); }
.scoreboards .empty { display: block; color: #8995ac; font-size: .76rem; }
.rank { color: #77849b; font-weight: 900; }
.rank-avatar { width: 34px; height: 34px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.rank-score { color: #7ef2da; }
.board-note { margin: 12px 2px 0; color: #718097; font-size: .69rem; }
footer { padding: 18px 3px 0; color: #758198; font-size: .72rem; text-align: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .player { min-width: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 8px; }
  .featured-games { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card.compact { min-height: 320px; }
  .scoreboard-header { grid-template-columns: 1fr; }
  .board-picker { min-width: 0; }
}

@media (max-width: 720px) {
  .activity-shell { width: 100%; padding: 10px 10px 18px; overflow: hidden; }
  header { gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 39px; height: 39px; }
  .brand span { font-size: .52rem; letter-spacing: .16em; }
  .brand strong { font-size: .98rem; letter-spacing: .12em; }
  .mode { max-width: 118px; padding: 7px 8px; font-size: .49rem; text-align: center; }
  .hero { margin-top: 11px; padding: 18px 15px; border-radius: 17px; }
  .hero h1 { font-size: 2.05rem; line-height: .96; }
  .hero p:not(.eyebrow) { font-size: .86rem; line-height: 1.45; }
  .player { width: 100%; padding: 10px; }
  .section-heading { margin: 16px 2px 12px; }
  .section-heading h2, .scoreboard-header h2 { font-size: 1.55rem; }
  .section-heading > p { max-width: 30ch; font-size: .82rem; }
  .featured-games, .game-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
  .game-card.featured, .game-card.compact {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    aspect-ratio: auto;
    min-height: 148px;
    border-radius: 15px;
  }
  .game-card::after {
    top: 9px;
    right: 9px;
    min-width: 29px;
    height: 22px;
    padding: 0 7px;
    font-size: .58rem;
  }
  .game-visual {
    position: relative;
    min-height: 148px;
    border-right: 1px solid rgba(255,255,255,.07);
  }
  .game-visual img {
    object-position: center;
    filter: saturate(1.35) brightness(1.3);
  }
  .game-copy,
  .game-card.compact .game-copy {
    position: relative;
    min-height: 0;
    align-content: center;
    padding: 16px 13px;
    background: linear-gradient(135deg, rgba(5, 10, 23, .96), rgba(8, 15, 34, .92));
  }
  .game-copy h3,
  .game-card.compact .game-copy h3 {
    max-width: none;
    margin: 4px 0 6px;
    font-size: 1.13rem;
    line-height: 1.06;
    text-shadow: none;
  }
  .game-copy p {
    display: -webkit-box;
    overflow: hidden;
    max-width: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #b8c4d8;
    font-size: .74rem;
    line-height: 1.32;
    text-shadow: none;
  }
  .game-copy > span { font-size: .53rem; letter-spacing: .13em; }
  .game-copy > strong,
  .game-card.compact .game-copy > strong {
    margin-top: 10px;
    font-size: .61rem;
  }
  .scoreboards { padding: 16px 11px; border-radius: 18px; }
  .board-panel { padding: 15px 11px; border-radius: 14px; }
  .board-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
}

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