@font-face {
  font-family: "Tesla";
  src: url("TESLA.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue-electric: #1b3de5;
  --blue-dark: #0a1555;
  --blue-deep: #060d2e;
  --violet: #7b2ff7;
  --magenta: #e0218a;
  --lime: #3ddc84;
  --cyan: #28c8e8;
  --white: #ffffff;
  --glass: rgba(0, 0, 0, 0.42);
  --glass-border: rgba(255, 255, 255, 0.14);
  --character-width: 450px;
  --character-height: 780px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: linear-gradient(
    160deg,
    var(--blue-electric) 0%,
    var(--blue-dark) 42%,
    var(--blue-deep) 100%
  );
  color: var(--white);
  position: relative;
}

/* Tesla easter egg */
.tesla-car {
  position: fixed;
  bottom: 12%;
  left: -320px;
  width: 280px;
  height: auto;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(40, 200, 232, 0.35))
    drop-shadow(0 0 24px rgba(123, 47, 247, 0.25));
  will-change: transform, left, opacity;
}

.tesla-car.is-driving-ltr {
  animation: teslaDriveLTR 7s linear forwards;
}

.tesla-car.is-driving-rtl {
  animation: teslaDriveRTL 7s linear forwards;
  transform: scaleX(-1);
}

@keyframes teslaDriveLTR {
  0% {
    left: -320px;
    opacity: 0;
  }
  8% {
    opacity: 0.32;
  }
  92% {
    opacity: 0.32;
  }
  100% {
    left: calc(100vw + 40px);
    opacity: 0;
  }
}

@keyframes teslaDriveRTL {
  0% {
    left: calc(100vw + 40px);
    opacity: 0;
    transform: scaleX(-1);
  }
  8% {
    opacity: 0.32;
    transform: scaleX(-1);
  }
  92% {
    opacity: 0.32;
    transform: scaleX(-1);
  }
  100% {
    left: -320px;
    opacity: 0;
    transform: scaleX(-1);
  }
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Backgrounds */
.pixel-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.12) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.table-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background:
    linear-gradient(
      90deg,
      transparent 49.5%,
      var(--white) 49.5%,
      var(--white) 50.5%,
      transparent 50.5%
    ),
    radial-gradient(
      circle at 50% 55%,
      transparent 100px,
      var(--white) 100px,
      var(--white) 102px,
      transparent 102px
    );
}

.pixel-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  opacity: 0.32;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
  width: 70px;
  height: 70px;
  background: var(--violet);
  top: 8%;
  left: 4%;
}
.shape-2 {
  width: 50px;
  height: 50px;
  background: var(--magenta);
  bottom: 22%;
  right: 6%;
  animation-delay: -2s;
}
.shape-3 {
  width: 38px;
  height: 38px;
  background: var(--cyan);
  top: 38%;
  right: 18%;
  animation-delay: -4s;
}
.shape-4 {
  width: 44px;
  height: 44px;
  background: var(--lime);
  bottom: 38%;
  left: 12%;
  animation-delay: -1s;
}
.shape-5 {
  width: 56px;
  height: 56px;
  background: var(--violet);
  top: 18%;
  right: 28%;
  animation-delay: -3s;
}

@keyframes floatShape {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(10px, -14px) rotate(4deg);
  }
}

/* Header */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.75rem 1.25rem 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.header-left {
  justify-self: start;
}
.header-center {
  justify-self: center;
  text-align: center;
}
.header-right {
  justify-self: end;
  text-align: right;
}

.tagline {
  font-family: "Courier New", monospace;
  font-size: clamp(0.55rem, 1vw, 0.72rem);
  letter-spacing: 0.1em;
  opacity: 0.9;
  white-space: nowrap;
}

.bracket-pink {
  color: var(--magenta);
}
.bracket {
  color: var(--white);
}
.chevron {
  color: var(--cyan);
  font-weight: bold;
}

.logo {
  font-size: clamp(1.6rem, 3.8vw, 2.8rem);
  letter-spacing: 0.05em;
  line-height: 1;
}

.logo-brand {
  font-family: "Tesla", sans-serif;
  text-shadow: 0 0 36px rgba(123, 47, 247, 0.55);
}

.subtitle {
  font-size: clamp(0.55rem, 1vw, 0.72rem);
  letter-spacing: 0.28em;
  margin-top: 0.2rem;
  color: var(--lime);
  font-weight: 700;
}

