/**
 * GoalRush 3D - style.css
 * All styles: theme colors (see :root variables), HUD, touch controls, menus and modals.
 * Fonts are loaded from ../fonts: Inter (text) and Montserrat (headings, buttons, numbers: var(--font-display)).
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2?v=f72f58dc8e') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2?v=f72f58dc8e') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter-800.woff2?v=f72f58dc8e') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/inter-900.woff2?v=f72f58dc8e') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-tr.woff2?v=f72f58dc8e') format('woff2');
  unicode-range: U+011E-011F, U+0130, U+015E-015F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-tr.woff2?v=f72f58dc8e') format('woff2');
  unicode-range: U+011E-011F, U+0130, U+015E-015F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter-tr.woff2?v=f72f58dc8e') format('woff2');
  unicode-range: U+011E-011F, U+0130, U+015E-015F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/inter-tr.woff2?v=f72f58dc8e') format('woff2');
  unicode-range: U+011E-011F, U+0130, U+015E-015F;
}
/* Variable fonts with weights 700-900 only (built by tools/fonts/montserrat.py). */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('../fonts/montserrat.woff2?v=f72f58dc8e') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
  src: url('../fonts/montserrat-italic.woff2?v=f72f58dc8e') format('woff2');
}
:root {
  --font-display: 'Montserrat', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --primary: #19e3ff;
  --primary-2: #2f7bff;
  --gold: #ffc93c;
  --accent: #ff2d55;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #8fa0b8;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #03060e;
  color: var(--text);
  overscroll-behavior: none;
}
body.in-match {
  touch-action: none;
}
button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}
svg {
  display: block;
}
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}
#broadcast-vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 58%, rgba(2, 6, 18, 0.55) 100%),
    linear-gradient(
      180deg,
      rgba(2, 6, 18, 0.38) 0%,
      transparent 14%,
      transparent 86%,
      rgba(2, 6, 18, 0.48) 100%
    );
}
.letterbox-bar {
  position: fixed;
  left: 0;
  width: 100%;
  height: 0;
  background: #02050d;
  z-index: 9;
  pointer-events: none;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#letterbox-top {
  top: 0;
}
#letterbox-bottom {
  bottom: 0;
}
body.cinematic-bars #letterbox-top,
body.cinematic-bars #letterbox-bottom {
  height: 48px;
}
body.compact.cinematic-bars #letterbox-top,
body.compact.cinematic-bars #letterbox-bottom {
  height: 24px;
}

/* HUD */
#ui-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.interactive {
  pointer-events: auto;
}
#hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: calc(var(--safe-t) + 16px) calc(var(--safe-r) + 24px) 0 calc(var(--safe-l) + 24px);
}
body.in-match #hud-top {
  display: flex;
}
.scoreboard {
  display: flex;
  align-items: stretch;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 22, 42, 0.95), rgba(6, 10, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sb-comp {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulseLive 1.4s infinite ease-in-out;
}
@keyframes pulseLive {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}
.sb-team {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 1.2px;
}
.sb-color {
  width: 6px;
  height: 26px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.sb-score {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #0a0f1d, #141d33);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-shadow: 0 0 14px rgba(25, 227, 255, 0.35);
  white-space: nowrap;
}
.sb-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.04);
}
.sb-half {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(255, 201, 60, 0.12);
  padding: 3px 6px;
  border-radius: 5px;
}
.hud-top-right {
  display: flex;
  gap: 8px;
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  background: rgba(10, 16, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #f4f7fb;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.icon-btn:hover {
  border-color: var(--primary);
  background: rgba(25, 227, 255, 0.12);
  transform: translateY(-1px);
}
.icon-btn:active {
  transform: scale(0.95);
}
.ib-ico {
  display: flex;
}
#hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 0 calc(var(--safe-r) + 24px) calc(var(--safe-b) + 20px) calc(var(--safe-l) + 24px);
}
body.in-match #hud-bottom {
  display: flex;
}
.player-card {
  background: linear-gradient(145deg, rgba(10, 18, 36, 0.92), rgba(6, 11, 24, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 260px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}
.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pc-name {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-role {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), #7af3ff);
  color: #031022;
  padding: 3px 8px;
  border-radius: 6px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 9px;
}
.bar-fill {
  height: 100%;
  width: 100%;
  border-radius: 6px;
  transition: width 0.08s linear;
}
#stamina-fill {
  background: linear-gradient(90deg, #10b981, #22c55e, #a3e635);
}
#power-fill {
  width: 0%;
  background: linear-gradient(90deg, #facc15, #f97316, #ef4444);
}
#radar-container {
  background: linear-gradient(160deg, rgba(9, 22, 16, 0.92), rgba(5, 13, 10, 0.96));
  border: 1.5px solid rgba(25, 227, 255, 0.35);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
}
#radar-canvas {
  display: block;
  border-radius: 8px;
}
.controls-hint {
  background: linear-gradient(145deg, rgba(10, 18, 36, 0.9), rgba(6, 11, 24, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 4px solid var(--gold);
  border-radius: 14px;
  padding: 11px 15px;
  font-size: 11.5px;
  line-height: 1.75;
  color: #cbd5e1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
.key-badge {
  display: inline-block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0 7px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 10.5px;
  margin-right: 3px;
}
#event-banner {
  position: absolute;
  top: 24%;
  left: 50%;
  width: calc(100% - 32px);
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  text-align: center;
  transition: all 0.36s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 25;
}
#event-banner.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.banner-main {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.5vw, 82px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  /* Room for the italic overhang, which background-clip: text would cut off. */
  padding: 0 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 22px rgba(25, 227, 255, 0.55)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.95));
  line-height: 1.1;
}
.banner-sub {
  display: inline-block;
  margin-top: 8px;
  max-width: 100%;
  background: rgba(8, 13, 26, 0.94);
  border: 1.5px solid var(--primary);
  padding: 7px 22px;
  border-radius: 40px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#kickoff-hint {
  position: absolute;
  left: 50%;
  top: calc(50% + 64px);
  transform: translate(-50%, 10px);
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(6, 10, 22, 0.85);
  border: 1px solid rgba(255, 201, 60, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  text-align: center;
  max-width: calc(100% - 40px);
  z-index: 24;
}
#kickoff-hint.active {
  opacity: 1;
  transform: translate(-50%, 0);
  animation: hintPulse 1.6s ease-in-out infinite;
}
@keyframes hintPulse {
  50% {
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.55),
      0 0 32px rgba(255, 201, 60, 0.45);
  }
}
#kh-type {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold);
}
#kh-keys {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #dbe6f5;
}

