/* ==========================================================================
   Fish ID Bingo — Demo Styles
   Desktop-first split-screen layout with dark ocean theme
   ========================================================================== */

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0a0a1a;
  --bg-dark: #0d1b2a;
  --bg-panel: #111b2e;
  --bg-card: #1a2a4a;
  --bg-tv: #050a12;
  --cyan: #0ff;
  --cyan-dim: rgba(0, 255, 255, 0.15);
  --green: #4f4;
  --red: #f44;
  --text: #eee;
  --text-dim: #8899aa;
  --text-muted: #556;
  --border: #234;
  --header-bg: #16213e;
  --nori-height: 80px;
  --header-height: 48px;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-stack);
  height: 100vh;
  overflow: hidden;
}

/* --- Screens --- */
.screen {
  display: none;
  flex-direction: column;
  height: 100vh;
}
.screen.active {
  display: flex;
}

/* ==========================================================================
   Mobile Fallback
   ========================================================================== */
.mobile-fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg-dark));
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.mobile-fallback-content {
  max-width: 320px;
}
.mobile-fallback-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.mobile-fallback h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--cyan);
}
.mobile-fallback p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 32px;
}

@media (max-width: 899px) {
  .mobile-fallback { display: flex; }
  .screen { display: none !important; }
  .tv-frame { display: none !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--cyan), #00a);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.3);
}
.btn-primary:active { transform: scale(0.96); }

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  color: var(--cyan);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: rgba(0, 255, 255, 0.08);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 12px;
  transition: color 0.2s;
}
.btn-text:hover {
  color: var(--text-dim);
}

/* ==========================================================================
   Intro Screen
   ========================================================================== */
.intro-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg-dark));
}
.intro-content {
  max-width: 480px;
  padding: 40px 24px;
}
.intro-icon {
  font-size: 72px;
  margin-bottom: 16px;
}
.intro-screen h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 8px;
}
.intro-screen h1 span { color: var(--cyan); }
.intro-screen .tagline {
  color: var(--text-dim);
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.4;
}
.intro-features {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 40px;
}
.intro-feature {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-num {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 44px;
  font-size: 32px;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 4px;
}
.intro-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 16px;
}

/* ==========================================================================
   TV Splash — Welcome screen during name entry
   ========================================================================== */
.tv-splash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  overflow: hidden;
}
.tv-splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #0a1830 0%, #050a12 70%);
}
.tv-splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.tv-splash-nori {
  font-size: 80px;
  margin-bottom: 16px;
  animation: splash-nori-bob 3s ease-in-out infinite;
}
@keyframes splash-nori-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
.tv-splash-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.tv-splash-title span { color: var(--cyan); }
.tv-splash-sub {
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.tv-splash-prompt {
  font-size: 14px;
  color: var(--cyan);
  opacity: 0.7;
  animation: splash-prompt-pulse 2.5s ease-in-out infinite;
}
@keyframes splash-prompt-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ==========================================================================
   Phone Join Form — Name entry inside the phone panel
   ========================================================================== */
.phone-join {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}
.phone-join-logo {
  font-size: 48px;
  margin-bottom: 8px;
}
.phone-join-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.phone-join-title span { color: var(--cyan); }
.phone-join-resort {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.phone-join-resort span {
  color: var(--cyan);
  font-weight: 700;
}
.phone-join-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.phone-join-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font-stack);
}
.phone-join-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}
.phone-join-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}
.phone-join-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  transition: transform 0.1s, box-shadow 0.2s, opacity 0.3s;
}
.phone-join-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.phone-join-hint {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 12px;
}

/* ==========================================================================
   Game Screen — Header
   ========================================================================== */
.game-screen {
  padding: 0;
  overflow: hidden;
}
.game-header {
  height: var(--header-height);
  background: var(--header-bg);
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}
.game-header .brand {
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 1px;
}
.game-header .round-info {
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   Game Screen — Main Split Layout
   ========================================================================== */
.game-main {
  display: flex;
  flex: 1;
  min-height: 0;
  height: calc(100vh - var(--header-height) - var(--nori-height));
  order: 2;
}

/* Panels */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
}
.panel-label {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 2;
}