.live-badge {
  display: inline-block;
  background: var(--magenta);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.2rem;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.event-date {
  font-size: clamp(0.6rem, 1vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.15em;
}

.event-venue {
  font-family: "Courier New", monospace;
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-top: 0.1rem;
}

/* Arena layout */
.arena {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr minmax(180px, 220px);
  gap: 0.75rem;
  min-height: 0;
  padding: 0.5rem 0.75rem;
  align-items: center;
  justify-items: center;
}

/* Side panels */
.panel {
  position: relative;
  display: flex;
  min-height: 0;
  justify-self: stretch;
  width: 100%;
  animation: panelIn 0.7s ease-out both;
}

.panel-epitesla {
  animation-name: panelInLeft;
}
.panel-opponent {
  animation-name: panelInRight;
  animation-delay: 0.1s;
}

@keyframes panelInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panelInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.panel-accent {
  width: 4px;
  flex-shrink: 0;
}

.panel-accent.cyan {
  background: var(--cyan);
}
.panel-accent.lime {
  background: var(--lime);
}
.panel-accent.grey {
  background: #6b7280;
}

.panel-body {
  position: relative;
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: none;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  overflow: hidden;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.silhouette {
  -webkit-mask-image: url("tim_willy.png?v=2");
  mask-image: url("tim_willy.png?v=2");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: bottom center;
  mask-position: bottom center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45))
    drop-shadow(0 0 8px rgba(140, 150, 170, 0.3));
}

.silhouette-opponent {
  background-color: #5a5f6e;
}

.panel-body .player-image-wrap.panel-image-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 90%;
  z-index: 0;
  flex: none;
  pointer-events: none;
}

.panel-player-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  opacity: 0.4;
}

.panel-body .opponent-silhouette {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.panel-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.72) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.panel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

.panel:hover .panel-body {
  border-color: rgba(123, 47, 247, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.panel-top {
  flex-shrink: 0;
}

.role-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.3rem;
}

.role-badge.attack {
  background: var(--magenta);
}
.role-badge.defense {
  background: var(--cyan);
  color: var(--blue-deep);
}
.role-badge.unknown {
  background: #6b7280;
}

.panel-name {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
}

.panel-nick {
  font-size: 0.7rem;
  color: var(--cyan);
  font-style: italic;
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

.panel-desc {
  font-size: 0.62rem;
  line-height: 1.4;
  opacity: 0.82;
  flex-shrink: 0;
}

.skill-bars {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
}

.skill-bars li {
  display: grid;
  grid-template-columns: 52px 1fr 22px;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.skill-bars em {
  font-style: normal;
  font-weight: 800;
  color: var(--lime);
  text-align: right;
}

.bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bar .fill {
  height: 100%;
  transition: width 1.2s ease;
}

.bar .fill.magenta {
  background: var(--magenta);
}
.bar .fill.cyan {
  background: var(--cyan);
}
.bar .fill.lime {
  background: var(--lime);
}
.bar .fill.grey {
  background: #9ca3af;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  flex-shrink: 0;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-stats div {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.15rem;
}

.mini-stats strong {
  display: block;
  font-size: 0.85rem;
  color: var(--lime);
  line-height: 1.1;
}

.mini-stats span {
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
  text-transform: uppercase;
}

/* Center stage */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  justify-self: stretch;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.stage-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  letter-spacing: 0.2em;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  margin: 0 auto 0.4rem;
  width: fit-content;
  max-width: 100%;
}

.banner-label {
  color: var(--magenta);
}
.banner-divider {
  opacity: 0.3;
}

.match-row {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 0;
  gap: 1.5rem;
  width: 100%;
}

.camp {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  width: var(--character-width);
  height: var(--character-height);
  min-height: 0;
  z-index: 1;
  pointer-events: none;
}

.camp-epitesla {
  animation: campInLeft 0.9s ease-out both;
}

.camp-opponent {
  animation: campInRight 0.9s ease-out 0.1s both;
}

@keyframes campInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes campInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.camp-glow {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(123, 47, 247, 0.5) 0%,
    transparent 68%
  );
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}

.camp-glow.opponent-glow {
  background: radial-gradient(
    circle,
    rgba(107, 114, 128, 0.45) 0%,
    transparent 68%
  );
}

.camp-players {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  min-height: 0;
  width: 100%;
}

.opponent-players {
  position: relative;
  flex-direction: column;
  align-items: center;
  width: var(--character-width);
  height: var(--character-height);
}

.player {
  position: relative;
  flex: 0 0 var(--character-width);
  width: var(--character-width);
  height: var(--character-height);
}

.player-duo {
  width: 100%;
}

.player-image-wrap,
.opponent-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.panel-body .panel-player-img {
  width: 100%;
  height: 100%;
  filter: none;
}

.player-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.12))
    drop-shadow(0 0 44px rgba(123, 47, 247, 0.32));
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.player:hover .player-img {
  transform: scale(1.025);
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.18))
    drop-shadow(0 0 56px rgba(224, 33, 138, 0.35));
}