/* TOUCH CONTROLS */
#touch-controls {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 20;
  --tb: clamp(58px, 17vmin, 74px);
}
body.touch.in-match:not(.paused) #touch-controls {
  display: block;
}
#joystick-zone {
  position: absolute;
  left: calc(var(--safe-l) + 22px);
  bottom: calc(var(--safe-b) + 22px);
  width: clamp(108px, 30vmin, 140px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 227, 255, 0.12), rgba(255, 255, 255, 0.04) 70%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 0 24px rgba(25, 227, 255, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  touch-action: none;
}
#joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9ff6ff, var(--primary) 45%, #0a7fa6);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(25, 227, 255, 0.45);
}
.touch-actions {
  position: absolute;
  right: calc(var(--safe-r) + 18px);
  bottom: calc(var(--safe-b) + 18px);
  display: grid;
  grid-template-columns: repeat(2, var(--tb));
  grid-template-rows: repeat(2, var(--tb));
  gap: 12px;
  pointer-events: auto;
}
.t-btn {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  touch-action: none;
  transition: transform 0.08s;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.t-btn.pressed {
  transform: scale(0.9);
  filter: brightness(1.25);
}
.t-shoot {
  background: radial-gradient(circle at 35% 30%, #ff7b8f, #e11d48);
}
.t-pass {
  background: radial-gradient(circle at 35% 30%, #7cb8ff, #2563eb);
}
.t-sprint {
  background: radial-gradient(circle at 35% 30%, #6ee7a0, #16a34a);
}
.t-tackle {
  background: radial-gradient(circle at 35% 30%, #fde68a, #d97706);
  font-size: 8.5px;
  letter-spacing: 0;
}
/* COMPACT HUD (MOBILE / SMALL SCREENS) */
body.compact #hud-top {
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 10px) 0 calc(var(--safe-l) + 10px);
  gap: 8px;
}
body.compact .scoreboard {
  height: 36px;
  border-radius: 10px;
}
body.compact .sb-comp {
  display: none;
}
body.compact .sb-team {
  padding: 0 8px;
  font-size: 12px;
  gap: 6px;
  letter-spacing: 0.6px;
}
body.compact .sb-color {
  width: 5px;
  height: 18px;
}
body.compact .sb-score {
  min-width: 56px;
  padding: 0 8px;
  font-size: 16px;
  letter-spacing: 0.5px;
}
body.compact .sb-clock {
  padding: 0 8px;
  font-size: 12px;
  gap: 5px;
}
body.compact .sb-half {
  font-size: 9px;
  padding: 2px 4px;
}
body.compact .icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}
body.compact .ib-txt {
  display: none;
}
body.compact #hud-bottom {
  top: calc(var(--safe-t) + 52px);
  bottom: auto;
  align-items: flex-start;
  padding: 0 calc(var(--safe-r) + 10px) 0 calc(var(--safe-l) + 10px);
}
body.compact .controls-hint {
  display: none;
}
body.compact .player-card {
  min-width: 0;
  width: clamp(140px, 40vw, 190px);
  padding: 8px 10px;
  border-radius: 10px;
  border-left-width: 3px;
}
body.compact .pc-header {
  margin-bottom: 6px;
  padding-bottom: 5px;
}
body.compact .pc-name {
  font-size: 10.5px;
}
body.compact .pc-role {
  font-size: 9px;
  padding: 2px 5px;
}
body.compact .bar-label {
  font-size: 8.5px;
  margin-bottom: 3px;
}
body.compact .bar-bg {
  height: 5px;
  margin-bottom: 6px;
}
body.compact #radar-container {
  padding: 4px;
  border-radius: 10px;
}
body.compact #radar-canvas {
  width: clamp(118px, 34vw, 160px);
  height: auto;
}
body.compact #event-banner {
  top: 46%;
}
body.compact .banner-main {
  font-size: clamp(26px, 7vw, 44px);
  letter-spacing: 0.02em;
}
body.compact .banner-sub {
  font-size: 11px;
  padding: 6px 14px;
}
body.compact.portrait #hud-top {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
body.compact.portrait .hud-top-right {
  align-self: stretch;
  justify-content: center;
}
body.compact.portrait #hud-bottom {
  top: calc(var(--safe-t) + 96px);
}
body.compact #kickoff-hint {
  top: auto;
  bottom: calc(var(--safe-b) + 20px);
  max-width: 46vw;
}
body.compact.portrait #kickoff-hint {
  bottom: calc(var(--safe-b) + (clamp(58px, 17vmin, 74px) * 2) + 84px);
  max-width: calc(100% - 40px);
}

