.screen[data-screen="play"] {
  padding: 0;
  flex-direction: column;
}

.screen[data-screen="play"].active {
  display: flex;
}
body[data-screen="play"] .topbar { display: none; }

/* Team Header */
.team-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.header-left, .header-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.team-header .label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.combo-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #F59E0B;
}

.timer-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #38BDF8;
}

.battery-outer {
  position: relative;
  width: clamp(140px, 28vmin, 240px);
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.battery-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38BDF8, #A855F7, #22C55E);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

.battery-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Arena */
.arena {
  position: absolute;
  inset: 68px 0 0 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.player-matrix {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  touch-action: manipulation;
}

.player-matrix.p1 {
  background: radial-gradient(circle at 40% 50%, rgba(56, 189, 248, 0.12), transparent 70%);
  border-right: 1px solid var(--line);
}
.player-matrix.p2 {
  background: radial-gradient(circle at 60% 50%, rgba(236, 72, 153, 0.12), transparent 70%);
  border-left: 1px solid var(--line);
}

.matrix-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.player-matrix.p1 .matrix-who { color: #38BDF8; }
.player-matrix.p2 .matrix-who { color: #EC4899; }
.matrix-who .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

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

.node-btn {
  width: clamp(75px, 15vmin, 120px);
  height: clamp(75px, 15vmin, 120px);
  border-radius: 24px;
  border: 2px solid var(--line);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .08s ease, border-color .15s ease, box-shadow .15s ease;
}

.node-btn .node-label {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vmin, 40px);
  font-weight: 900;
  color: var(--muted);
  pointer-events: none;
  transition: color .15s ease;
}

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

/* Active glowing node to tap */
.player-matrix.p1 .node-btn.active {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6), inset 0 0 15px rgba(56, 189, 248, 0.4);
  animation: pulseNode 0.6s infinite alternate ease-in-out;
}
.player-matrix.p1 .node-btn.active .node-label {
  color: #FFFFFF;
  text-shadow: 0 0 12px #38BDF8;
}

.player-matrix.p2 .node-btn.active {
  border-color: #EC4899;
  background: rgba(236, 72, 153, 0.25);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.6), inset 0 0 15px rgba(236, 72, 153, 0.4);
  animation: pulseNode 0.6s infinite alternate ease-in-out;
}
.player-matrix.p2 .node-btn.active .node-label {
  color: #FFFFFF;
  text-shadow: 0 0 12px #EC4899;
}

@keyframes pulseNode {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.06); }
}

/* Center Energy Conduit / Spark */
.energy-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 15;
}

.core-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.core-ring.energized {
  transform: scale(1.25);
  box-shadow: 0 0 40px #22C55E, 0 0 80px #38BDF8;
  border-color: #22C55E;
}

.core-spark {
  font-size: 32px;
  filter: drop-shadow(0 0 8px #FACC15);
}

.sync-banner {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #22C55E;
  letter-spacing: .08em;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #22C55E;
  opacity: 0;
  transform: translateY(10px);
  transition: all .2s ease;
}
.sync-banner.show {
  opacity: 1;
  transform: translateY(0);
}

@media (orientation: portrait) {
  .team-header {
    height: 56px;
    padding: 0 16px;
  }
  .arena {
    inset: 56px 0 0 0;
    flex-direction: column-reverse;
  }
  .player-matrix.p1 {
    border-right: none;
    border-top: 1px solid var(--line);
  }
  .player-matrix.p2 {
    border-left: none;
    border-bottom: 1px solid var(--line);
    transform: rotate(180deg);
  }
}