/* --- LEFT: Bar TV Panel --- */
.panel-tv {
  flex: 1;
  background: var(--bg-tv);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.tv-frame {
  width: 96%;
  max-width: 680px;
  margin: 0 auto;
  background: #1a1a2e;
  border-radius: 18px;
  padding: 14px 14px 22px;
  box-shadow:
    0 0 0 3px #2a2a40,
    0 0 0 6px #111,
    0 8px 32px rgba(0, 0, 0, 0.6);
}
.tv-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #050a12;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.fish-display {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.fish-image-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.fish-image-container {
  position: absolute;
  inset: 0;
  background: #050a12;
}
.fish-image-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fish-placeholder {
  color: #334;
  font-size: 14px;
}
.fish-name {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 22px;
  color: #fff;
  font-weight: 800;
  padding: 10px 16px 20px;
  background: linear-gradient(rgba(0,0,0,0.7), transparent);
  transition: opacity 0.3s;
}
.fish-scientific {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  padding: 0 16px;
}
.fish-fact {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  padding: 20px 16px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

/* Fish Bingo Tumbler — shows during round intros */
.fish-tumbler {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse at center, #0a1830 0%, #050a12 100%);
  z-index: 4;
}
.fish-tumbler.active {
  display: flex;
}
.tumbler-cage {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid rgba(0, 255, 255, 0.2);
  position: relative;
  animation: tumbler-spin 3s linear infinite;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.05), inset 0 0 30px rgba(0, 255, 255, 0.03);
}
.tumbler-fish {
  position: absolute;
  font-size: 28px;
  top: 50%;
  left: 50%;
  --angle: calc(var(--i) * 45deg);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-70px) rotate(calc(-1 * var(--angle)));
  animation: tumbler-fish-bob 1.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.2s);
}
.tumbler-label {
  color: var(--cyan);
  font-size: 16px;
  font-weight: 700;
  margin-top: 24px;
  letter-spacing: 1px;
  animation: tumbler-label-pulse 2s ease-in-out infinite;
}
@keyframes tumbler-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes tumbler-fish-bob {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-70px) rotate(calc(-1 * var(--angle))); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-60px) rotate(calc(-1 * var(--angle))); }
}
@keyframes tumbler-label-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* Night Dive Overlay */
.nightdive-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  z-index: 3;
}
.nightdive-overlay.active {
  opacity: 1;
  /* JS sets mask-image / -webkit-mask-image for the circular reveal */
}

/* --- RIGHT: Player's Card Panel --- */
.panel-card {
  width: 380px;
  min-width: 340px;
  flex-shrink: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card-phone {
  width: 100%;
  max-width: 320px;
  background: var(--bg-panel);
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.card-phone-notch {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 12px auto 8px;
}

.card-area {
  padding: 8px 12px;
  flex: 1;
}

/* ==========================================================================
   5x5 Bingo Grid
   ========================================================================== */
.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.bingo-cell {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 6px 3px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
  word-break: break-word;
}
.bingo-cell:active { transform: scale(0.93); }

/* Cell States */
.bingo-cell.marked {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}
.bingo-cell.free {
  background: var(--cyan);
  color: var(--bg-deep);
  font-weight: 800;
  border-color: var(--cyan);
  font-size: 9px;
}
.bingo-cell.correct {
  border-color: var(--green);
  background: rgba(68, 255, 68, 0.15);
  color: var(--green);
}
.bingo-cell.incorrect {
  border-color: var(--red);
  background: rgba(255, 68, 68, 0.15);
  color: var(--red);
}
.bingo-cell.win-line {
  border-color: #ff3333;
  color: #ff3333;
  background: rgba(255, 51, 51, 0.2);
  animation: win-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes win-pulse {
  from { box-shadow: 0 0 8px rgba(255, 51, 51, 0.3); }
  to   { box-shadow: 0 0 20px rgba(255, 51, 51, 0.6); }
}

/* ==========================================================================
   Bingo Button
   ========================================================================== */
.bingo-btn-area {
  padding: 8px 12px 16px;
}
.bingo-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--cyan), #00f);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 4px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.3s;
}
.bingo-btn:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}
.bingo-btn:active:not(:disabled) { transform: scale(0.97); }
.bingo-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.bingo-btn.pulse {
  animation: bingo-pulse 1.2s ease-in-out infinite;
}