/* MENU SCREENS */
.screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: calc(var(--safe-t) + 20px) calc(var(--safe-r) + 20px) calc(var(--safe-b) + 20px)
    calc(var(--safe-l) + 20px);
}
.screen.show {
  display: flex;
}
.btn-primary,
.btn-gold {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(340px, 100%);
  height: 58px;
  padding: 0 28px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #04101f;
  background: linear-gradient(180deg, #7ff6ff 0%, var(--primary) 45%, #0bb4e6 100%);
  box-shadow:
    0 6px 0 #0a7fa6,
    0 14px 30px rgba(25, 227, 255, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    filter 0.15s;
  flex-shrink: 0;
}
.btn-gold {
  background: linear-gradient(180deg, #ffe58a 0%, var(--gold) 45%, #f59e0b 100%);
  box-shadow:
    0 6px 0 #a35b00,
    0 14px 30px rgba(255, 170, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  color: #2a1600;
}
.btn-primary::after,
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine {
  0%,
  60% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}
.btn-primary:hover,
.btn-gold:hover {
  filter: brightness(1.07);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #0a7fa6,
    0 8px 18px rgba(25, 227, 255, 0.3);
}
.btn-gold:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #a35b00,
    0 8px 18px rgba(255, 170, 0, 0.3);
}
.btn-primary svg,
.btn-gold svg {
  width: 18px;
  height: 18px;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(340px, 100%);
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 13px;
  transition:
    background 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

#screen-title {
  flex-direction: column;
  scroll-behavior: smooth;
  background:
    radial-gradient(120% 80% at 50% 42%, rgba(3, 8, 20, 0.2), rgba(3, 6, 14, 0.9) 75%),
    linear-gradient(180deg, rgba(3, 6, 14, 0.55), transparent 30%, rgba(3, 6, 14, 0.85));
}
/* The menu fills the first screen; the home page text (.seo) follows below it. */
.title-hero {
  flex-shrink: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.title-wrap {
  margin: auto;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2.6vh, 26px);
}
/* A match ticket: punched ends, a perforated stub. */
.ticket {
  display: flex;
  transform: rotate(-2deg);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  color: #2a1600;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45));
}
.ticket span {
  padding: 8px 14px 8px 16px;
  background: var(--gold);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px);
}
.ticket span + span {
  padding: 8px 16px 8px 12px;
  background: #ffe08a;
  border-left: 2px dashed rgba(42, 22, 0, 0.45);
  -webkit-mask: radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px);
}
.title-h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.6vh, 26px);
  font-size: inherit;
  font-weight: inherit;
}
.logo {
  display: block;
  line-height: 0.92;
  transform: perspective(700px) rotateX(14deg);
  animation: logoFloat 5s ease-in-out infinite;
}
@keyframes logoFloat {
  50% {
    transform: perspective(700px) rotateX(10deg) translateY(-6px);
  }
}
.logo-word {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(46px, 12vw, 128px);
  letter-spacing: -0.01em;
}
.logo-goal {
  color: #fff;
  text-shadow:
    0 1px 0 #d6f7ff,
    0 2px 0 #a8ecff,
    0 3px 0 #74dcff,
    0 4px 0 #3ec6ff,
    0 5px 0 #1ba6f5,
    0 6px 0 #0d86d8,
    0 7px 0 #0a68b0,
    0 8px 0 #074b84,
    0 9px 0 #053661,
    0 22px 34px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(25, 227, 255, 0.35);
}
.logo-rush {
  color: var(--gold);
  margin-top: -0.04em;
  text-shadow:
    0 1px 0 #ffe08a,
    0 2px 0 #ffc23d,
    0 3px 0 #ffab1f,
    0 4px 0 #f59300,
    0 5px 0 #db7a00,
    0 6px 0 #b86200,
    0 7px 0 #924c00,
    0 8px 0 #6c3700,
    0 9px 0 #4a2500,
    0 22px 34px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(255, 170, 0, 0.3);
}
.tagline {
  display: block;
  color: #c5d2e6;
  font-size: clamp(11px, 1.6vw, 14px);
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}
/* min-height = the buttons, so the page does not jump when the loading bar makes way for them. */
.title-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 266px;
  margin-top: 6px;
}
.feature-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #93a4bf;
}
.feature-row span:not(:first-child)::before {
  content: '/';
  margin: 0 10px;
  color: var(--gold);
}
.feature-row .br {
  display: none;
}
@media (max-width: 760px) {
  .feature-row .br {
    display: block;
    flex-basis: 100%;
    height: 7px;
  }
  .feature-row .br + span::before {
    display: none;
  }
}
.noscript {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 18px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.scroll-cue:hover {
  color: var(--primary);
}
.scroll-cue svg {
  width: 20px;
  height: 20px;
  animation: cueBob 1.6s ease-in-out infinite;
}
@keyframes cueBob {
  50% {
    transform: translateY(4px);
  }
}

/* HOME PAGE TEXT */
.seo {
  flex-shrink: 0;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 880px;
  margin: 28px auto 0;
}
.seo,
.seo * {
  user-select: text;
  -webkit-user-select: text;
}
.seo-card {
  padding: 24px 26px;
  border-radius: 18px;
  background: rgba(6, 11, 24, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.seo h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 2.4vw, 23px);
  line-height: 1.3;
  color: #fff;
}
.seo h3 {
  margin: 18px 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}
.seo p,
.seo li,
.seo dt,
.seo dd {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.7;
  color: #c5d2e6;
}
.seo p + p {
  margin-top: 10px;
}
.seo b,
.seo strong {
  font-weight: 800;
  color: #fff;
}
.seo-shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.seo-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.seo-list li {
  position: relative;
  padding-left: 22px;
}
.seo-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.seo-keys {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 14px;
}
.seo-keys div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.seo-keys dt {
  font-weight: 700;
  color: #fff;
}
.seo-keys dd {
  text-align: right;
}
.seo-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(25, 227, 255, 0.12), rgba(6, 11, 24, 0.88));
  border: 1px solid rgba(25, 227, 255, 0.3);
}
.seo-cta h2 {
  margin-bottom: 0;
}
.seo-cta .btn-primary {
  margin-top: 6px;
  text-decoration: none;
}
.site-foot {
  flex-shrink: 0;
  padding: 22px 0 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .seo-card {
    padding: 18px 16px;
  }
  .seo-keys {
    grid-template-columns: minmax(0, 1fr);
  }
  .seo p,
  .seo li,
  .seo dt,
  .seo dd {
    font-size: 15px;
  }
}

