:root {
  color-scheme: dark;
  --bg: #0a100d;
  --bg-soft: #101812;
  --panel: #141c16;
  --panel-raised: #1a231c;
  --line: #243028;
  --line-strong: #32433a;
  --ink: #eef6f0;
  --muted: #93a89b;
  --accent: #35d17c;
  --accent-dark: #23a35d;
  --accent-soft: rgba(53, 209, 124, 0.12);
  --red: #ff5d5d;
  --red-dark: #d63c3c;
  --red-soft: rgba(255, 93, 93, 0.12);
  --blue: #4f8dff;
  --blue-dark: #2f66d6;
  --blue-soft: rgba(79, 141, 255, 0.12);
  --gold: #ffd166;
  --gold-soft: rgba(255, 209, 102, 0.1);
  --gold-line: rgba(255, 209, 102, 0.35);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.1);
  --radius: 14px;
  --radius-small: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-glow: 0 0 0 1px rgba(53, 209, 124, 0.25), 0 8px 30px rgba(53, 209, 124, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(53, 209, 124, 0.1), transparent 62%),
    radial-gradient(900px 520px at 88% 108%, rgba(79, 141, 255, 0.07), transparent 60%),
    radial-gradient(760px 460px at 6% 96%, rgba(255, 209, 102, 0.05), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
}

.screen {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Menu                                                                */
/* ------------------------------------------------------------------ */

.menu-screen {
  width: min(1320px, calc(100% - 36px));
  padding: 26px 0 56px;
}

.menu-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.menu-sidebar {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-raised), var(--panel) 70%);
  padding: 18px 14px 16px;
  box-shadow: var(--shadow);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 6px 0;
}

.sidebar-brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #4adf8d, var(--accent) 55%, #1f9d5c);
  color: #07120c;
  box-shadow: 0 6px 22px rgba(53, 209, 124, 0.35);
  animation: brand-float 5s ease-in-out infinite;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

@keyframes brand-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-3deg); }
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #f2fff6 20%, #8ff0ba 50%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.sidebar-footer .wallet-pill {
  width: 100%;
  justify-content: center;
}

.menu-content {
  min-width: 0;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  animation: panel-in 240ms ease-out;
}

.content-header h1 {
  margin: 0 0 5px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.content-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  padding: 0 16px 0 10px;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wallet-pill.compact {
  min-height: 36px;
  padding: 0 13px 0 9px;
  font-size: 0.9rem;
}

.wallet-pill.compact::before {
  content: "$";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--gold);
  color: #2d1e04;
  font-size: 0.74rem;
  font-weight: 800;
}

.wallet-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #2d1e04;
}

.wallet-icon svg {
  width: 15px;
  height: 15px;
}

/* --- Tabs ------------------------------------------------------------ */

.menu-tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-group {
  display: grid;
  gap: 5px;
}

.tab-group-label {
  padding: 0 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

.tab-group-buttons {
  display: grid;
  gap: 3px;
}

.tab-button {
  --tab-accent: var(--accent);
  --tab-accent-soft: rgba(53, 209, 124, 0.12);
  --tab-accent-line: rgba(53, 209, 124, 0.45);
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: left;
  transition: background 130ms ease, color 130ms ease;
}

.tab-button[data-accent="teal"] {
  --tab-accent: #2dd4bf;
  --tab-accent-soft: rgba(45, 212, 191, 0.12);
  --tab-accent-line: rgba(45, 212, 191, 0.45);
}

.tab-button[data-accent="blue"] {
  --tab-accent: #4f8dff;
  --tab-accent-soft: rgba(79, 141, 255, 0.13);
  --tab-accent-line: rgba(79, 141, 255, 0.5);
}

.tab-button[data-accent="gold"] {
  --tab-accent: #ffd166;
  --tab-accent-soft: rgba(255, 209, 102, 0.12);
  --tab-accent-line: rgba(255, 209, 102, 0.45);
}

.tab-button[data-accent="violet"] {
  --tab-accent: #a78bfa;
  --tab-accent-soft: rgba(167, 139, 250, 0.13);
  --tab-accent-line: rgba(167, 139, 250, 0.5);
}

.tab-button[data-accent="orange"] {
  --tab-accent: #fb923c;
  --tab-accent-soft: rgba(251, 146, 60, 0.13);
  --tab-accent-line: rgba(251, 146, 60, 0.48);
}

.tab-button[data-accent="rose"] {
  --tab-accent: #fb7185;
  --tab-accent-soft: rgba(251, 113, 133, 0.13);
  --tab-accent-line: rgba(251, 113, 133, 0.48);
}

.tab-button[data-accent="cyan"] {
  --tab-accent: #38bdf8;
  --tab-accent-soft: rgba(56, 189, 248, 0.13);
  --tab-accent-line: rgba(56, 189, 248, 0.5);
}

.tab-button[data-accent="slate"] {
  --tab-accent: #9fb2c8;
  --tab-accent-soft: rgba(159, 178, 200, 0.12);
  --tab-accent-line: rgba(159, 178, 200, 0.4);
}

.tab-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
}

.tab-button:hover .tab-icon {
  color: var(--tab-accent);
  border-color: var(--tab-accent-line);
}

.tab-button:active .tab-icon {
  transform: scale(0.94);
}

.tab-button.is-active {
  color: var(--ink);
  background: var(--tab-accent-soft);
  font-weight: 700;
}

.tab-button.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 3px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: var(--tab-accent);
}

.tab-button.is-active .tab-icon {
  border-color: transparent;
  background: var(--tab-accent);
  color: #0a100c;
  box-shadow: 0 4px 14px var(--tab-accent-soft);
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 130ms ease, background 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.tab-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-raised), var(--panel) 55%);
  padding: 22px;
  transition: border-color 160ms ease;
}

.panel:hover {
  border-color: var(--line-strong);
}

.match-panel {
  grid-column: 1 / -1;
}

.single-grid,
.loadout-grid,
.shop-grid {
  display: grid;
  gap: 16px;
}

.single-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.single-grid .match-panel {
  grid-column: 1 / -1;
}

.loadout-grid,
.shop-grid {
  grid-template-columns: 1fr;
}

.tab-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tab-title-row h2 {
  margin: 0 0 5px;
  font-size: 1.2rem;
  font-weight: 800;
}

.tab-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.panel-head::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  flex-shrink: 0;
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.team-dot-red {
  background: var(--red);
}

.team-dot-blue {
  background: var(--blue);
}

.field-label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.room-loadout-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: normal;
}

.room-loadout-option input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  padding: 0 13px;
  color: var(--ink);
  background: var(--bg-soft);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder {
  color: #5c6f64;
}