@keyframes bingo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 30px 8px rgba(0, 255, 255, 0.3); transform: scale(1.03); }
}

/* ==========================================================================
   Nori Bar
   ========================================================================== */
.nori-bar {
  height: var(--nori-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: linear-gradient(180deg, #0a1018, #0d1520);
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
  order: 1;
}
.nori-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3050, #0d2040);
  border: 2px solid rgba(0, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nori-emoji {
  font-size: 24px;
}
.nori-speech {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.nori-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.nori-text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.4;
}
.nori-text.nori-mode-narration { color: var(--text); }
.nori-text.nori-mode-color { color: var(--cyan); }
.nori-text.nori-mode-pitch { color: #F6C344; }

/* Free cell inner styling */
.free-label { font-size: 8px; font-weight: 800; letter-spacing: 1px; opacity: 0.7; }
.free-icon { font-size: 14px; }

/* ==========================================================================
   Verification Overlay
   ========================================================================== */
.verification-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 12px;
}
.verification-overlay.active { display: flex; }

.verification-inner {
  text-align: center;
}
.verification-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 12px;
}
.verification-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 280px;
  margin: 0 auto 12px;
}
.verification-cell {
  padding: 6px 3px;
  border-radius: 4px;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: all 0.4s;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  word-break: break-word;
}
.verification-result {
  font-size: 16px;
  margin-top: 8px;
  font-weight: 700;
}

/* ==========================================================================
   Winner / Bait Ball Overlay
   ========================================================================== */
.winner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  text-align: center;
}
.winner-overlay.active { display: flex; }

.baitball-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.winner-content {
  position: relative;
  z-index: 1;
}
.winner-text {
  font-size: 42px;
  font-weight: 900;
  color: var(--cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}
.winner-sub {
  font-size: 18px;
  font-weight: 800;
  color: #ff3333;
  text-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
}

/* ==========================================================================
   Intermission (inline hide/show)
   ========================================================================== */
.intermission-tv {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.intermission-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: #0ff;
  font-size: 20px;
  font-weight: 800;
  padding: 10px 0;
  letter-spacing: 1px;
  z-index: 2;
  background: linear-gradient(rgba(0,0,0,0.7), transparent);
}

/* Resort photo slideshow — fills entire TV screen */
.resort-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.slideshow-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}
.slideshow-image.fade-out {
  opacity: 0;
}
.slideshow-credit {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  text-align: left;
  line-height: 1.4;
  z-index: 1;
}
.slideshow-credit .credit-resort {
  color: #0ff;
  font-weight: 700;
  font-size: 11px;
}
.slideshow-credit .credit-site {
  color: rgba(255,255,255,0.6);
}
.slideshow-credit .credit-photo {
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* Network ticker */
.network-ticker {
  width: 100%;
  overflow: hidden;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  border-top: 1px solid rgba(0, 255, 255, 0.15);
  height: 28px;
  display: flex;
  align-items: center;
}
.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 180s linear infinite;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  gap: 32px;
  padding-left: 100%;
}
.ticker-content .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ticker-content .ticker-resort {
  color: #0ff;
  font-weight: 600;
}
.ticker-content .ticker-dot {
  color: rgba(255,255,255,0.3);
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   Phone Round Card — Light transition for round starts
   ========================================================================== */
.phone-round-card {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  z-index: 8;
  border-radius: 24px;
  background: rgba(5, 10, 20, 0.88);
  animation: phone-round-fade-in 0.4s ease-out;
}
.phone-round-card.active { display: flex; }
.phone-round-emoji {
  font-size: 40px;
  margin-bottom: 12px;
}
.phone-round-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 4px;
}
.phone-round-desc {
  font-size: 14px;
  color: var(--text-dim);
}
@keyframes phone-round-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Phone Freeze & Winner Overlays (mirror TV state)
   ========================================================================== */