.opponent-silhouette {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.player-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 0.35rem 0.5rem 0.15rem;
  background: rgba(0, 0, 0, 0.55);
}

.player-label strong {
  display: block;
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  letter-spacing: 0.12em;
}

.player-label span {
  font-size: clamp(0.45rem, 0.8vw, 0.58rem);
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.opponent-label span {
  color: #9ca3af;
}

/* VS center + scoreboard */
.vs-center {
  position: relative;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 5;
  padding: 0 0.25rem;
  pointer-events: auto;
}

.scoreboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  padding: 0.65rem 0.55rem;
  min-width: clamp(110px, 12vw, 150px);
}

.score-camp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.score-name {
  font-size: clamp(0.45rem, 0.85vw, 0.58rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.score-camp[data-camp="a"] .score-name {
  color: var(--cyan);
}

.score-camp[data-camp="b"] .score-name {
  color: var(--lime);
}

.score-camp.score-epitesla .score-name {
  color: var(--lime);
  text-shadow: 0 0 12px rgba(61, 220, 132, 0.4);
}

.score-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.score-value {
  font-family: "Courier New", monospace;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  min-width: 2ch;
  text-align: center;
  line-height: 1;
}

.score-btn {
  position: relative;
  z-index: 6;
  pointer-events: auto;
  width: clamp(28px, 4vw, 36px);
  height: clamp(28px, 4vw, 36px);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.score-btn:hover {
  background: rgba(123, 47, 247, 0.35);
  border-color: var(--violet);
}

.score-btn:active {
  transform: scale(0.92);
}

.score-inc:hover {
  background: rgba(61, 220, 132, 0.3);
  border-color: var(--lime);
}

.score-dec:hover {
  background: rgba(224, 33, 138, 0.25);
  border-color: var(--magenta);
}

.match-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  width: 100%;
}

.timer-label {
  font-size: clamp(0.45rem, 0.85vw, 0.58rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--magenta);
}

.timer-display {
  font-family: "Courier New", monospace;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lime);
  line-height: 1;
  min-width: 5ch;
  text-align: center;
}

.timer-display.timer-ended {
  color: var(--magenta);
  animation: timerBlink 1s ease-in-out infinite;
}

@keyframes timerBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.timer-controls {
  display: flex;
  gap: 0.35rem;
  width: 100%;
}

.timer-btn {
  flex: 1;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: clamp(0.45rem, 0.8vw, 0.58rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
}

.timer-btn:hover {
  background: rgba(123, 47, 247, 0.35);
  border-color: var(--violet);
}

.timer-btn:active {
  transform: scale(0.96);
}

.timer-start.is-running {
  background: rgba(61, 220, 132, 0.25);
  border-color: var(--lime);
  color: var(--lime);
}

.timer-reset:hover {
  background: rgba(224, 33, 138, 0.25);
  border-color: var(--magenta);
}

.vs-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(56px, 7vw, 80px);
  height: clamp(56px, 7vw, 80px);
}

.vs-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--lime);
  border-radius: 50%;
  animation: vsPulse 2.5s ease-in-out infinite;
}

.vs-text {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 900;
  color: var(--white);
  text-shadow:
    0 0 10px var(--lime),
    0 0 24px var(--magenta);
  animation: vsGlow 2.5s ease-in-out infinite;
}

@keyframes vsPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.8;
  }
}

@keyframes vsGlow {
  0%,
  100% {
    text-shadow:
      0 0 10px var(--lime),
      0 0 24px var(--magenta);
  }
  50% {
    text-shadow:
      0 0 18px var(--lime),
      0 0 40px var(--magenta);
  }
}

/* Stats strip */
.stats-strip {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  padding: 0.35rem 0.75rem 0.45rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.strip-bg-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 0;
  pointer-events: none;
}

.strip-bg {
  height: 130%;
  width: 22%;
  min-width: 120px;
  opacity: 0.32;
}

.strip-bg-photo {
  object-fit: contain;
  object-position: bottom;
  width: auto;
  max-width: 22%;
}

.strip-bg-epitesla {
  margin-left: 2%;
  align-self: flex-end;
}

.strip-bg-opponent {
  margin-right: 2%;
  align-self: flex-end;
  opacity: 0.4;
}