.picker-label {
  margin: 2px 0 9px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* --- Dropdown --------------------------------------------------------- */

.dropdown {
  position: relative;
  margin-bottom: 18px;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 8px 13px;
  color: var(--ink);
  text-align: left;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.dropdown-toggle:hover {
  border-color: var(--accent);
}

.dropdown.is-open .dropdown-toggle {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dropdown-value {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dropdown-value svg,
.dropdown-option svg {
  display: block;
  width: 78px;
  height: auto;
  flex: none;
  border-radius: 6px;
}

.dropdown-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dropdown-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
}

.dropdown-sub {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.dropdown-caret {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
  transition: transform 130ms ease;
}

.dropdown.is-open .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--panel-raised);
  box-shadow: var(--shadow);
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 7px 9px;
  color: var(--ink);
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dropdown-option.is-selected {
  border-color: rgba(53, 209, 124, 0.4);
  background: var(--accent-soft);
}

.formation-dropdown .dropdown-toggle {
  min-height: 76px;
}

.formation-dropdown .dropdown-value svg {
  width: 112px;
}

.formation-dropdown .dropdown-option {
  min-height: 90px;
  gap: 14px;
  padding: 10px 11px;
}

.formation-dropdown .dropdown-option svg {
  width: 132px;
}

.formation-dropdown .dropdown-menu {
  max-height: min(560px, 70vh);
  gap: 7px;
}

/* --- Match settings / mode picker -------------------------------------- */

.match-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 20px;
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.difficulty-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-button,
.segment-button,
.pill-button,
.difficulty-button {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 600;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease;
}

.mode-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 13px;
  font-size: 0.88rem;
  text-align: left;
}

.difficulty-button {
  min-height: 68px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
}

.difficulty-button strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.difficulty-button span {
  color: var(--muted);
  font-size: 0.78rem;
}

.mode-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  transition: background 130ms ease, color 130ms ease;
}

.mode-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

.mode-button:hover,
.segment-button:hover,
.pill-button:hover:not(:disabled),
.difficulty-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.mode-button.is-selected,
.segment-button.is-selected,
.pill-button.is-selected,
.difficulty-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.mode-button.is-selected .mode-icon {
  background: rgba(53, 209, 124, 0.16);
  color: var(--accent);
}

.mode-help {
  margin: 0;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.visibility-picker {
  grid-template-columns: repeat(2, 1fr);
}

.room-mode-picker {
  grid-template-columns: repeat(2, 1fr);
}

.segment-button {
  min-height: 44px;
  font-size: 0.92rem;
}

.fixed-score-card {
  min-height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 15px;
}

.fixed-score-card strong,
.fixed-score-card span {
  display: block;
}

.fixed-score-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.fixed-score-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
}

.fixed-score-icon svg {
  width: 21px;
  height: 21px;
}

/* --- Puck set pills -------------------------------------------------- */

.pill-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 15px;
  font-size: 0.84rem;
}

.pill-button:disabled {
  cursor: default;
  opacity: 0.45;
}

/* --- Loadout / shop -------------------------------------------------- */

.loadout-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 12px;
}

.summary-card svg {
  width: 82px;
  flex: none;
}

.summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.summary-copy strong {
  font-size: 0.94rem;
}

.summary-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

.loadout-link-button {
  width: 100%;
}

.item-grid {
  display: grid;
  gap: 12px;
}

.formation-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.puck-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.item-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 13px;
  transition: border-color 130ms ease;
}

.item-card:hover {
  border-color: var(--line-strong);
}

.item-card.is-equipped {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(53, 209, 124, 0.06), var(--bg-soft) 55%);
}

.item-card.is-locked {
  opacity: 0.75;
}

.item-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.item-preview svg {
  display: block;
  width: 100%;
  max-width: 156px;
  height: auto;
}

.puck-preview svg {
  max-width: 92px;
}

.item-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-card-title {
  display: grid;
  gap: 3px;
}

.item-card-title strong {
  font-size: 0.95rem;
}

.item-card-title span,
.item-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rarity-badge,
.owned-badge,
.price-badge {
  width: fit-content;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rarity-common {
  border-color: rgba(200, 214, 206, 0.25);
  background: rgba(200, 214, 206, 0.06);
  color: #c8d6ce;
}

.rarity-rare {
  border-color: rgba(79, 141, 255, 0.4);
  background: rgba(79, 141, 255, 0.09);
  color: #8db5ff;
}

.rarity-epic {
  border-color: rgba(185, 121, 255, 0.4);
  background: rgba(185, 121, 255, 0.09);
  color: #c69bff;
}

.rarity-legendary {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold);
}

.rarity-mythic {
  border-color: rgba(255, 110, 110, 0.5);
  background: rgba(255, 110, 110, 0.1);
  color: #ff8d7a;
}

.rarity-exotic {
  border-color: rgba(53, 231, 255, 0.62);
  background: linear-gradient(110deg, rgba(53, 231, 255, 0.13), rgba(139, 61, 255, 0.16));
  color: #9af4ff;
  box-shadow: 0 0 13px rgba(124, 60, 255, 0.2);
}

.rarity-secret {
  border-color: rgba(174, 182, 194, 0.35);
  background: rgba(174, 182, 194, 0.07);
  color: #aeb6c2;
}

.owned-badge {
  border-color: rgba(53, 209, 124, 0.4);
  background: var(--accent-soft);
  color: #7fe6ac;
}

.price-badge {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold);
}

.stat-list {
  display: grid;
  gap: 7px;
}