#screen-select {
  background: linear-gradient(180deg, rgba(3, 6, 14, 0.84), rgba(3, 6, 14, 0.94));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.select-shell {
  margin: auto;
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sel-header {
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  gap: 10px;
}
.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
}
.btn-back svg {
  width: 16px;
  height: 16px;
}
.btn-back:hover {
  border-color: var(--primary);
}
.sel-title {
  text-align: center;
}
.sel-title small {
  display: block;
  color: var(--primary);
  font-size: 10.5px;
  letter-spacing: 3px;
  font-weight: 800;
  margin-bottom: 2px;
}
.sel-title h2 {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.5px;
}
.matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.club-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.club-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 55% at 50% 0%, var(--tc, #19e3ff), transparent 70%);
  opacity: 0.28;
}
.club-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--tc);
  box-shadow: 0 0 18px var(--tc);
}
.cc-side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
}
.cc-side b {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}
.cc-stage {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin: 8px 0 4px;
}
.cc-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-arrow:hover {
  border-color: var(--primary);
  background: rgba(25, 227, 255, 0.12);
}
.cc-arrow svg {
  width: 18px;
  height: 18px;
}
.crest-wrap {
  perspective: 600px;
  display: flex;
  justify-content: center;
  height: clamp(110px, 18vh, 150px);
}
.crest {
  height: 100%;
  width: auto;
  transform-style: preserve-3d;
  animation:
    crestPop 0.35s ease-out,
    crestTurn 5s ease-in-out 0.35s infinite;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.6));
}
@keyframes crestTurn {
  0%,
  100% {
    transform: rotateY(-22deg);
  }
  50% {
    transform: rotateY(22deg) translateY(-4px);
  }
}
@keyframes crestPop {
  from {
    transform: scale(0.6) rotateY(90deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotateY(-22deg);
    opacity: 1;
  }
}
.cc-name {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 2.2vw, 20px);
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.cc-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 12px;
}
.ovr {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: #04101f;
  background: linear-gradient(180deg, #ffe58a, var(--gold));
  padding: 3px 9px;
  border-radius: 7px;
}
.stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 14px;
}
.stars .off {
  color: rgba(255, 255, 255, 0.18);
}
.kit {
  display: flex;
  gap: 4px;
}
.kit i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.stat {
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 6px;
}
.stat .track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.stat .track span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--tc), #fff);
  transition: width 0.4s;
}
.stat b {
  color: #fff;
  text-align: right;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
}
.dots i.on {
  width: 18px;
  background: var(--tc);
}
/* A player's own team: league standing and the lineup instead of the club ratings. */
.cc-arena {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.lineup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #dbe5f4;
  text-align: left;
}
.lineup span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lineup b {
  display: inline-block;
  width: 20px;
  margin-right: 6px;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold);
}
.cc-edit,
.ph-edit {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #dbe5f4;
  background: #101b30;
  box-shadow:
    0 3px 0 #050a14,
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.15s;
}
.cc-edit {
  display: block;
  margin: 12px auto 0;
}
.cc-edit:hover,
.ph-edit:hover {
  color: #fff;
  background: #182640;
}
.cc-edit:active,
.ph-edit:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #050a14;
}
.vs-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  color: #2a1600;
  background: linear-gradient(180deg, #ffe58a, var(--gold) 50%, #f59e0b);
  box-shadow:
    0 5px 0 #a35b00,
    0 0 30px rgba(255, 170, 0, 0.45);
}
.settings-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.seg-label {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 7px;
}
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg button.on {
  color: #04101f;
  background: linear-gradient(180deg, #9ff6ff, var(--primary));
  box-shadow: 0 3px 10px rgba(25, 227, 255, 0.35);
}
.sel-footer {
  display: flex;
  justify-content: center;
  padding-bottom: 6px;
}
@media (max-width: 760px) {
  .matchup {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .vs-badge {
    margin: 0 auto;
    width: 46px;
    height: 46px;
    font-size: 15px;
  }
  .settings-panel {
    grid-template-columns: 1fr;
  }
  .sel-header {
    grid-template-columns: 72px 1fr 72px;
  }
  .crest-wrap {
    height: 92px;
  }
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 20px;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  touch-action: pan-y;
}
.modal.show {
  display: flex;
}
.modal-card {
  width: 100%;
  max-width: 540px;
  margin: auto;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.96), rgba(8, 13, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 3px solid var(--primary);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.modal-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(22px, 5vw, 34px);
  letter-spacing: 0.5px;
}
.modal-card .sub {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 13px;
}
.stats-grid {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}
.stat-row:last-child {
  border-bottom: none;
}
.stat-row.head {
  background: rgba(25, 227, 255, 0.08);
  font-size: 11px;
  letter-spacing: 1px;
}
.stat-label {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 1.2px;
}
.howto {
  width: 100%;
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #cbd5e1;
}
.howto div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}
.howto b {
  color: #fff;
  text-align: right;
}

/* ONLINE 1V1 */
#screen-online {
  background: linear-gradient(180deg, rgba(3, 6, 14, 0.84), rgba(3, 6, 14, 0.94));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.online-shell {
  margin: auto;
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.online-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.online-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.online-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.online-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.online-card .btn-gold,
.online-card .btn-primary {
  width: 100%;
  margin-top: auto;
}
#room-code-input {
  width: 100%;
  height: 58px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
#room-code-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}
#room-code-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 227, 255, 0.18);
}
.online-status {
  min-height: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary);
}
.online-status.error {
  color: var(--accent);
}
.btn-primary:disabled,
.btn-gold:disabled,
.btn-ghost:disabled {
  opacity: 0.5;
  cursor: default;
  filter: grayscale(0.35);
  transform: none;
}
.btn-primary:disabled::after,
.btn-gold:disabled::after {
  display: none;
}
.room-bar {
  display: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 201, 60, 0.06);
  border: 1px solid rgba(255, 201, 60, 0.3);
}
body.net-lobby .room-bar {
  display: grid;
}
.rb-info small {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
}
.rb-info b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.2em;
  color: var(--gold);
  user-select: text;
  -webkit-user-select: text;
}
.rb-status {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.rb-status.ready {
  color: #4ade80;
}
.rb-copy {
  padding: 0 14px;
  white-space: nowrap;
}
body.net-lobby #set-difficulty,
body.net-lobby #set-mode,
body.cup-mode #set-difficulty,
body.cup-mode #set-mode {
  display: none;
}
body.cup-mode .settings-panel {
  grid-template-columns: repeat(2, 1fr);
}
body.net-lobby .settings-panel {
  grid-template-columns: repeat(2, 1fr);
}
body.net-guest .seg[data-key='duration'] {
  opacity: 0.55;
  pointer-events: none;
}
.net-badge {
  display: none;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  background: rgba(10, 16, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
body.online .net-badge {
  display: flex;
}
.net-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}
.net-badge.warn i {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.net-badge.bad i {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
body.compact .net-badge {
  height: 36px;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 10px;
}
.modal-note {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.modal-note:empty {
  display: none;
}
@media (max-width: 760px) {
  .online-grid {
    grid-template-columns: 1fr;
  }
  .room-bar {
    grid-template-columns: 1fr auto;
  }
  .rb-mid {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  body.net-lobby .settings-panel,
  body.cup-mode .settings-panel {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .settings-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ACCOUNT CHIP, ONLINE COUNT AND MENU TILES (title screen) */
.account-bar {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
}
.acct-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 62%;
  padding: 5px 14px 5px 5px;
  border-radius: 30px;
  background: rgba(6, 10, 22, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  text-align: left;
  transition: border-color 0.15s;
}
.acct-chip:hover {
  border-color: var(--primary);
}
.avatar,
.acct-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  background: linear-gradient(135deg, #1e3a8a, #19e3ff);
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.avatar.big {
  width: 54px;
  height: 54px;
  font-size: 24px;
}
.acct-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.acct-text b {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-text small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-count {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #cfe3ff;
  white-space: nowrap;
}
.online-count:empty {
  display: none;
}
.online-count i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}
/* One solid bar under the big buttons, pressed in like them; the shirt wears the player's colors. */
.menu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(340px, 100%);
  margin-top: 2px;
  border-radius: 14px;
  overflow: hidden;
  background: #101b30;
  box-shadow:
    0 5px 0 #050a14,
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-tile {
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #dbe5f4;
  transition:
    background 0.15s,
    color 0.15s;
}
.btn-tile + .btn-tile {
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.45);
}
.btn-tile svg {
  width: 24px;
  height: 24px;
  color: var(--gold);
}
.btn-tile .jersey-body {
  fill: var(--shirt, var(--gold));
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1;
  stroke-linejoin: round;
}
.btn-tile .jersey-trim {
  fill: var(--trim, #a35b00);
}
.btn-tile:hover {
  background: #182640;
  color: #fff;
}
.btn-tile:active {
  background: #0a1222;
}

.title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 4px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #c5d2e6;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.title-link kbd {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font: 800 12px var(--font-display);
  color: #101b30;
  background: #dbe5f4;
  box-shadow: 0 2px 0 #6b7a94;
}
.title-link:hover {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* SELECT SCREEN: MATCH TYPE AND WHAT THE MATCH IS WORTH */
.seg button:disabled {
  opacity: 0.35;
  cursor: default;
}
.seg.locked {
  opacity: 0.6;
  cursor: default;
}
.seg.locked button {
  cursor: default;
}
.match-note {
  min-height: 18px;
  margin-top: -6px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.5;
  color: var(--muted);
}
.match-note b {
  color: var(--gold);
}
.match-note.error {
  color: var(--accent);
}
.rb-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.rb-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  text-align: center;
}
.rb-meta:empty {
  display: none;
}
.rb-meta b {
  color: #fff;
}
.rb-tag {
  display: inline-block;
  padding: 2px 7px;
  margin-right: 4px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.rb-tag.ranked {
  color: #2a1600;
  background: var(--gold);
}

/* FULL-TIME REWARD PANEL */
.reward {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 201, 60, 0.07);
  border: 1px solid rgba(255, 201, 60, 0.3);
}
.reward:empty {
  display: none;
}
.reward.bad {
  background: rgba(255, 45, 85, 0.08);
  border-color: rgba(255, 45, 85, 0.35);
}
.rw-stars {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  color: #fff;
}
.rw-stars span {
  color: var(--gold);
  font-size: 26px;
}
.rw-stars.up b {
  color: #4ade80;
}
.rw-stars.down b {
  color: var(--accent);
}
.rw-line {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #e2e8f0;
}
.rw-line.up {
  color: #4ade80;
}
.rw-line.down,
.reward.bad .rw-line {
  color: var(--accent);
}
.rw-cup {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--gold);
}
.rw-cup.lost {
  color: var(--accent);
}
#btn-next-round {
  display: none;
}
#btn-next-round.show {
  display: inline-flex;
}

/* ACCOUNT WINDOW */
.auth-card {
  position: relative;
  max-width: 420px;
}
.modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.modal-x svg {
  width: 16px;
  height: 16px;
}
.auth-lead {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.auth-card .tabs {
  width: 100%;
}
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.auth-form label {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
}
.auth-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 227, 255, 0.18);
}
.auth-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}
.auth-error {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent);
}
.auth-hint:empty,
.auth-error:empty {
  display: none;
}

/* TEAM WINDOW (TAKIMINI KUR) */
.team-card {
  max-width: 440px;
}
.team-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.team-crest {
  height: 96px;
}
.team-crest .crest {
  animation: none;
  transform: none;
}
.team-fields {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 10px;
}
.team-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
}
.team-fields input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.team-code-field input {
  text-align: center;
  letter-spacing: 3px;
}
.team-fields input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.team-fields input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 227, 255, 0.18);
}
.team-colors {
  width: 100%;
  text-align: left;
}
.team-colors .swatches {
  margin-bottom: 12px;
}
.team-colors .swatches:last-child {
  margin-bottom: 0;
}
.btn-text {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.btn-text:hover {
  color: #fff;
}
.auth-guest {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.auth-or {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--muted);
}
.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ACCOUNT SCREENS (TAKIMIM, SIRALAMA, TURNUVALAR) */
#screen-profile,
#screen-leaderboard,
#screen-tournaments {
  background: linear-gradient(180deg, rgba(3, 6, 14, 0.86), rgba(3, 6, 14, 0.95));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.narrow-shell {
  max-width: 820px;
  margin-top: 0;
  gap: 14px;
}
.screen-lead {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}
.screen-lead b {
  color: var(--gold);
}
.tab-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.tab-pane.show {
  display: flex;
}
.list-card {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.list-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.list-head span {
  flex: 1;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}
.list-head .btn-back {
  padding: 0 12px;
  height: 34px;
}
.list-empty {
  padding: 18px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}

/* Active rooms */
.room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}
.room-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.room-item.busy {
  opacity: 0.6;
}
.ri-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 8px var(--ac);
}
.ri-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ri-main b {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ri-main small {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.ri-join {
  flex-shrink: 0;
  height: 34px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #04101f;
  background: linear-gradient(180deg, #9ff6ff, var(--primary));
}
.online-card .seg {
  width: 100%;
}

/* Profile head */
.profile-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ph-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ph-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
/* Team names can be long: up to two lines. */
.ph-name b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
}
.ph-name small,
.ph-points small,
.ph-stats small {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.ph-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 201, 60, 0.1);
  border: 1px solid rgba(255, 201, 60, 0.35);
}
.ph-points b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
}
.ph-crest {
  flex-shrink: 0;
  height: 64px;
}
.ph-crest .crest {
  animation: none;
  transform: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}
