/* ============================================================
   THEATER.CSS — Cinematic crunch-moment system
   When a dramatic play happens (trump cut, final trick, bid clinch,
   bust), the table briefly zooms in on the action and shows a label.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   THEATER ZOOM
   Body gets .theater-active during the moment.
   The trick area scales up; everything else dims + slight blur.
   ───────────────────────────────────────────────────────────── */
body.theater-active #table {
  filter: brightness(0.5) saturate(0.7);
  transition: filter 0.4s ease;
}
body.theater-active #scoreboard,
body.theater-active #round-info,
body.theater-active #trump-badge,
body.theater-active #game-back-btn,
body.theater-active #tweaks-btn {
  filter: brightness(0.35) blur(2px);
  transition: filter 0.4s ease;
}
body.theater-active #center-area {
  filter: brightness(1.4) contrast(1.05);
  transition: filter 0.4s ease;
  position: relative;
  z-index: 60;
}
body.theater-active #trick-cards {
  transform: scale(1.18);
  transition: transform 0.55s cubic-bezier(0.34,1.4,0.64,1);
  z-index: 60;
}
body.theater-active .pinfo {
  filter: brightness(0.45) blur(1.5px);
  transition: filter 0.4s ease;
}
body.theater-active .pinfo.theater-spotlight {
  filter: brightness(1.3) blur(0);
  transform: scale(1.06);
  z-index: 70;
  position: relative;
}

#table { transition: filter 0.5s ease; }
#trick-cards { transition: transform 0.5s cubic-bezier(0.34,1.4,0.64,1); }
.pinfo { transition: filter 0.5s ease, transform 0.25s; }
#scoreboard, #round-info, #trump-badge { transition: filter 0.5s ease; }

/* ─────────────────────────────────────────────────────────────
   THEATER LABEL — broadcast lower-third style
   ───────────────────────────────────────────────────────────── */
#theater-label {
  position: fixed;
  bottom: 24%;
  left: 50%;
  transform: translate(-50%, 30px);
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
}
#theater-label.show {
  animation: theaterLabelIn 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes theaterLabelIn {
  0%   { opacity: 0; transform: translate(-50%, 40px) scale(0.7); }
  18%  { opacity: 1; transform: translate(-50%, 0)    scale(1.05); }
  30%  { transform: translate(-50%, 0) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(1); }
}
.tl-eyebrow {
  font-family: var(--body-font);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  color: var(--ink-2);
  text-transform: uppercase;
  background: rgba(0,0,0,0.7);
  padding: 4px 14px 4px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
}
.tl-main {
  font-family: var(--editorial);
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
  text-transform: uppercase;
  background: rgba(0,0,0,0.78);
  padding: 8px 28px 10px;
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--neon-1);
  text-shadow: 0 4px 24px rgba(0,0,0,0.9);
}

/* Variant tints */
#theater-label.kind-trump .tl-main {
  border-left-color: var(--neon-1);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(var(--neon-1-rgb), 0.4), rgba(0,0,0,0.85) 60%);
  text-shadow: 0 0 24px rgba(var(--neon-1-rgb), 0.7), 0 4px 12px rgba(0,0,0,0.9);
}
#theater-label.kind-trump .tl-eyebrow { color: var(--neon-1); }

#theater-label.kind-final .tl-main {
  border-left-color: var(--accent-warm);
  color: var(--accent-warm);
  background:
    linear-gradient(90deg, rgba(var(--accent-warm-rgb), 0.3), rgba(0,0,0,0.85) 60%);
  text-shadow: 0 0 24px rgba(var(--accent-warm-rgb), 0.7);
}
#theater-label.kind-final .tl-eyebrow { color: var(--accent-warm); }

#theater-label.kind-clinch .tl-main {
  border-left-color: #28e08c;
  color: #28e08c;
  background:
    linear-gradient(90deg, rgba(40,224,140, 0.28), rgba(0,0,0,0.85) 60%);
  text-shadow: 0 0 24px rgba(40,224,140, 0.7);
}
#theater-label.kind-clinch .tl-eyebrow { color: #28e08c; }

#theater-label.kind-bust .tl-main {
  border-left-color: #ff4070;
  color: #ff4070;
  background:
    linear-gradient(90deg, rgba(255,64,112, 0.3), rgba(0,0,0,0.85) 60%);
  text-shadow: 0 0 24px rgba(255,64,112, 0.7);
}
#theater-label.kind-bust .tl-eyebrow { color: #ff4070; }

#theater-label.kind-showdown .tl-main {
  border-left-color: var(--neon-2);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(var(--neon-2-rgb), 0.35), rgba(0,0,0,0.85) 60%);
  text-shadow: 0 0 24px rgba(var(--neon-2-rgb), 0.7);
}
#theater-label.kind-showdown .tl-eyebrow { color: var(--neon-2); }

/* ─────────────────────────────────────────────────────────────
   ROUND-START DECK REVEAL
   Quick deck "snap" at the very start before cards deal.
   ───────────────────────────────────────────────────────────── */
#deck-reveal {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
#deck-reveal.show {
  animation: deckRevealFade 0.9s ease-out forwards;
}
@keyframes deckRevealFade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
.dr-deck {
  position: relative;
  width: 110px;
  height: 154px;
}
.dr-card {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,224,255, 0.06) 4px 5px),
    repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255,45,139, 0.06) 4px 5px),
    linear-gradient(160deg, #1a1130 0%, #0a0712 100%);
  border: 1.5px solid rgba(var(--accent-warm-rgb), 0.5);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.8),
    0 0 0 1px rgba(var(--neon-2-rgb), 0.2) inset,
    0 0 28px rgba(var(--neon-1-rgb), 0.3);
  transform: translateY(20px) scale(0.7);
  opacity: 0;
}
#deck-reveal.show .dr-card {
  animation: drCardSnap 0.85s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.dr-card:nth-child(1) { animation-delay: 0.00s; }
.dr-card:nth-child(2) { animation-delay: 0.05s; }
.dr-card:nth-child(3) { animation-delay: 0.10s; }
.dr-card:nth-child(4) { animation-delay: 0.15s; }
@keyframes drCardSnap {
  0%   { transform: translateY(40px) scale(0.5) rotate(-8deg); opacity: 0; }
  35%  { transform: translateY(0)    scale(1)   rotate(0); opacity: 1; }
  70%  { transform: translateY(-6px) scale(1.04) rotate(2deg); }
  100% { transform: translateY(-220px) scale(0.4) rotate(0); opacity: 0; }
}
.dr-card:nth-child(2) { transform: translateY(20px) scale(0.7) rotate(-3deg); }
.dr-card:nth-child(3) { transform: translateY(20px) scale(0.7) rotate(3deg); }
.dr-card:nth-child(4) { transform: translateY(20px) scale(0.7) rotate(-1deg); }