.stat-row {
  display: grid;
  grid-template-columns: 64px 1fr 30px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.stat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.stat-bar.is-elite span {
  background: var(--gold);
}

.stat-value {
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.item-actions button {
  flex: 1;
}

.pack-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
}

.pack-card {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: start;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background:
    radial-gradient(130% 95% at 100% 0%, rgba(53, 209, 124, 0.09), transparent 58%),
    var(--bg-soft);
  padding: 16px;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.pack-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.pack-card-explosion {
  background:
    radial-gradient(130% 95% at 100% 0%, rgba(255, 209, 102, 0.11), transparent 58%),
    var(--bg-soft);
}

.pack-card-explosion:hover {
  border-color: var(--gold-line);
}

.pack-card-explosion .pack-art {
  background: var(--gold-soft);
  color: var(--gold);
}

.pack-card-ball {
  background:
    radial-gradient(130% 95% at 100% 0%, rgba(79, 141, 255, 0.11), transparent 58%),
    var(--bg-soft);
}

.pack-card-ball:hover {
  border-color: rgba(79, 141, 255, 0.6);
}

.pack-card-ball .pack-art {
  background: rgba(79, 141, 255, 0.12);
  color: #8db5ff;
}

.pack-card-premium {
  border-color: rgba(255, 209, 102, 0.42);
  background:
    radial-gradient(115% 100% at 100% 0%, rgba(139, 61, 255, 0.18), transparent 52%),
    linear-gradient(145deg, rgba(255, 209, 102, 0.09), rgba(5, 7, 12, 0.18)),
    var(--bg-soft);
}

.pack-card-premium:hover {
  border-color: #ffd166;
  box-shadow: 0 12px 30px rgba(124, 60, 255, 0.2), 0 0 18px rgba(255, 209, 102, 0.12);
}

.pack-card-premium .pack-art {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(139, 61, 255, 0.2));
  color: #ffe08a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 0 16px rgba(139, 61, 255, 0.18);
}

.pack-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.pack-open-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pack-card:hover .pack-open-hint {
  color: var(--ink);
}

.pack-art {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pack-art svg {
  width: 23px;
  height: 23px;
}

.pack-copy {
  display: grid;
  gap: 3px;
}

.pack-copy strong {
  font-size: 1rem;
}

.pack-copy span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.pack-price {
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  padding: 4px 12px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.pack-reveal {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  overflow: hidden;
}

.pack-reveal.is-opening {
  border-style: solid;
  color: var(--gold);
}

.pack-reveal.is-opening::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  animation: packPop 760ms ease-in-out infinite alternate;
}

.pack-result {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pack-result svg {
  width: 70px;
  flex: none;
}

.pack-result-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.pack-result-copy strong {
  color: var(--ink);
}

.pack-result-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes packPop {
  0% {
    transform: translateY(8px) rotate(-8deg) scale(0.92);
    filter: brightness(0.95);
  }

  100% {
    transform: translateY(-4px) rotate(8deg) scale(1.06);
    filter: brightness(1.16);
  }
}

/* --- Rarity accents --------------------------------------------------- */

.locker-rarity-common {
  --rarity-color: rgba(200, 214, 206, 0.4);
}

.locker-rarity-rare {
  --rarity-color: rgba(79, 141, 255, 0.75);
}

.locker-rarity-epic {
  --rarity-color: rgba(185, 121, 255, 0.75);
}

.locker-rarity-legendary {
  --rarity-color: rgba(255, 209, 102, 0.8);
}

.locker-rarity-mythic {
  --rarity-color: rgba(255, 110, 110, 0.85);
}

.locker-rarity-exotic {
  --rarity-color: rgba(53, 231, 255, 0.92);
}

.locker-rarity-secret {
  --rarity-color: rgba(174, 182, 194, 0.5);
}

/* --- Loadout Locker ---------------------------------------------------- */

.locker-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.locker-slot {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
  justify-items: center;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rarity-color, var(--line-strong));
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), var(--bg-soft) 72%);
  padding: 16px 14px 15px;
  color: var(--ink);
  text-align: center;
  transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.locker-slot:hover {
  border-color: var(--rarity-color, var(--accent));
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.locker-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.locker-slot-category {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.locker-slot-count {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.locker-slot-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 96px;
}

.locker-slot-preview svg {
  display: block;
  width: 108px;
  max-width: 100%;
  height: auto;
}

.locker-slot-name {
  font-size: 1rem;
  font-weight: 800;
}

.locker-slot-hint {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.locker-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.locker-back-button {
  flex: none;
}

.locker-detail-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.locker-detail-title span {
  color: var(--muted);
  font-size: 0.8rem;
}

.locker-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
}

.locker-item {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 8px;
  justify-items: center;
  align-content: start;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rarity-color, var(--line-strong));
  border-radius: var(--radius-small);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), var(--bg-soft) 70%);
  padding: 13px 12px 12px;
  color: var(--ink);
  text-align: center;
  transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.locker-item:hover {
  border-color: var(--rarity-color, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.locker-item.is-equipped {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(53, 209, 124, 0.1), var(--bg-soft) 62%);
}

.locker-item-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 76px;
}

.locker-item-preview svg {
  display: block;
  width: 82px;
  max-width: 100%;
  height: auto;
}

.locker-item .locker-item-preview svg.random-formation-preview,
.locker-item-preview svg[viewBox="0 0 120 72"] {
  width: 104px;
}

.locker-item-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.locker-item-sub {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.locker-item-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-height: 22px;
}

.locker-equipped-mark {
  border: 1px solid rgba(53, 209, 124, 0.45);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 3px 10px;
  color: #7fe6ac;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.locker-rarity-mythic.locker-slot,
.locker-rarity-mythic.locker-item {
  animation: mythicGlow 2.6s ease-in-out infinite;
}

@keyframes mythicGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 110, 110, 0);
  }

  50% {
    box-shadow: 0 0 22px rgba(255, 110, 110, 0.26);
  }
}

/* --- Pack modal --------------------------------------------------------- */

.pack-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 8, 6, 0.74);
  backdrop-filter: blur(4px);
}

.pack-modal-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(620px, 100%);
  max-height: min(86vh, 800px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pack-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pack-modal-title h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
}

.pack-modal-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pack-modal-close {
  flex: none;
  min-width: 42px;
  padding: 0 12px;
}

.pack-modal-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pack-modal-buy {
  flex: 1;
}

.pack-reveal-idle {
  color: var(--muted);
}

.pack-result svg {
  width: 64px;
}

.pack-result.locker-rarity-mythic svg,
.pack-result.locker-rarity-legendary svg,
.pack-result.locker-rarity-exotic svg {
  filter: drop-shadow(0 0 12px var(--rarity-color));
}

.pack-drop-row.is-secret {
  background:
    linear-gradient(90deg, rgba(174, 182, 194, 0.06), transparent 60%),
    var(--bg-soft);
}

.event-horizon-preview {
  overflow: visible;
  filter: drop-shadow(0 0 7px rgba(124, 60, 255, 0.65));
}

.event-horizon-orbit {
  transform-origin: 40px 40px;
  animation: eventHorizonOrbit 3.2s linear infinite;
}

@keyframes eventHorizonOrbit {
  to {
    transform: rotate(360deg);
  }
}

.pack-drop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pack-drop-list {
  display: grid;
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.pack-drop-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--rarity-color, var(--line-strong));
  border-radius: 9px;
  background: var(--bg-soft);
  padding: 7px 11px 7px 9px;
}

.pack-drop-row.is-owned {
  opacity: 0.62;
}

.pack-drop-preview {
  display: grid;
  place-items: center;
}

.pack-drop-preview svg {
  display: block;
  width: 38px;
  height: 38px;
}

.pack-drop-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.pack-drop-name strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-drop-chance {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pack-drop-owned {
  color: #7fe6ac;
  font-weight: 900;
}

.shop-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

/* --- Buttons ---------------------------------------------------------- */

.primary-button {
  border: 0;
  border-radius: var(--radius-small);
  min-height: 50px;
  color: #08130c;
  background: linear-gradient(180deg, #4adf8d, var(--accent) 60%, #2cba6c);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(53, 209, 124, 0.22);
  transition: box-shadow 130ms ease, transform 130ms ease, filter 130ms ease;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(53, 209, 124, 0.32);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 3px 10px rgba(53, 209, 124, 0.2);
}

.start-button {
  width: 100%;
  font-size: 1rem;
}

.ghost-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  padding: 0 15px;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
  transition: border-color 130ms ease, background 130ms ease;
}

.ghost-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.ghost-button:active:not(:disabled) {
  transform: translateY(0);
}

.small-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: default;
  opacity: 0.5;
  box-shadow: none;
}

