@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&family=DM+Mono:wght@400;500&display=swap');

:root {
  --night: #07111f;
  --panel: #0c1a2b;
  --panel-2: #10253a;
  --line: #27405b;
  --ice: #e9fbff;
  --ice-blue: #bfe9f5;
  --cyan: #78dcf0;
  --orange: #ff8151;
  --red: #df4d53;
  --white: #f4f7fb;
  --muted: #7f9ab0;
  --mono: 'DM Mono', ui-monospace, monospace;
  --display: 'Barlow Condensed', Impact, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--white);
  background: var(--night);
  font-family: var(--display);
  letter-spacing: .02em;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}
button { font: inherit; color: inherit; }

.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 20px 26px 15px; position: relative; }
.topbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-lockup { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 35px; height: 35px; position: relative; transform: skewY(-17deg); }
.brand-mark span { position: absolute; bottom: 2px; width: 6px; border-radius: 2px; background: var(--orange); }
.brand-mark span:nth-child(1) { left: 1px; height: 21px; opacity: .58; }
.brand-mark span:nth-child(2) { left: 11px; height: 29px; opacity: .78; }
.brand-mark span:nth-child(3) { left: 21px; height: 35px; }
.brand-name { font-size: 25px; line-height: .85; font-weight: 900; letter-spacing: .07em; }
.brand-name span { color: var(--cyan); margin-left: 6px; }
.brand-kicker, .eyebrow, .card-head, .arena-label, .footer-bar, .scorebug, .fps-chip, .status-pill, .sound-button, .network-readout, .mini-key, .possession-label { font-family: var(--mono); }
.brand-kicker { color: var(--muted); font-size: 9px; margin-top: 7px; letter-spacing: .12em; }
.top-status { display: flex; align-items: center; gap: 24px; font-size: 11px; }
.status-pill { display: flex; align-items: center; gap: 8px; color: #a8bdd0; letter-spacing: .11em; }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 12px var(--orange); }
.network-readout { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.signal-bars { display: flex; gap: 2px; align-items: end; height: 13px; }
.signal-bars b { display: block; width: 3px; background: var(--cyan); border-radius: 1px; }
.signal-bars b:nth-child(1) { height: 5px; opacity: .55; } .signal-bars b:nth-child(2) { height: 8px; opacity: .72; } .signal-bars b:nth-child(3) { height: 10px; opacity: .85; } .signal-bars b:nth-child(4) { height: 13px; }
.sound-button { border: 1px solid #294761; background: transparent; color: #a8bdd0; padding: 8px 11px; font-size: 10px; letter-spacing: .09em; cursor: pointer; }
.sound-button:hover, .sound-button[aria-pressed='false'] { border-color: var(--orange); color: var(--orange); }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 22px; margin-top: 17px; }
.arena-wrap { position: relative; width: 100%; aspect-ratio: 1.56 / 1; min-height: 485px; overflow: hidden; background: #a5deeb; border: 1px solid #3a6077; box-shadow: 0 25px 60px rgba(0,0,0,.28), inset 0 0 0 7px rgba(11,28,46,.25); }
#gameCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
.arena-label { position: absolute; top: 15px; left: 17px; z-index: 2; color: rgba(8,35,54,.65); font-size: 10px; font-weight: 500; letter-spacing: .12em; display: flex; gap: 9px; align-items: center; }
.label-chip { border: 1px solid rgba(8,35,54,.42); padding: 4px 6px; }
.camera-chip { position: absolute; top: 15px; right: 17px; z-index: 5; border: 1px solid rgba(8,35,54,.42); background: rgba(233,251,255,.45); color: rgba(8,35,54,.72); padding: 5px 7px; font: 9px var(--mono); letter-spacing: .08em; cursor: pointer; }
.camera-chip:hover { background: rgba(233,251,255,.78); color: #07111f; }
.scorebug { position: absolute; z-index: 4; left: 50%; top: 16px; transform: translateX(-50%); display: grid; grid-template-columns: minmax(145px, 1fr) 77px minmax(145px, 1fr); min-width: min(510px, 67%); height: 54px; color: var(--white); background: rgba(8,23,40,.95); border: 1px solid rgba(134,210,232,.38); box-shadow: 0 8px 18px rgba(10,29,44,.23); }
.scorebug { display: none; }
.scorebug-team { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 11px; letter-spacing: .08em; font-weight: 600; }
.scorebug-team.home { background: linear-gradient(100deg, #102842, #16395a); }
.scorebug-team.away { background: linear-gradient(100deg, #19354c, #111e31); }
.scorebug-team strong { color: var(--orange); font-size: 24px; font-family: var(--display); line-height: 1; font-weight: 700; }
.scorebug-team.away strong { color: #f5f7fb; }
.team-swatch { width: 6px; height: 19px; background: var(--orange); display: inline-block; transform: skew(-13deg); }
.away .team-swatch { background: var(--red); }
.scorebug-name { font-size: 10px; color: #b4c9d7; white-space: nowrap; }
.scorebug-middle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #091525; border-left: 1px solid #2a4358; border-right: 1px solid #2a4358; }
.scorebug-middle span { font-size: 9px; color: var(--muted); letter-spacing: .08em; } .scorebug-middle b { font-size: 17px; color: var(--white); font-weight: 500; }
.fps-chip { position: absolute; z-index: 4; bottom: 17px; left: 18px; background: rgba(7,20,33,.82); border: 1px solid rgba(129,224,242,.32); padding: 7px 9px; color: #bdeef7; font-size: 10px; letter-spacing: .06em; }
.fps-dot { display: inline-block; width: 5px; height: 5px; background: #68e0b0; border-radius: 50%; margin-right: 5px; box-shadow: 0 0 8px #68e0b0; }
.faceoff-callout { position: absolute; z-index: 5; top: 88px; left: 50%; transform: translate(-50%, -10px); opacity: 0; padding: 7px 11px; color: #07111f; background: var(--cyan); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; transition: opacity .2s, transform .2s; pointer-events: none; }
.faceoff-callout.show { opacity: 1; transform: translate(-50%, 0); }
.rink-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(15,44,66,.26), inset 0 0 0 1px rgba(255,255,255,.2); }
.bottom-strip { display: flex; align-items: center; justify-content: space-between; min-height: 53px; padding: 0 6px; }
.possession { display: flex; align-items: center; gap: 10px; width: 320px; }
.possession-label { font-size: 9px; color: var(--muted); letter-spacing: .11em; white-space: nowrap; }
.possession-bar { height: 4px; width: 120px; background: #21374b; overflow: hidden; } .possession-bar i { display: block; width: 58%; height: 100%; background: var(--orange); transition: width .3s; }
#possessionValue { color: #a9c0d1; font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.mini-note { color: #7892a6; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; }
.mini-key { display: inline-block; color: #c9d8e2; background: #172b3d; border: 1px solid #304b62; padding: 3px 5px; margin: 0 3px 0 8px; font-size: 9px; }

.control-panel { border-left: 1px solid var(--line); padding-left: 21px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.eyebrow { display: block; color: var(--orange); font-size: 10px; letter-spacing: .13em; margin-bottom: 4px; }
h1 { margin: 0; font-size: 31px; line-height: .95; font-weight: 700; letter-spacing: -.02em; }
.panel-period { font-family: var(--mono); font-size: 11px; color: var(--cyan); border-left: 2px solid var(--cyan); padding-left: 8px; margin-top: 3px; }
.panel-copy { margin: 13px 0 18px; color: #92aabe; font-family: var(--mono); font-size: 11px; line-height: 1.55; max-width: 250px; }
.lineup-card, .controls-card, .event-log { background: linear-gradient(135deg, rgba(16,37,58,.78), rgba(10,27,44,.54)); border: 1px solid #23415b; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px 9px; font-size: 10px; letter-spacing: .13em; color: #a7bdcf; }
.small-live { color: #82c7ca; font-size: 9px; letter-spacing: .03em; } .small-live .live-dot { width: 5px; height: 5px; margin-right: 4px; background: #68e0b0; box-shadow: none; }
.lineup-row { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 9px; min-height: 44px; padding: 5px 12px; border-top: 1px solid rgba(39,64,91,.65); }
.lineup-row.active { background: rgba(255,129,81,.07); border-left: 2px solid var(--orange); padding-left: 10px; }
.lineup-row b { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; } .lineup-row small { display: block; color: #7190a5; font-family: var(--mono); font-size: 9px; margin-top: 2px; }
.lineup-state { font-family: var(--mono); font-size: 9px; color: var(--cyan); } .lineup-row:not(.active) .lineup-state { color: #708da1; }
.jersey { display: grid; place-items: center; width: 28px; height: 31px; clip-path: polygon(12% 0, 88% 0, 100% 20%, 84% 100%, 16% 100%, 0 20%); background: var(--orange); color: var(--night); font-size: 10px; font-family: var(--mono); font-weight: 600; }
.jersey.north.muted { background: #275072; color: #c6eaf3; } .jersey.red { background: var(--red); color: var(--white); } .jersey.red.muted { background: #713d53; color: #f5c5c3; }
.controls-card { padding-bottom: 7px; } .controller-icon { color: var(--cyan); font-size: 18px; line-height: 10px; }
.control-line { display: flex; justify-content: space-between; align-items: center; padding: 5px 12px; color: #a1b7c9; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.key-pair { display: flex; gap: 3px; } kbd, .key-single { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border: 1px solid #36556f; background: #1b344a; color: #d6e8f0; font: 10px var(--mono); box-shadow: 0 2px 0 #0a1624; } .key-single { min-width: 20px; padding: 0 5px; } .key-single.wide { min-width: 51px; font-size: 8px; }
.event-log { min-height: 145px; } .period-dot { width: 7px; height: 7px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 10px var(--orange); }
.event-row { display: grid; grid-template-columns: 42px 1fr; gap: 7px; padding: 6px 12px; color: #9bb3c4; font-family: var(--mono); font-size: 9px; line-height: 1.3; } .event-row time { color: #618097; } .event-row b { color: var(--orange); font-weight: 500; } .muted-row { color: #60798d; }
.reset-button { display: flex; justify-content: center; align-items: center; gap: 7px; width: 100%; padding: 10px 12px; border: 1px solid #31536c; background: transparent; color: #a7c1d1; font-family: var(--mono); font-size: 10px; letter-spacing: .09em; cursor: pointer; transition: background .18s, border-color .18s, color .18s; } .reset-button span { font-size: 16px; line-height: 10px; } .reset-button:hover { background: rgba(120,220,240,.08); border-color: var(--cyan); color: var(--cyan); }
.footer-bar { display: flex; gap: 25px; color: #48627a; font-size: 9px; letter-spacing: .08em; padding-top: 12px; } .footer-right { margin-left: auto; } .footer-right i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #68e0b0; margin-left: 5px; }

@media (max-width: 960px) { .game-layout { grid-template-columns: 1fr; } .control-panel { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; } .panel-heading, .panel-copy, .reset-button { grid-column: 1 / -1; } .panel-copy { margin: 0 0 2px; } .lineup-card, .controls-card, .event-log { margin: 0; } .reset-button { margin-top: 2px; } }
@media (max-width: 640px) { .app-shell { padding: 12px 12px 10px; } .topbar { min-height: 49px; } .brand-name { font-size: 20px; } .brand-kicker { font-size: 7px; } .brand-mark { transform: scale(.8) skewY(-17deg); transform-origin: left center; width: 29px; margin-right: -5px; } .top-status { gap: 9px; } .status-pill, .network-readout { display: none; } .sound-button { padding: 7px 8px; font-size: 9px; } .arena-wrap { min-height: 300px; aspect-ratio: 1 / .78; } .scorebug { min-width: 90%; height: 45px; grid-template-columns: 1fr 62px 1fr; top: 9px; } .scorebug-name { font-size: 8px; } .scorebug-team { gap: 4px; } .scorebug-team strong { font-size: 20px; } .scorebug-middle b { font-size: 15px; } .scorebug-middle span { font-size: 8px; } .arena-label { top: 9px; left: 9px; font-size: 8px; } .camera-chip { top: 9px; right: 9px; font-size: 8px; } .fps-chip { bottom: 8px; left: 9px; } .bottom-strip { display: block; padding: 9px 1px; } .possession { width: 100%; justify-content: space-between; } .mini-note { margin-top: 8px; } .control-panel { display: block; } .panel-heading { margin-bottom: 12px; } .panel-copy { margin-bottom: 14px; } .lineup-card, .controls-card, .event-log, .reset-button { margin-bottom: 12px; } .footer-bar { display: block; line-height: 1.8; } .footer-bar span { margin-right: 11px; } .footer-right { float: right; margin: 0; } }