.phone-freeze,
.phone-winner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  z-index: 10;
  border-radius: 24px;
}
.phone-freeze {
  background: rgba(5, 10, 20, 0.92);
}
.phone-freeze.active { display: flex; }
.phone-freeze-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}
.phone-freeze-sub {
  font-size: 13px;
  color: var(--text-dim);
}

.phone-winner {
  background: rgba(5, 10, 20, 0.95);
}
.phone-winner.active { display: flex; }
.phone-baitball-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  border-radius: 24px;
}
.phone-winner-content {
  position: relative;
  z-index: 1;
}
.phone-winner-text {
  font-size: 36px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
  margin-bottom: 8px;
}
.phone-winner-sub {
  font-size: 16px;
  font-weight: 700;
  color: #ff3333;
  text-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
}

/* ==========================================================================
   Round Transition Overlay
   ========================================================================== */
.round-transition {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 15;
  text-align: center;
  padding: 24px;
}
.round-transition.active { display: flex; }

.round-transition-inner {
  max-width: 380px;
}
.round-transition h2 {
  font-size: 28px;
  color: var(--cyan);
  margin-bottom: 8px;
  font-weight: 800;
}
.round-transition p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ==========================================================================
   Dev Timer (remove before launch)
   ========================================================================== */
.dev-timer {
  position: fixed;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #F6C344;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 9999;
  pointer-events: none;
}

/* ==========================================================================
   End Screen
   ========================================================================== */
.end-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg-dark));
}
.end-content {
  max-width: 560px;
  padding: 40px 24px;
}
.end-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.end-screen h2 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 800;
}
.end-pitch {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.6;
}
.end-pitch strong {
  color: var(--cyan);
}
.end-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: 40px;
}
.end-stat {
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--cyan);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes celebrate {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cell-flash-red {
  0% { background: rgba(255, 68, 68, 0.3); }
  100% { background: var(--bg-card); }
}
@keyframes cell-flash-green {
  0% { background: rgba(68, 255, 68, 0.3); }
  100% { background: rgba(68, 255, 68, 0.15); }
}

.fade-in { animation: fade-in 0.4s ease-out; }
.pulse { animation: pulse 1s infinite; }
.celebrate { animation: celebrate 0.5s ease-out; }
.cell-flash-red { animation: cell-flash-red 0.6s ease-out; }
.cell-flash-green { animation: cell-flash-green 0.6s ease-out; }

/* Fish image transitions */
.fish-display.fish-entering .fish-image-container {
  animation: fade-in 0.4s ease-out;
}
.fish-display.fish-entering .fish-name {
  animation: fade-in 0.4s ease-out 0.1s both;
}
.fish-display.fish-entering .fish-fact {
  animation: fade-in 0.4s ease-out 0.2s both;
}

/* ==========================================================================
   Responsive — Large Screens
   ========================================================================== */
@media (min-width: 1400px) {
  .panel-card {
    width: 420px;
  }
  .card-phone {
    max-width: 360px;
  }
  .fish-name { font-size: 32px; }
}

/* Medium desktop */
@media (min-width: 900px) and (max-width: 1100px) {
  .panel-card {
    width: 320px;
    min-width: 300px;
  }
  .card-phone {
    max-width: 280px;
  }
  .bingo-cell {
    font-size: 9px;
    padding: 4px 2px;
  }
  .fish-name { font-size: 24px; }
  .fish-fact { font-size: 13px; }
}