/* --- Online tab: lobby -------------------------------------------------- */

.online-status {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 11px 13px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.online-status.is-online {
  border-color: rgba(53, 209, 124, 0.4);
  color: #7fe6ac;
  background: var(--accent-soft);
}

.online-status.is-error {
  border-color: rgba(255, 93, 93, 0.4);
  color: #ff9d9d;
  background: rgba(255, 93, 93, 0.08);
}

.online-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) 1.1fr;
  gap: 16px;
  align-items: start;
}

.account-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.account-info-row {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-info-row strong {
  color: var(--ink);
}

#logoutButton {
  margin-top: 14px;
}

.create-room-button {
  width: 100%;
}

.join-code-block {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.join-code-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.room-list-head {
  justify-content: space-between;
}

.room-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.room-list-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  padding: 26px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 12px 14px;
}

.room-item-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.room-item-name {
  font-weight: 700;
  font-size: 0.96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.room-item-status {
  color: var(--accent);
}

.room-item-status.is-live {
  color: var(--gold);
}

.room-item-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

/* --- Tournaments -------------------------------------------------------- */

.tournament-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.35fr);
  gap: 16px;
}

.tournament-create-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.tournament-create-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.tournament-list {
  display: grid;
  gap: 10px;
  max-height: 610px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.tournament-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  transition: border-color 130ms ease, background 130ms ease;
}

.tournament-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.tournament-item-info {
  display: grid;
  gap: 5px;
}

.tournament-item-info strong {
  font-size: 0.96rem;
}

.tournament-item-title,
.tournament-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tournament-item-actions {
  flex: none;
}

.tournament-status {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tournament-status-registration {
  border-color: rgba(79, 141, 255, 0.35);
  color: #8db7ff;
}

.tournament-status-running {
  border-color: rgba(53, 209, 124, 0.38);
  color: var(--accent);
}

.tournament-item-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

.tournament-detail {
  margin-top: 16px;
}

.tournament-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.tournament-presence {
  display: grid;
  grid-template-columns: auto minmax(120px, max-content) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin: 14px 0 18px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: var(--radius-small);
  background: linear-gradient(110deg, rgba(255, 209, 102, 0.12), var(--bg-soft));
  padding: 12px 14px;
}

.tournament-presence-kicker {
  color: #ffd166;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tournament-presence > strong {
  color: var(--ink);
}

#tournamentRoomDetail {
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 680px) {
  .tournament-presence {
    grid-template-columns: auto 1fr;
  }

  #tournamentRoomDetail {
    grid-column: 1 / -1;
  }

  .tournament-presence > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.tournament-standings {
  max-width: 620px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
}

.standings-head,
.standings-row {
  display: grid;
  grid-template-columns: 32px minmax(120px, 1fr) auto;
  min-width: 500px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
}