.strip-inner {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.strip-inner::before {
  content: "";
  position: absolute;
  inset: -0.35rem -0.75rem;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.strip-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto 0.35rem;
  width: 100%;
}

.strip-header h3 {
  font-size: clamp(0.55rem, 1vw, 0.7rem);
  letter-spacing: 0.22em;
  font-weight: 800;
  white-space: nowrap;
  color: var(--lime);
}

.accent-bar {
  flex: 1;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--violet),
    var(--magenta),
    var(--cyan)
  );
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  width: 100%;
}

.chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.45rem;
  text-align: center;
  transition:
    border-color 0.25s,
    transform 0.25s;
}

.chip:hover {
  border-color: rgba(61, 220, 132, 0.45);
  transform: translateY(-2px);
}

.chip-label {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 0.45rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 0.1rem;
}

.chip-val {
  display: block;
  font-size: clamp(0.55rem, 0.95vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* Footer */
.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding: 0.45rem 1rem 0.55rem;
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  letter-spacing: 0.12em;
  background: rgba(0, 0, 0, 0.35);
}

.team-badge {
  background: var(--magenta);
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.14em;
}

.footer-sep {
  opacity: 0.35;
}

.footer-tag {
  font-family: "Courier New", monospace;
  opacity: 0.75;
}

.footer-link,
.back-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.14em;
  transition: color 0.2s;
}

.footer-link:hover,
.back-link:hover {
  color: var(--lime);
}

/* Match menu */
.page-menu {
  grid-template-rows: auto 1fr auto;
}

.match-menu {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 1.25rem 0.75rem;
  min-height: 0;
}

.menu-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.menu-intro h2 {
  font-size: clamp(0.7rem, 1.4vw, 0.9rem);
  letter-spacing: 0.28em;
  font-weight: 800;
}

.menu-intro-spaced {
  margin-top: 1rem;
}

.menu-hint {
  text-align: center;
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.teams-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  max-width: 900px;
  margin: 0 auto 0.5rem;
  padding: 0 0.25rem;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: clamp(0.55rem, 1vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 2px;
}

.team-chip-epitesla {
  background: rgba(61, 220, 132, 0.15);
  border-color: var(--lime);
  color: var(--lime);
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 0.5rem;
}

.match-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 0.2rem 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.match-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(40, 200, 232, 0.18);
}

.match-card-num {
  font-size: clamp(0.5rem, 0.85vw, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--magenta);
}

.match-card-time {
  font-family: "Courier New", monospace;
  font-size: clamp(0.55rem, 0.9vw, 0.68rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.match-card-teams {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.match-card-team {
  font-size: clamp(0.55rem, 1vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card-team.epitesla-team {
  color: var(--lime);
}

.match-card-vs {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  opacity: 0.5;
  flex-shrink: 0;
}

.match-card-score {
  font-family: "Courier New", monospace;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.match-card-badge {
  justify-self: end;
  align-self: center;
  font-size: 0.42rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--lime);
  color: var(--blue-deep);
  padding: 0.1rem 0.35rem;
}

/* Responsive — no scroll */
@media (max-width: 960px) {
  .header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
  }

  .header-left,
  .header-right {
    justify-self: center;
    text-align: center;
  }

  .header-left .tagline {
    font-size: 0.5rem;
  }

  .arena {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
  }

  .panel {
    flex-direction: row;
  }

  .panel-epitesla {
    order: 2;
  }
  .stage {
    order: 1;
  }
  .panel-opponent {
    order: 3;
  }

  .match-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .vs-center {
    order: 2;
  }

  .camp-epitesla {
    order: 1;
    width: var(--character-width);
  }

  .camp-opponent {
    order: 3;
    width: var(--character-width);
  }

  .scoreboard {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    min-width: unset;
    width: 100%;
  }

  .vs-block {
    order: 0;
    width: 100%;
    height: 48px;
  }

  .vs-ring {
    width: 48px;
    height: 48px;
    left: 50%;
    transform: translateX(-50%);
  }

  .panel-body {
    border-left: 1px solid var(--glass-border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.45rem 0.6rem;
  }

  .panel-top,
  .panel-desc {
    flex: 0 0 auto;
  }

  .skill-bars {
    flex: 1 1 180px;
    min-width: 160px;
  }

  .mini-stats {
    flex: 0 0 auto;
    border-top: none;
    padding-top: 0;
  }

  .strip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .stage-banner span:not(.banner-label) {
    display: none;
  }
  .stage-banner .banner-divider {
    display: none;
  }

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

  .panel-body {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-height: 700px) {
  .header {
    padding: 0.4rem 0.75rem 0.3rem;
  }
  .tagline {
    display: none;
  }
  .panel-desc {
    display: none;
  }
  .stats-strip {
    padding: 0.25rem 0.5rem 0.35rem;
  }
}