.ph-edit {
  align-self: flex-start;
  margin-top: 6px;
  padding: 5px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.ph-arena {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ph-arena-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}
.ph-arena-row b {
  color: var(--ac);
}
.ph-arena-row span {
  color: var(--gold);
}
.ph-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.ph-track span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ac), var(--gold));
}
.ph-arena small {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}
.ph-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.ph-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.ph-stats b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}
.ph-stats small {
  font-size: 8.5px;
  letter-spacing: 0.8px;
}

/* Squad */
.squad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.slot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.slot-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slot-head div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.slot-head b {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
}
.slot-head small {
  font-size: 11px;
  color: var(--muted);
}
.slot-head .slot-who {
  flex: 1;
}
.slot-name {
  width: 100%;
  height: 30px;
  margin-bottom: 2px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.slot-name:hover {
  border-color: rgba(255, 255, 255, 0.28);
}
.slot-name:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.45);
}
.slot-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #04101f;
  background: linear-gradient(180deg, #9ff6ff, var(--primary));
}
.duties {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.duty {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
}
.duty.on {
  color: #2a1600;
  border-color: var(--gold);
  background: var(--gold);
}
.skills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sk-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
.sk-top span {
  color: var(--muted);
}
.sk-top em {
  margin-right: 8px;
  font-style: normal;
  color: var(--primary);
}
.sk-pips {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}
.sk-pips i {
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.sk-pips i.on {
  background: linear-gradient(90deg, var(--primary), #9ff6ff);
  box-shadow: 0 0 6px rgba(25, 227, 255, 0.5);
}
.sk-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sk-bottom small {
  font-size: 10.5px;
  color: var(--muted);
}
.sk-plus {
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #2a1600;
  background: linear-gradient(180deg, #ffe58a, var(--gold));
}
.sk-plus:disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: default;
}

/* Kit editor */
.kit-editor {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}
.kit-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: radial-gradient(80% 60% at 50% 40%, rgba(25, 227, 255, 0.12), transparent), rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.kit-svg {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6));
}
.kit-preview small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--gold);
}
.kit-parts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.swatch.on {
  border-color: #fff;
  box-shadow:
    0 0 0 2px var(--primary),
    inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.swatch.custom {
  overflow: hidden;
  cursor: pointer;
  background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.swatch.custom input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.kit-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kit-actions .btn-ghost,
.kit-actions .btn-gold {
  width: min(260px, 100%);
}

/* Account */
.account-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.account-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}
.account-info span {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--muted);
}
#pane-account {
  align-items: center;
}
#pane-account .account-info {
  width: 100%;
}