.standings-head {
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.standings-row + .standings-row {
  border-top: 1px solid var(--line);
}

.standings-row > span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.standings-rank {
  color: var(--muted);
  font-weight: 700;
}

.tournament-bracket {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.bracket-round {
  flex: 0 0 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bracket-round h3 {
  margin: 0 0 4px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.bracket-match {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  display: grid;
  gap: 7px;
}

.bracket-match-live {
  border-color: rgba(53, 209, 124, 0.5);
  box-shadow: 0 0 0 1px rgba(53, 209, 124, 0.08), 0 10px 28px rgba(0, 0, 0, 0.14);
}

.bracket-match-status {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bracket-match-live .bracket-match-status {
  color: var(--accent);
}

.bracket-match-bye {
  border-style: dashed;
  opacity: 0.82;
}

.bracket-player {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.bracket-player.is-winner {
  color: #7fe6ac;
  font-weight: 700;
}

.bracket-room {
  color: var(--muted);
  font-size: 0.76rem;
}

.bracket-match .ghost-button {
  margin-top: 3px;
  width: 100%;
}

.tournament-champion {
  padding: 12px 16px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-small);
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 700;
}

/* --- Player stats ------------------------------------------------------- */

.stats-title-row {
  align-items: flex-end;
}

.stats-title-row p {
  max-width: 70ch;
}

.stats-reset-button {
  flex: 0 0 auto;
}

.stats-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-view-picker {
  width: auto;
}

.stats-connection {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.stats-connection.is-online { color: var(--accent); }
.stats-connection.is-error { color: var(--red); }

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-summary-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px 20px;
}

.stat-summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-summary-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-summary-leader {
  border-color: rgba(53, 209, 124, 0.35);
  background: linear-gradient(135deg, var(--accent-soft), var(--panel));
}

.stats-panel {
  padding: 0;
  overflow: hidden;
}

.stats-table-wrap {
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.stats-table th,
.stats-table td {
  border-bottom: 1px solid var(--line);
  padding: 15px 14px;
  text-align: right;
  white-space: nowrap;
}

.stats-table th {
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2) {
  text-align: left;
}

.stats-table tbody tr:last-child td {
  border-bottom: 0;
}

.stats-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.stats-rank {
  color: var(--muted);
  font-weight: 700;
}

.stats-player,
.stats-win,
.stats-positive {
  color: var(--accent);
  font-weight: 800;
}

.stats-player {
  color: var(--ink);
}

.stats-negative {
  color: var(--red);
}

.stats-empty {
  padding: 46px 24px;
  color: var(--muted);
  text-align: center;
}

.career-title-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.career-record {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.career-record span {
  display: grid;
  min-width: 86px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.career-record strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.career-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.career-match-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.career-match-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(111, 240, 158, 0.1);
  color: var(--accent);
  font-weight: 800;
}

.career-match-top,
.career-match-meta,
.career-score {
  display: flex;
  align-items: center;
}

.career-match-top {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.career-type {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.career-score {
  gap: 10px;
  margin: 7px 0 6px;
  font-size: 1rem;
}

.career-score span:first-child {
  text-align: right;
}

.career-score span {
  min-width: 80px;
  font-weight: 700;
}

.career-score strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: white;
  font-size: 1.1rem;
}

.career-score-red { background: var(--red-dark); }
.career-score-blue { background: var(--blue-dark); }

.career-score em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.career-match-meta {
  flex-wrap: wrap;
  gap: 6px;
}

.career-match-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 0.75rem;
}

.career-match-action {
  min-width: 150px;
  text-align: right;
}

.career-highlight-button {
  min-height: 40px;
  padding: 0 14px;
}

.career-no-replay {
  color: var(--muted);
  font-size: 0.78rem;
}

.career-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.career-empty strong {
  color: var(--ink);
  font-size: 1.12rem;
}

.career-replay-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 9, 7, 0.88);
  backdrop-filter: blur(10px);
}

.career-replay-modal.is-hidden {
  display: none;
}

.career-replay-card {
  width: min(1000px, 96vw);
  max-height: 95vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0,0,0,0.52);
}

.career-replay-head,
.career-replay-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.career-replay-head {
  margin-bottom: 14px;
}

.career-replay-head h2,
.career-replay-head p {
  margin: 0;
}

.career-replay-head p {
  margin-top: 4px;
  color: var(--muted);
}

.career-replay-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.career-replay-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101814;
}

.career-replay-stage canvas {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .career-match-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .career-match-action {
    grid-column: 1 / -1;
    min-width: 0;
    text-align: left;
  }

  .career-highlight-button {
    width: 100%;
  }

  .career-score {
    flex-wrap: wrap;
  }

  .career-score span {
    min-width: 58px;
  }

  .career-replay-head,
  .career-replay-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .career-replay-controls {
    text-align: center;
  }
}

.career-replay-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10,15,12,0.78);
  color: white;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.career-replay-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

.career-replay-controls {
  margin-top: 14px;
}

.career-replay-controls button:disabled {
  opacity: 0.38;
  cursor: default;
}

@media (max-width: 760px) {
  .stats-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-title-row {
    align-items: stretch;
  }

  .stats-reset-button {
    width: 100%;
  }

  .stats-actions,
  .stats-actions > button,
  .stats-view-picker {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .tournament-grid {
    grid-template-columns: 1fr;
  }

  .tournament-item {
    align-items: stretch;
    flex-direction: column;
  }

  .tournament-item-actions > button {
    flex: 1;
  }
}

/* --- Online tab: room view ---------------------------------------------- */

.room-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.room-view-title h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
}

.room-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-badge {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  padding: 4px 13px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.room-view-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  gap: 24px;
  margin-bottom: 18px;
}

.member-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 10px 13px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 120ms ease, background 120ms ease;
}

.member-item.is-empty {
  border-style: dashed;
  color: var(--muted);
  font-weight: 500;
}

.member-item.is-movable {
  cursor: pointer;
}

.member-item.is-movable:hover {
  border-color: var(--accent);
}

.member-item.is-move-selected {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
}

.room-move-hint {
  margin: -8px 0 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.member-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.member-dot-red {
  background: var(--red);
}

.member-dot-blue {
  background: var(--blue);
}

.member-role {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.member-bot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.member-bot-select,
.member-bot-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 5px 7px;
  font: inherit;
  font-size: 0.72rem;
}

.member-bot-button {
  cursor: pointer;
  font-weight: 800;
}

.room-setup .primary-button {
  width: 100%;
  margin-top: 4px;
}

.room-setup-note {
  border-left: 3px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 11px 13px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.room-setup .room-setup-note {
  margin-top: 4px;
}

.invite-row {
  display: grid;
  grid-template-columns: 1fr minmax(130px, auto);
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.invite-row .field-label {
  margin-bottom: 0;
}

.online-chat {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.chat-head span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 154px;
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg);
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: center;
}

.chat-message {
  display: grid;
  gap: 3px;
  max-width: 82%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 8px 10px;
}

.chat-message.is-own {
  align-self: flex-end;
  border-color: rgba(53, 209, 124, 0.3);
  background: var(--accent-soft);
}

.chat-message.is-red {
  border-color: rgba(255, 93, 93, 0.3);
}

.chat-message.is-blue {
  border-color: rgba(79, 141, 255, 0.3);
}

.chat-message.is-system {
  align-self: center;
  max-width: 100%;
  border-style: dashed;
  color: var(--muted);
  background: transparent;
  text-align: center;
  font-size: 0.82rem;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-text {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-compose input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
}

.chat-compose input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-compose button {
  min-height: 40px;
}

.quick-chat {
  position: relative;
}

.quick-chat-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  padding: 5px 9px;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.quick-chat-toggle small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.quick-chat-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quick-chat-menu {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel-raised);
  padding: 9px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.quick-chat-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.quick-chat-menu-head small {
  color: var(--muted);
  font-size: 0.66rem;
}

.quick-chat-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quick-chat-options button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 6px 8px;
  color: var(--ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.quick-chat-options button:hover,
.quick-chat-options button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.chat-message.is-quick .chat-text::before {
  content: "QUICK CHAT";
  display: inline-block;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 2px 6px;
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}

.chat-message.is-team-only .chat-text::before {
  content: "TEAM";
  background: rgba(34, 197, 94, 0.14);
  color: #22a956;
}

.quick-chat-toggle[data-quick-chat-group="r"] {
  border-color: rgba(34, 197, 94, 0.36);
}

.quick-chat-toggle[data-quick-chat-group="r"][aria-expanded="true"] {
  border-color: #22a956;
  background: rgba(34, 197, 94, 0.12);
}

/* ------------------------------------------------------------------ */
/* Game screen                                                          */
/* ------------------------------------------------------------------ */

.game-screen {
  --play-surface-width: min(100%, max(520px, calc((100vh - 260px) * 5 / 3)));
  width: min(1460px, calc(100% - 32px));
  min-height: 100vh;
  padding: 16px 0;
}

@supports (height: 100dvh) {
  .game-screen {
    --play-surface-width: min(100%, max(520px, calc((100dvh - 260px) * 5 / 3)));
  }
}

.game-topbar,
.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: var(--play-surface-width);
  margin-inline: auto;
}

.game-topbar {
  margin-bottom: 14px;
}

.game-topbar .scoreboard {
  width: 100%;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.game-layout.has-chat {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.game-field-column {
  min-width: 0;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 0.8fr) 1fr;
  align-items: stretch;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.score-team,
.score-center {
  min-height: 56px;
  display: flex;
  align-items: center;
}

.score-team {
  position: relative;
  flex-wrap: wrap;
  gap: 13px;
  padding: 0 18px;
  font-weight: 700;
}

.score-team strong {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  color: #fff;
  font-size: 1.2rem;
}

.red-score strong {
  background: var(--red);
}

.blue-score {
  justify-content: flex-end;
}

.blue-score strong {
  background: var(--blue);
}

.score-center {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-inline: 1px solid var(--line);
  background: var(--bg-soft);
  text-align: center;
}

.score-center span {
  font-weight: 700;
  font-size: 0.94rem;
}

.score-center small {
  color: var(--muted);
  font-size: 0.76rem;
}

.move-progress {
  width: min(190px, calc(100% - 20px));
  margin-top: 4px;
}

.move-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.move-progress-head strong {
  color: var(--ink);
}

.move-progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
}

.move-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffd166);
  transition: width 180ms ease;
}

.ready-badge {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.ready-badge.is-ready {
  border-color: rgba(53, 209, 124, 0.5);
  color: #7fe6ac;
  background: var(--accent-soft);
}

.canvas-wrap {
  position: relative;
  aspect-ratio: 5 / 3;
  width: var(--play-surface-width);
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0c120e;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.match-status-dock {
  display: grid;
  width: var(--play-surface-width);
  margin: 0 auto 10px;
  gap: 8px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.game-message {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid rgba(53, 209, 124, 0.42);
  border-radius: 13px;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(100deg, rgba(24, 120, 68, 0.34), rgba(53, 209, 124, 0.1));
  text-align: center;
  font-weight: 800;
  font-size: 0.92rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.game-message.is-visible {
  visibility: visible;
  opacity: 1;
  animation: status-pop 220ms ease-out;
}

.game-message.is-goal {
  border-color: rgba(255, 209, 102, 0.65);
  background: linear-gradient(100deg, rgba(255, 93, 93, 0.28), rgba(255, 209, 102, 0.3), rgba(79, 141, 255, 0.25));
  color: #fff5d7;
}

.game-message.is-turn-red {
  border-color: rgba(255, 93, 93, 0.55);
  background: linear-gradient(100deg, rgba(255, 93, 93, 0.3), rgba(255, 93, 93, 0.08));
}

.game-message.is-turn-blue {
  border-color: rgba(79, 141, 255, 0.6);
  background: linear-gradient(100deg, rgba(79, 141, 255, 0.3), rgba(79, 141, 255, 0.08));
}

@keyframes status-pop {
  from { opacity: 0; transform: translateY(-5px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tournament-game-hud {
  display: grid;
  grid-template-columns: auto minmax(120px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(255, 209, 102, 0.17), rgba(53, 209, 124, 0.08));
  padding: 9px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.tournament-game-hud > span {
  color: #ffd166;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tournament-game-hud > strong {
  font-size: 0.84rem;
}

.tournament-game-hud > small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-center.is-red-turn {
  background: linear-gradient(100deg, rgba(255, 93, 93, 0.14), var(--bg-soft));
}

.score-center.is-blue-turn {
  background: linear-gradient(100deg, var(--bg-soft), rgba(79, 141, 255, 0.14));
}

.score-center.is-goal {
  background: linear-gradient(100deg, rgba(255, 93, 93, 0.16), rgba(255, 209, 102, 0.2), rgba(79, 141, 255, 0.16));
}

.tournament-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 5, 0.82);
  backdrop-filter: blur(8px);
}

.tournament-result-card {
  display: grid;
  justify-items: center;
  width: min(480px, 100%);
  gap: 10px;
  border: 1px solid rgba(255, 209, 102, 0.48);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 0, rgba(255, 209, 102, 0.2), transparent 48%), var(--panel);
  padding: 30px 24px 24px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.55), 0 0 46px rgba(255, 209, 102, 0.08);
  text-align: center;
}

.tournament-result-crown {
  font-size: 3rem;
  filter: drop-shadow(0 8px 18px rgba(255, 209, 102, 0.28));
}

.tournament-result-card h2,
.tournament-result-card p {
  margin: 0;
}

.tournament-result-card p {
  color: var(--muted);
}

.tournament-result-card > strong {
  color: #ffd166;
  font-size: clamp(1.65rem, 6vw, 2.45rem);
}

.tournament-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.replay-overlay {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 77, 94, 0.42);
  border-radius: 13px;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 77, 94, 0.16), rgba(255, 209, 102, 0.08));
}

.replay-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 13, 9, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.replay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d5e;
  box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.18);
  animation: replay-dot-pulse 1.25s ease-in-out infinite;
}

.replay-skip-panel {
  width: 100%;
  padding: 3px 5px;
}

.replay-skip-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.replay-skip-copy strong {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.replay-skip-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.replay-skip-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.replay-skip-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffd166);
  transition: width 180ms ease;
}

@keyframes replay-dot-pulse {
  50% { opacity: 0.42; }
}

.penalty-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 10px 20px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(14, 22, 17, 0.9), rgba(8, 13, 10, 0.92));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 3;
}

.live-tournament-panel {
  width: var(--play-surface-width);
  margin: 13px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.07), rgba(21, 28, 23, 0.96) 38%);
  box-shadow: var(--shadow);
}

.live-tournament-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.live-tournament-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-tournament-head small {
  color: var(--muted);
  font-size: 0.72rem;
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d5e;
  box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.15);
  animation: replay-dot-pulse 1.25s ease-in-out infinite;
}

.live-tournament-content {
  overflow-x: auto;
  padding: 12px 14px 14px;
}

.live-bracket {
  display: flex;
  gap: 10px;
  min-width: max-content;
}

.live-bracket-round {
  width: 205px;
}

.live-bracket-round h4 {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-match {
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.live-match.is-current,
.live-match.is-live {
  border-color: rgba(53, 209, 124, 0.55);
  box-shadow: 0 0 0 1px rgba(53, 209, 124, 0.12);
}

.live-match-status {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.live-match.is-live .live-match-status { color: #72e4a4; }

.live-match-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 5px 8px;
  font-size: 0.74rem;
}

.live-match-player span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-match-player.is-winner {
  color: var(--gold);
  font-weight: 800;
}

.live-standing-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.live-standing-table th,
.live-standing-table td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.live-standing-table th:nth-child(2),
.live-standing-table td:nth-child(2) { text-align: left; }
.live-standing-table th { color: var(--muted); font-size: 0.64rem; text-transform: uppercase; }
.live-standing-table tr.is-me { background: var(--accent-soft); }
.live-standing-table .positive { color: #72e4a4; }
.live-standing-table .negative { color: #ff7a7a; }

.penalty-overlay-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.penalty-overlay-sudden {
  padding: 2px 9px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  letter-spacing: 0.1em;
  animation: penalty-sudden-glow 1.6s ease-in-out infinite;
}

.penalty-overlay-board {
  display: flex;
  align-items: center;
  gap: 16px;
}

.penalty-overlay-team {
  display: flex;
  align-items: center;
  gap: 11px;
  opacity: 0.82;
  transition: opacity 180ms ease;
}

.penalty-overlay-team.is-shooting {
  opacity: 1;
}

.penalty-overlay-name {
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.penalty-overlay-red .penalty-overlay-name {
  color: var(--red);
}

.penalty-overlay-blue .penalty-overlay-name {
  color: var(--blue);
}

.penalty-overlay-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.32rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.penalty-overlay-divider {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.penalty-overlay-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.penalty-dot {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
}

.penalty-dot.is-scored {
  border-color: var(--accent);
  background: var(--accent);
  color: #06130b;
}

.penalty-dot.is-missed {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.penalty-dot.is-next {
  border-color: #fff;
  animation: penalty-dot-pulse 1.1s ease-in-out infinite;
}

@keyframes penalty-dot-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
  }
}

@keyframes penalty-sudden-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.3);
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(255, 209, 102, 0.18);
  }
}

@media (max-width: 700px) {
  .tournament-game-hud {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 9px;
    padding: 8px 11px;
  }

  .tournament-game-hud > small {
    grid-column: 1 / -1;
  }

  .replay-overlay {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .live-tournament-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .penalty-overlay {
    gap: 5px;
    padding: 8px 13px 10px;
    border-radius: 13px;
  }

  .penalty-overlay-board {
    gap: 10px;
  }

  .penalty-overlay-team {
    gap: 7px;
  }

  .penalty-overlay-name {
    max-width: 8ch;
    font-size: 0.8rem;
  }

  .penalty-overlay-score {
    padding: 2px 9px;
    font-size: 1.05rem;
  }

  .penalty-overlay-dots {
    gap: 4px;
  }

  .penalty-dot {
    width: 14px;
    height: 14px;
    border-width: 1.6px;
    font-size: 0.52rem;
  }
}

.planning-controls {
  display: grid;
  grid-template-columns: minmax(84px, auto) 1fr minmax(140px, auto) minmax(140px, auto) 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.planning-controls.is-hidden,
.lock-button.is-hidden {
  display: none;
}

.timer-pill,
.lock-state {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel);
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.9rem;
}

.timer-pill {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.red-lock {
  color: var(--red);
}

.blue-lock {
  color: var(--blue);
}

.lock-state.is-locked {
  border-color: rgba(53, 209, 124, 0.5);
  color: #7fe6ac;
  background: var(--accent-soft);
}

.lock-button {
  min-height: 44px;
  color: #fff;
}

.red-lock-button {
  background: var(--red-dark);
}

.red-lock-button:hover:not(:disabled) {
  background: var(--red);
}

.blue-lock-button {
  background: var(--blue-dark);
}

.blue-lock-button:hover:not(:disabled) {
  background: var(--blue);
}

.lock-button:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

.game-footer {
  margin-top: 13px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.88rem;
}

.game-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.game-chat {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-top: 0;
  padding: 14px;
}

.game-chat .chat-log {
  flex: 1;
  min-height: 240px;
  max-height: calc(100vh - 210px);
}

kbd {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel-raised);
  padding: 1px 7px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 880px) {
  .screen {
    width: min(100% - 20px, 1160px);
  }

  .menu-screen {
    padding: 28px 0 44px;
  }

  .menu-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .menu-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .menu-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .tab-button.is-active::before {
    display: none;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .match-settings {
    grid-template-columns: 1fr;
  }

  .single-grid {
    grid-template-columns: 1fr;
  }

  .online-grid,
  .room-view-grid {
    grid-template-columns: 1fr;
  }

  .join-code-row {
    grid-template-columns: 1fr;
  }

  .room-item {
    flex-direction: column;
    align-items: stretch;
  }

  .room-item-actions {
    justify-content: stretch;
  }

  .room-item-actions .ghost-button {
    flex: 1;
  }

  .room-view-head {
    flex-direction: column;
  }

  .invite-row {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 94%;
  }

  .game-topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .scoreboard {
    order: -1;
    flex-basis: 100%;
    grid-template-columns: 1fr;
  }

  .score-team,
  .score-center {
    min-height: 48px;
  }

  .score-center {
    border-block: 1px solid var(--line);
    border-inline: 0;
  }

  .game-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .game-layout.has-chat {
    grid-template-columns: 1fr;
  }

  .game-chat {
    position: static;
  }

  .game-chat .chat-log {
    min-height: 160px;
    max-height: 240px;
  }

  .planning-controls {
    grid-template-columns: 1fr 1fr;
  }

  .timer-pill,
  .lock-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .menu-screen {
    padding: 14px 0 32px;
  }

  .menu-sidebar {
    padding: 14px 12px;
  }

  .menu-tabs {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tab-group-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    min-height: 40px;
    gap: 8px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .tab-icon {
    width: 28px;
    height: 28px;
  }

  .tab-icon svg {
    width: 15px;
    height: 15px;
  }

  .content-header h1 {
    font-size: 1.3rem;
  }

  .panel {
    padding: 15px;
  }

  .panel-head {
    margin-bottom: 13px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .formation-dropdown .dropdown-value svg {
    width: 94px;
  }

  .formation-dropdown .dropdown-option svg {
    width: 106px;
  }

  .mode-picker {
    grid-template-columns: 1fr;
  }

  .difficulty-picker {
    grid-template-columns: 1fr;
  }

  .locker-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .locker-slot {
    padding: 12px 10px 12px;
  }

  .locker-slot-preview {
    min-height: 74px;
  }

  .locker-slot-preview svg {
    width: 86px;
  }

  .locker-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 9px;
  }

  .pack-modal-card {
    padding: 13px;
    max-height: 92vh;
  }

  .pack-drop-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .tab-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-grid {
    gap: 9px;
  }

  .formation-card-grid,
  .puck-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .game-screen {
    padding: 10px 0;
  }

  .game-topbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .game-menu-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .score-team,
  .score-center {
    min-height: 42px;
  }

  .score-team {
    gap: 9px;
    padding: 0 13px;
    font-size: 0.88rem;
  }

  .score-team strong {
    min-width: 30px;
    min-height: 30px;
    font-size: 1rem;
  }

  .canvas-wrap {
    border-radius: 12px;
  }

  .planning-controls {
    margin-top: 10px;
    gap: 7px;
  }

  .timer-pill,
  .lock-state,
  .lock-button {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .game-footer {
    margin-top: 9px;
    font-size: 0.78rem;
  }

  .game-footer span:last-child {
    display: none;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .quick-chat-options {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ */
/* Overhaul 2026: Menue-Leben, Turnier-UI, Tor-Effekte                 */
/* ------------------------------------------------------------------ */

.tab-panel {
  animation: panel-in 240ms ease-out;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Bereichsfarben (Panel-Akzente je Tab) ----------------------------- */

#localTabPanel .panel-head::before { background: linear-gradient(180deg, #2dd4bf, #0d9488); }
#onlineTabPanel .panel-head::before { background: linear-gradient(180deg, #77a8ff, #2f66d6); }
#tournamentsTabPanel .panel-head::before { background: linear-gradient(180deg, #ffd166, #d9a72f); }
#loadoutTabPanel .panel-head::before { background: linear-gradient(180deg, #c4b0fc, #8b5cf6); }
#shopTabPanel .panel-head::before { background: linear-gradient(180deg, #fdba74, #ea7c1f); }
#careerTabPanel .panel-head::before { background: linear-gradient(180deg, #fda4af, #f43f5e); }
#statsTabPanel .panel-head::before { background: linear-gradient(180deg, #7dd3fc, #0284c7); }
#accountTabPanel .panel-head::before { background: linear-gradient(180deg, #cbd5e1, #64748b); }

/* --- Turnier-Detail: Einblendung + Join-Feedback ----------------------- */

.tournament-detail {
  animation: panel-in 240ms ease-out;
}

.tournament-detail.flash-success {
  animation: flash-success 1100ms ease-out;
}

@keyframes flash-success {
  0% { box-shadow: 0 0 0 0 rgba(53, 209, 124, 0); border-color: rgba(53, 209, 124, 0.75); }
  25% { box-shadow: 0 0 0 5px rgba(53, 209, 124, 0.22); border-color: rgba(53, 209, 124, 0.75); }
  100% { box-shadow: 0 0 0 0 rgba(53, 209, 124, 0); }
}

/* --- Turnier-Erstellung ----------------------------------------------- */

.create-name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tournament-size-picker .segment-button {
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

.format-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.format-button {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--bg-soft);
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.format-button strong {
  font-size: 0.88rem;
}

.format-button span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.format-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.format-button.is-selected {
  border-color: rgba(53, 209, 124, 0.55);
  background: linear-gradient(180deg, rgba(53, 209, 124, 0.16), rgba(53, 209, 124, 0.06));
  box-shadow: 0 4px 16px rgba(53, 209, 124, 0.12);
}

.format-button.is-selected span {
  color: #9fd8b6;
}

/* --- Turnier-Liste ---------------------------------------------------- */

.tournament-item {
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.tournament-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.tournament-item-running {
  border-color: rgba(53, 209, 124, 0.35);
}

.tournament-item-finished {
  opacity: 0.72;
}

.tournament-status-finished {
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--bg-soft);
}

.tournament-item-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.tournament-fill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.tournament-fill-track {
  flex: 1;
  max-width: 220px;
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
}

.tournament-fill-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffd166);
  transition: width 300ms ease;
}

.tournament-fill small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5d5d;
  box-shadow: 0 0 0 0 rgba(255, 93, 93, 0.5);
  animation: live-pulse-dot 1.4s ease-out infinite;
}

@keyframes live-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 93, 93, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(255, 93, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 93, 93, 0); }
}

.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 93, 93, 0.45);
  border-radius: 999px;
  background: rgba(255, 93, 93, 0.12);
  padding: 3px 10px;
  color: #ff9d9d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* --- Turnier-Detail: Live-Strip --------------------------------------- */

.tournament-live-strip {
  margin-bottom: 16px;
  border: 1px solid rgba(53, 209, 124, 0.3);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(53, 209, 124, 0.08), rgba(53, 209, 124, 0.02));
  padding: 14px 16px;
}

.live-strip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.live-strip-head strong {
  font-size: 0.92rem;
}

.live-strip-head small {
  color: var(--muted);
  font-size: 0.76rem;
}

.live-strip-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.live-strip-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--panel);
  padding: 11px 12px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.live-strip-card:hover {
  transform: translateY(-2px);
}

.live-strip-card.is-live {
  border-color: rgba(255, 93, 93, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 93, 93, 0.12), 0 6px 18px rgba(0, 0, 0, 0.2);
}

.live-strip-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-strip-card.is-live .live-strip-state {
  color: #ff9d9d;
}

.live-strip-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.live-strip-player strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}

.live-strip-card.is-live .live-strip-player strong {
  border-color: rgba(53, 209, 124, 0.4);
  color: #8ff0ba;
}

.live-strip-actions {
  margin-top: 2px;
}

.live-strip-actions .small-button {
  width: 100%;
}

/* --- Teilnehmer-Chips + Podium ---------------------------------------- */

.participant-chip-head {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.participant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-raised);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  animation: chip-in 220ms ease-out;
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.participant-chip.is-host {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold);
}

.participant-chip.is-me {
  border-color: rgba(53, 209, 124, 0.5);
  background: var(--accent-soft);
  color: #8ff0ba;
}

.participant-chip.is-free {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.tournament-podium {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.podium-slot {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 140px;
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-raised);
  padding: 14px 16px;
  text-align: center;
}

.podium-slot small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.podium-medal {
  font-size: 1.5rem;
}

.podium-first {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.04));
  box-shadow: 0 6px 22px rgba(255, 209, 102, 0.12);
}

.podium-first strong {
  color: var(--gold);
  font-size: 1.05rem;
}

/* --- Danger Button ----------------------------------------------------- */

.danger-button {
  min-height: 42px;
  border: 1px solid rgba(255, 107, 107, 0.45);
  border-radius: var(--radius-small);
  padding: 0 15px;
  color: #ff9d9d;
  background: var(--danger-soft);
  font-weight: 700;
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.danger-button:hover:not(:disabled) {
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.18);
  transform: translateY(-1px);
}

/* --- Bracket-Feinschliff ----------------------------------------------- */

.bracket-match-live {
  box-shadow: 0 0 0 1px rgba(53, 209, 124, 0.25), 0 6px 20px rgba(53, 209, 124, 0.1);
}

.bracket-match-status .live-dot {
  margin-right: 4px;
}

.bracket-player.is-me > span:first-child {
  color: #8ff0ba;
}

.bracket-score {
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bracket-score.is-live {
  color: #8ff0ba;
  font-weight: 800;
}

/* --- In-Game Live-Panel ------------------------------------------------ */

.live-tournament-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.live-match-switch {
  margin-top: 6px;
  width: 100%;
}

/* --- Goal Banner ------------------------------------------------------- */

.goal-banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 5;
  text-align: center;
  background: radial-gradient(60% 50% at 50% 50%, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 75%);
}

.goal-banner-kicker {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.55);
}