/* Leaderboard */
.arena-ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.arena-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ac);
}
.arena-card.mine {
  background: rgba(255, 201, 60, 0.08);
  border-color: rgba(255, 201, 60, 0.45);
  border-top-color: var(--ac);
}
.arena-card b {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--ac);
}
.arena-card span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}
.arena-card small {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.ladder-rule {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}
.board {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 52vh;
  overflow-y: auto;
}
.board-row {
  display: grid;
  grid-template-columns: 40px 1fr 54px 76px 44px;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
}
.board-row.head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  background: #0e1628;
}
.board-row.me {
  background: rgba(25, 227, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(25, 227, 255, 0.4);
}
.board-row .rank {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--muted);
}
.board-row .rank.top1 {
  color: #ffd54a;
}
.board-row .rank.top2 {
  color: #d7e1ee;
}
.board-row .rank.top3 {
  color: #e2a066;
}
.board-row .who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .who i {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.board-row .who-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .who-name small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .st {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
}
.board-row .wdl,
.board-row .cups {
  color: #cbd5e1;
  font-size: 12px;
}
.board-me {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}
.board-me b {
  color: var(--gold);
}

/* Tournaments */
.cup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cup-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.94), rgba(8, 13, 26, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.cup-card.active {
  border-color: rgba(255, 201, 60, 0.5);
}
.cup-card.locked {
  opacity: 0.7;
}
.cup-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cup-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(255, 201, 60, 0.1);
  border: 1px solid rgba(255, 201, 60, 0.35);
}
.cup-icon svg {
  width: 26px;
  height: 26px;
}
.cup-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.cup-head p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.cup-rounds {
  display: flex;
  gap: 6px;
}
.round {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 4px;
  border-radius: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.round b {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
}
.round small {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
}
.round.done {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.08);
}
.round.now {
  border-color: var(--gold);
  background: rgba(255, 201, 60, 0.12);
}
.cup-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold);
}
.cup-titles {
  color: #4ade80;
}
.cup-champs {
  font-size: 11px;
  color: var(--muted);
}
.cup-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cup-actions .btn-gold,
.cup-actions .btn-primary {
  width: min(300px, 100%);
  height: 50px;
  font-size: 14px;
}
.cup-actions .btn-back {
  padding: 0 14px;
}
.cup-lock {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed var(--line);
}