.goal-banner.is-red .goal-banner-kicker {
  background: linear-gradient(180deg, #ffffff 25%, #ffb3b3 60%, var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.goal-banner.is-blue .goal-banner-kicker {
  background: linear-gradient(180deg, #ffffff 25%, #bcd4ff 60%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.goal-banner-team {
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.6);
}

.goal-banner-sub {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.goal-banner.is-animating .goal-banner-kicker {
  animation: goal-slam 600ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.goal-banner.is-animating .goal-banner-team,
.goal-banner.is-animating .goal-banner-sub {
  animation: goal-rise 460ms 120ms ease-out backwards;
}

.goal-banner.is-final .goal-banner-kicker {
  letter-spacing: 0.16em;
}

@keyframes goal-slam {
  0% { opacity: 0; transform: scale(2.4); }
  55% { opacity: 1; transform: scale(0.94); }
  75% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes goal-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Canvas Shake + Score Pop ------------------------------------------ */

.canvas-wrap.is-shaking {
  animation: canvas-shake 550ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes canvas-shake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(3px, -1px); }
  30%, 50%, 70% { transform: translate(-4px, 2px); }
  40%, 60% { transform: translate(4px, -2px); }
  100% { transform: translate(0, 0); }
}

.score-team strong {
  transition: box-shadow 150ms ease;
}

.score-team strong.is-pop {
  animation: score-pop 700ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes score-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12); }
  100% { transform: scale(1); }
}

.red-score strong {
  background: linear-gradient(180deg, #ff7b7b, var(--red) 60%, #d63c3c);
  box-shadow: 0 3px 12px rgba(255, 93, 93, 0.3);
}

.blue-score strong {
  background: linear-gradient(180deg, #77a8ff, var(--blue) 60%, #2f66d6);
  box-shadow: 0 3px 12px rgba(79, 141, 255, 0.3);
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 860px) {
  .create-name-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .format-picker {
    grid-template-columns: 1fr;
  }
}