/* Short messages */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 14px);
  z-index: 60;
  max-width: min(92vw, 520px);
  padding: 10px 16px;
  border-radius: 12px;
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(255, 201, 60, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.25s,
    opacity 0.25s;
}
.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 760px) {
  .squad-grid {
    grid-template-columns: 1fr;
  }
  .kit-editor {
    grid-template-columns: 1fr;
  }
  .kit-svg {
    width: 120px;
  }
  .ph-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .ph-name b {
    font-size: 17px;
  }
  .ph-points {
    padding: 6px 8px;
  }
  .arena-card b {
    font-size: 9.5px;
  }
  .board-row {
    grid-template-columns: 30px 1fr 44px 64px 34px;
    padding: 8px 8px;
    font-size: 12px;
  }
  .acct-chip {
    max-width: 70%;
  }
  .oc-word {
    display: none;
  }
  /* Phones: open rooms first, one tap from a match; the create and code cards follow. */
  .online-shell .list-card {
    order: 1;
  }
  .online-shell .online-grid {
    order: 2;
  }
  .online-shell .online-status {
    order: 3;
  }
  .room-list {
    max-height: 260px;
  }
  .list-head {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .list-head span {
    order: 3;
    flex-basis: 100%;
  }
  .list-head .btn-back {
    margin-left: auto;
  }
}
