@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   ILAAJ-E-LUDO - MEDICAL LUDO ARENA STYLESHEET
   Matching exact visuals of Ilaaj-e-Maat (chessomed.pages.dev)
   ========================================================================== */

:root {
  --font-bebas: 'Bebas Neue', sans-serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-teal: #008080;
  --color-teal-glow: #00b3b3;
  --color-lavender: #7e69ab;
  --color-coral: #ff4b4b;
  --color-coral-hover: #ff6b6b;
  --color-amber: #f49f0a;
  --color-mint: #1eae66;
  --color-slate: #565676;
  
  --card-dark: rgba(0, 0, 0, 0.25);
  --card-dark-hover: rgba(0, 0, 0, 0.5);
  --card-border: #000000;
  --panel-bg: rgba(24, 26, 31, 0.95);
  --dialog-bg: rgba(20, 24, 28, 0.96);
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);

  /* ─── Royale Landing System ─── */
  --rl-bg: #0a0a0a;
  --rl-red: #b71c1c;
  --rl-red-dark: #7f0000;
  --rl-white: #ffffff;
  --rl-muted: rgba(255,255,255,0.55);
  --rl-border: rgba(255,255,255,0.08);
  --rl-border-hover: rgba(255,255,255,0.22);
  --rl-mode-bg: rgba(10,10,10,0.72);
  --rl-font: 'Barlow Condensed', 'Bebas Neue', sans-serif;
}

/* ==========================================================================
   ROYALE LANDING PAGE — Cinematic 4-Quadrant Layout & Universal Music Hub
   ========================================================================== */

/* ── View override ─────────────────────────────────────── */
#view-landing.app-view.active-view {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #08080c;
  overflow: hidden;
  font-family: var(--rl-font);
  z-index: 5;
}

/* ── Crosshair dividers ─────────────────────────────────── */
.rl-divider-v {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}
.rl-divider-h {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}

/* ── Decorative corner accent ────────────────────────────── */
.rl-corner-accent {
  position: absolute;
  top: -64px; right: -64px;
  width: 128px; height: 128px;
  transform: rotate(45deg);
  border-right: 8px solid rgba(229, 57, 53, 0.35);
  z-index: 3;
  pointer-events: none;
}

/* ── Quadrant base ───────────────────────────────────────── */
.rl-quadrant {
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
}

/* TOP-LEFT */
.rl-quad-tl {
  top: 0; left: 0;
  width: 50%; height: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 36px 54px;
  z-index: 3;
}

.rl-tl-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* TOP-RIGHT */
.rl-quad-tr {
  top: 0; right: 0;
  width: 50%; height: 50%;
  padding: 24px 36px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 3;
}

/* BOTTOM-LEFT */
.rl-quad-bl {
  bottom: 0; left: 0;
  width: 50%; height: 50%;
  padding: 36px 54px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 3;
}

/* BOTTOM-RIGHT */
.rl-quad-br {
  bottom: 0; right: 0;
  width: 50%; height: 50%;
  padding: 20px 36px 28px 36px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 3;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes race-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes race-slide {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes music-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
@keyframes rl-scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.race-reveal { animation: race-reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.race-slide  { animation: race-slide 700ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both; }
.music-spin  { animation: music-spin 6s linear infinite; }

/* ── TOP-LEFT: Title Section ─────────────────────────────── */
.rl-live-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.rl-live-badge {
  background: var(--rl-red);
  color: #fff;
  font-family: var(--rl-font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  text-transform: uppercase;
}
.rl-series-label {
  font-family: var(--rl-font);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.rl-main-title {
  font-family: var(--rl-font);
  font-size: clamp(4.5rem, 8.5vw, 8rem);
  font-weight: 800;
  line-height: 0.82;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.rl-title-red {
  color: var(--rl-red);
  display: block;
}

.rl-tagline-block {
  max-width: 380px;
}
.rl-tagline-bar {
  width: 36px;
  height: 2px;
  background: var(--rl-red);
  margin-bottom: 12px;
}
.rl-tagline-text {
  font-family: var(--rl-font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  line-height: 1.5;
}

/* ── TOP-RIGHT: Live Preview Box (Video on Left + Buttons on Right) ── */
.rl-preview-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 12px 18px 18px 18px;
  box-sizing: border-box;
}

.rl-preview-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rl-live-indicator-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rl-live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rl-red);
  box-shadow: 0 0 10px var(--rl-red);
  animation: live-pulse 1.8s infinite;
}
.rl-preview-box-title {
  font-family: var(--rl-font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}
.btn-watch-demo-trigger {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-family: var(--rl-font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  padding: 0;
  margin-left: 10px;
}
.btn-watch-demo-trigger:hover {
  opacity: 0.85;
}
.rl-preview-box-counter {
  font-family: var(--rl-font);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
}

.rl-preview-box-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

/* Landscape Video Container with boundaries/margins */
.rl-landscape-video-container {
  flex: 1.1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.rl-landscape-video-frame {
  position: relative;
  width: 100%;
  height: 92%;
  max-height: 220px;
  aspect-ratio: 16 / 9;
  border: none;
  background: transparent;
  overflow: hidden;
}
.rl-preview-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rl-video-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(10, 10, 15, 0.5) 100%);
  pointer-events: none;
}
.rl-video-corner-accent {
  position: absolute;
  top: 0; right: 0;
  width: 18px; height: 18px;
  border-top: 2px solid var(--rl-red);
  border-right: 2px solid var(--rl-red);
  pointer-events: none;
}

/* Mode Nav Buttons on Right */
.rl-box-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 210px;
}

.rl-btn-start {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--rl-red);
  color: #fff;
  font-family: var(--rl-font);
  font-size: 1.35rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.35);
  margin-bottom: 4px;
}
.rl-btn-start:hover {
  background: #d32f2f;
  transform: translateX(-4px);
}
.rl-btn-start-arrow {
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}
.rl-btn-start:hover .rl-btn-start-arrow {
  transform: translateX(4px);
}
.rl-btn-start-shade {
  position: absolute;
  inset-y: 0; right: 0;
  width: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.rl-mode-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.rl-mode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 14, 18, 0.65);
  border: none;
  border-right: 4px solid transparent;
  color: #ffffff;
  font-family: var(--rl-font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.rl-mode-item:hover,
.rl-mode-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-right-color: var(--rl-red);
}
.rl-mode-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rl-mode-icon {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.rl-mode-item:hover .rl-mode-icon,
.rl-mode-item.active .rl-mode-icon {
  color: var(--rl-red);
}
.rl-mode-num {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
}

/* ── BOTTOM-LEFT: Clean Dark Area with Arena / Table Info ── */
.rl-bl-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.rl-bl-branding-wrap {
  display: flex;
  gap: 36px;
  border-left: 2px solid var(--rl-red);
  padding-left: 14px;
}
.rl-footer-tab {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rl-footer-tab-label {
  font-family: var(--rl-font);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.rl-footer-tab-value {
  font-family: var(--rl-font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
}

/* ── BOTTOM-RIGHT: Arena Universal Music Hub (Player + Search) ── */
.rl-music-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 14px 20px;
  box-sizing: border-box;
}

/* Search Bar at Top */
.rl-music-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.rl-music-search-svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
.rl-music-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: var(--rl-font);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 36px 8px 38px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.rl-music-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.rl-music-search-input:focus {
  border-color: var(--rl-red);
  background: rgba(255, 255, 255, 0.08);
}
.rl-btn-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.9rem;
}
.rl-btn-search-clear:hover { color: #fff; }

/* 2-Column Main Music Content */
.rl-music-content-grid {
  display: flex;
  gap: 22px;
  flex: 1;
  min-height: 0;
}

/* Left Column: Disc, Controls, Seek Bar, Volume Bar */
.rl-music-left-col {
  flex: 1.05;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

/* Vinyl + Meta */
.rl-music-now-playing-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.album-disc {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at center, #0b0b0f 0 14%, transparent 15% 100%),
    conic-gradient(from 35deg, var(--rl-red), rgba(255, 255, 255, 0.8), var(--rl-red), #0b0b0f, var(--rl-red));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}
.album-disc::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(11, 11, 15, 0.6);
}
.album-disc span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rl-red);
  box-shadow: 0 0 0 4px #0b0b0f;
  z-index: 1;
}

.rl-music-meta {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rl-music-badge {
  font-family: var(--rl-font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.rl-music-title {
  font-family: var(--rl-font);
  font-size: 1.45rem;
  font-weight: 800;
  font-style: italic;
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}
.rl-music-artist {
  font-family: var(--rl-font);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls row below disc */
.rl-music-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}
.rl-btn-ctrl {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border-radius: 6px;
  transition: color 0.2s, opacity 0.2s;
  opacity: 0.85;
}
.rl-btn-ctrl:hover {
  color: #ffffff;
  opacity: 1;
}
.rl-btn-play-red {
  width: 44px;
  height: 44px;
  border-radius: 40%;
  background: var(--rl-red);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.45);
  transition: transform 0.2s, background 0.2s;
}
.rl-btn-play-red:hover {
  background: #d32f2f;
  transform: scale(1.06);
}

/* Sliders */
.rl-music-slider-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rl-slider-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rl-slider-title {
  font-family: var(--rl-font);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.rl-slider-val {
  font-family: var(--rl-font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
}

.rl-slider-track-wrap {
  width: 100%;
}
.rl-custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  border-radius: 2px;
}
.rl-custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(229, 57, 53, 0.8);
  cursor: pointer;
  transition: transform 0.15s;
}
.rl-custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: var(--rl-red);
}

/* Right Column: Song List & Live Search */
.rl-music-right-col {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 16px;
}
.rl-track-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rl-track-list-title {
  font-family: var(--rl-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}
.rl-track-list-count {
  font-family: var(--rl-font);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--rl-red);
  letter-spacing: 0.1em;
}

.rl-track-list-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 4px;
  min-height: 0;
}
.rl-track-list-items::-webkit-scrollbar {
  width: 4px;
}
.rl-track-list-items::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.rl-track-list-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.rl-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rl-track-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.rl-track-item.active {
  background: rgba(229, 57, 53, 0.15);
  border-color: rgba(229, 57, 53, 0.4);
}
.rl-track-thumb {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.rl-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rl-track-name {
  font-family: var(--rl-font);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl-track-artist-text {
  font-family: var(--rl-font);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl-track-play-badge {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.rl-track-item:hover .rl-track-play-badge {
  color: var(--rl-red);
  transform: scale(1.15);
}

/* ── Mobile responsiveness ───────────────────────────────── */
@media (max-width: 900px) {
  .rl-quad-tl, .rl-quad-tr,
  .rl-quad-bl, .rl-quad-br {
    position: relative;
    width: 100%;
    height: auto;
  }
  #view-landing.app-view.active-view {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }
  .rl-divider-v, .rl-divider-h { display: none; }
  .rl-quad-tl { padding: 24px 20px 12px; }
  .rl-quad-tr { padding: 12px 20px; }
  .rl-quad-bl { padding: 12px 20px; }
  .rl-quad-br { padding: 12px 20px 32px; }
  .rl-preview-box-body { flex-direction: column; }
  .rl-landscape-video-container { width: 100%; }
  .rl-box-nav { width: 100%; }
  .rl-music-content-grid { flex-direction: column; }
  .rl-music-right-col { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-left: 0; padding-top: 12px; max-height: 180px; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Universal Hidden Utility */
.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background-color: #000000;
  color: var(--text-white);
  font-family: var(--font-sans);
  overflow: hidden;
}

@media (max-width: 768px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }
}

/* ==========================================================================
   SPORTS CAR RACING VIDEO BACKGROUND (Exact friend's website setup)
   ========================================================================== */
.video-background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #000000;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.15) brightness(1.05);
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  will-change: opacity, transform;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.bg-video.active-vid {
  opacity: 1;
}

/* ==========================================================================
   3D CINEMATIC LUDO PHOTO BACKGROUND (Active during in-game match only)
   ========================================================================== */
.cinema-3d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  perspective: 1000px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}

.cinema-3d-container.active-cinema {
  opacity: 1;
}

.cinema-slide-layer {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  transform: scale(1.0);
  pointer-events: none;
  filter: contrast(1.05) saturate(1.15) brightness(0.95);
}

.cinema-slide-layer.active-slide {
  opacity: 1;
}

/* Dynamic 3D Ken Burns Camera Motions */
.cinema-slide-layer.motion-zoom-in {
  animation: kenBurnsZoomIn3D 6s ease-out forwards;
}

.cinema-slide-layer.motion-zoom-out {
  animation: kenBurnsZoomOut3D 6s ease-out forwards;
}

.cinema-slide-layer.motion-pan-left {
  animation: kenBurnsPanLeft3D 6s ease-out forwards;
}

.cinema-slide-layer.motion-pan-right {
  animation: kenBurnsPanRight3D 6s ease-out forwards;
}

.cinema-slide-layer.motion-tilt-up {
  animation: kenBurnsTiltUp3D 6s ease-out forwards;
}

@keyframes kenBurnsZoomIn3D {
  0% {
    transform: scale(1.0) translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: scale(1.15) translate3d(-18px, -12px, 0) rotate(0.4deg);
  }
}

@keyframes kenBurnsZoomOut3D {
  0% {
    transform: scale(1.16) translate3d(14px, 10px, 0) rotate(-0.4deg);
  }
  100% {
    transform: scale(1.02) translate3d(-10px, -5px, 0) rotate(0.2deg);
  }
}

@keyframes kenBurnsPanLeft3D {
  0% {
    transform: scale(1.1) translate3d(30px, 0, 0) rotateY(1deg);
  }
  100% {
    transform: scale(1.15) translate3d(-30px, -10px, 0) rotateY(-0.8deg);
  }
}

@keyframes kenBurnsPanRight3D {
  0% {
    transform: scale(1.1) translate3d(-30px, 0, 0) rotateY(-1deg);
  }
  100% {
    transform: scale(1.15) translate3d(30px, -10px, 0) rotateY(0.8deg);
  }
}

@keyframes kenBurnsTiltUp3D {
  0% {
    transform: scale(1.06) translate3d(0, 18px, 0) rotateX(1.4deg);
  }
  100% {
    transform: scale(1.14) translate3d(0, -18px, 0) rotateX(-0.8deg);
  }
}

/* Lightened & Crisp Overlays so Background Video shines through with HD Clarity */
.cinema-vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.25) 75%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

.video-overlay-tint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
  z-index: 2;
}

.bg-pulse-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  transition: all 0.5s ease;
}

.bg-pulse-effect.pulsating {
  animation: pulseDark 4s ease-in-out infinite alternate;
}

@keyframes pulseDark {
  0% { background: rgba(0, 128, 128, 0.05); }
  50% { background: rgba(244, 159, 10, 0.08); }
  100% { background: rgba(224, 83, 83, 0.05); }
}

.bg-pulse-effect.ecgPulse {
  animation: ecgGlow 2s ease-in-out infinite;
}

@keyframes ecgGlow {
  0%, 100% { box-shadow: inset 0 0 50px rgba(0, 128, 128, 0.1); }
  15% { box-shadow: inset 0 0 100px rgba(0, 255, 200, 0.35); }
  30% { box-shadow: inset 0 0 60px rgba(0, 128, 128, 0.15); }
}

/* ==========================================================================
   VIEW ROUTING ARCHITECTURE
   ========================================================================== */
.app-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-view.active-view {
  display: flex;
  opacity: 1;
}

/* ==========================================================================
   LANDING PAGE (View 1 - Exact Layout of Photo 1)
   ========================================================================== */
#view-landing {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 16px 80px 16px;
  position: relative;
}

.landing-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1360px;
  z-index: 5;
  margin-top: -30px;
}

.landing-title-container {
  text-align: center;
  margin-bottom: 38px;
}

.main-title-bebas {
  font-family: var(--font-bebas);
  font-size: clamp(3.8rem, 8vw, 6.2rem);
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 128, 128, 0.45);
  line-height: 0.95;
}

.sub-title-tagline {
  font-family: var(--font-bebas);
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* 5 Action Cards Row */
.menu-cards-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 1280px;
  position: relative;
  z-index: 10;
}

.menu-card-stacked-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 3D Title Medical Emblem Badge */
.title-emblem-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px auto;
  background: radial-gradient(circle at 35% 35%, rgba(0, 255, 213, 0.25) 0%, rgba(0, 128, 128, 0.08) 100%);
  border: 1.5px solid rgba(0, 255, 213, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 255, 213, 0.4), inset 0 0 12px rgba(0, 255, 213, 0.2);
  animation: emblemPulse 3s ease-in-out infinite alternate;
}

.emblem-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(0, 255, 213, 0.8));
}

@keyframes emblemPulse {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 255, 213, 0.3); }
  100% { transform: scale(1.08); box-shadow: 0 0 35px rgba(0, 255, 213, 0.6); }
}

.menu-card-stacked-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.menu-card {
  position: relative;
  width: clamp(170px, 18vw, 220px);
  height: clamp(200px, 24vh, 240px);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 14px 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  color: #ffffff;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: 0.6s ease;
}

.menu-card:hover::before {
  left: 100%;
}

.menu-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-8px) scale(1.04);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 25px rgba(255, 255, 255, 0.25);
}

.menu-card:active {
  transform: translateY(-2px) scale(0.99);
}

.menu-card.highlighted-center {
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(192, 132, 252, 0.75);
  box-shadow: 0 14px 40px rgba(168, 85, 247, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.menu-card.highlighted-center:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(216, 180, 254, 1);
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.6), 0 0 30px rgba(192, 132, 252, 0.5);
}

/* Card Accent Themes */
.menu-card.card-emerald:hover { border-color: #34d399; box-shadow: 0 14px 40px rgba(16, 185, 129, 0.45); }
.menu-card.card-amber:hover { border-color: #fbbf24; box-shadow: 0 14px 40px rgba(245, 158, 11, 0.45); }
.menu-card.card-purple:hover { border-color: #c084fc; box-shadow: 0 14px 40px rgba(168, 85, 247, 0.45); }
.menu-card.card-cyan:hover { border-color: #22d3ee; box-shadow: 0 14px 40px rgba(6, 182, 212, 0.45); }
.menu-card.card-coral:hover { border-color: #fb7185; box-shadow: 0 14px 40px rgba(244, 63, 94, 0.45); }

/* Card Top Badge Pill */
.card-badge-pill {
  position: absolute;
  top: 10px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}

.pill-emerald { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.5); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.pill-amber { background: rgba(245, 158, 11, 0.25); color: #fde047; border: 1px solid rgba(251, 191, 36, 0.5); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.pill-purple { background: rgba(168, 85, 247, 0.25); color: #e9d5ff; border: 1px solid rgba(192, 132, 252, 0.5); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.pill-cyan { background: rgba(6, 182, 212, 0.25); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.5); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.pill-coral { background: rgba(244, 63, 94, 0.25); color: #fca5a5; border: 1px solid rgba(251, 113, 133, 0.5); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }

.card-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 12px;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bubble-emerald { background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.45) 0%, rgba(6, 78, 59, 0.7) 100%); border-color: rgba(110, 231, 183, 0.6); }
.bubble-amber { background: radial-gradient(circle at 35% 35%, rgba(245, 158, 11, 0.45) 0%, rgba(120, 53, 15, 0.7) 100%); border-color: rgba(253, 224, 71, 0.6); }
.bubble-purple { background: radial-gradient(circle at 35% 35%, rgba(168, 85, 247, 0.45) 0%, rgba(88, 28, 135, 0.7) 100%); border-color: rgba(233, 213, 255, 0.6); }
.bubble-cyan { background: radial-gradient(circle at 35% 35%, rgba(6, 182, 212, 0.45) 0%, rgba(22, 78, 99, 0.7) 100%); border-color: rgba(103, 232, 249, 0.6); }
.bubble-coral { background: radial-gradient(circle at 35% 35%, rgba(244, 63, 94, 0.45) 0%, rgba(136, 19, 55, 0.7) 100%); border-color: rgba(252, 165, 165, 0.6); }

.menu-card:hover .card-icon-bubble {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.card-svg-icon {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.card-title {
  font-family: var(--font-bebas);
  font-size: 1.45rem;
  letter-spacing: 1.2px;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.card-description {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Room Code Pill Input Under Card 3 */
.room-code-pill-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 4px 6px 4px 12px;
  width: clamp(170px, 18vw, 220px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.room-code-pill-input:hover,
.room-code-pill-input:focus-within {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.room-code-pill-input input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.room-code-pill-input input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-transform: none;
}

.btn-arrow-enter {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-arrow-enter:hover {
  color: var(--color-coral);
  transform: translateX(2px);
}

/* Quick Sound Toggle Button Under Options */
.btn-quick-sound {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-quick-sound:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-quick-sound.muted {
  color: #f87171;
}

/* Matchmaking Searching Card */
.matchmaking-status-card {
  position: absolute;
  bottom: 80px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.8px solid rgba(0, 255, 213, 0.6);
  border-radius: 16px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 255, 213, 0.3);
  animation: pulseCard 1.5s infinite alternate;
}

@keyframes pulseCard {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 128, 128, 0.3); }
  100% { transform: scale(1.02); box-shadow: 0 0 30px rgba(0, 200, 200, 0.6); }
}

.radar-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 128, 128, 0.3);
  border-top-color: #00ffd5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.matchmaking-text {
  display: flex;
  flex-direction: column;
}

.matchmaking-headline {
  font-family: var(--font-bebas);
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #ffffff;
}

.matchmaking-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* New inline matchmaking overlay bar (inside TR quadrant) */
.matchmaking-overlay-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 10, 14, 0.92);
  border-top: 1px solid rgba(229, 62, 62, 0.4);
  padding: 10px 18px;
  z-index: 10;
  animation: pulseCard 1.5s infinite alternate;
}
.matchmaking-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.matchmaking-radar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rl-red, #e53e3e);
  box-shadow: 0 0 10px var(--rl-red, #e53e3e);
  flex-shrink: 0;
  animation: live-pulse 0.9s infinite;
}
.matchmaking-bar-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.matchmaking-bar-headline {
  font-family: var(--rl-font, 'Barlow Condensed', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
}
.matchmaking-bar-sub {
  font-family: var(--rl-font, 'Barlow Condensed', sans-serif);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
}
.matchmaking-bar-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-family: var(--rl-font, 'Barlow Condensed', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.matchmaking-bar-cancel:hover {
  border-color: var(--rl-red, #e53e3e);
  color: var(--rl-red, #e53e3e);
}

/* Mobile Responsiveness for Landing Page */
@media (max-width: 992px) {
  .menu-cards-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .menu-card {
    width: min(90vw, 340px);
    height: auto;
    min-height: 100px;
    padding: 16px;
    flex-direction: row;
    text-align: left;
    gap: 16px;
  }
  .card-icon-bubble {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .menu-card-stacked-wrapper {
    width: min(90vw, 340px);
  }
  .room-code-pill-input {
    width: 100%;
  }
  .landing-content-wrapper {
    margin-top: 20px;
  }
}

/* ==========================================================================
   MODAL DIALOGS (Photo 2 Exact Recreation & Helpers)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-backdrop.hidden {
  display: none;
  opacity: 0;
}

.modal-card-dialog {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255,255,255,0.04);
  width: 90%;
  max-width: 440px;
  padding: 28px 28px 22px 28px;
  position: relative;
  animation: modalPop 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Photo 2 Avatar & Username Header */
.modal-avatar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.input-group-outlined {
  position: relative;
  flex-grow: 1;
}

.input-group-outlined label {
  position: absolute;
  top: -9px;
  left: 12px;
  background: #000000;
  padding: 0 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.input-group-outlined input {
  width: 100%;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-group-outlined input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Setting Rows */
.modal-form-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.custom-select-wrap select {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  width: 160px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.custom-select-wrap select:focus {
  border-color: rgba(255, 255, 255, 0.45);
}

/* Photo 2 Switch Toggle (Coral Red) */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #383d47;
  transition: 0.3s;
  border-radius: 24px;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-control input:checked + .slider-toggle {
  background-color: var(--color-coral);
}

.switch-control input:checked + .slider-toggle:before {
  transform: translateX(20px);
}

/* Master Mute Row */
.mute-control-row {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  border-radius: 2px;
}

.mute-label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-subtext {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.setting-subtext.muted {
  color: var(--color-coral);
}

/* New sleek pill-style mute toggle */
.btn-option-mute {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d92626;
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-option-mute:hover {
  background: #ff3b30;
  box-shadow: 0 0 12px rgba(217, 38, 38, 0.4);
  transform: none;
}

.btn-option-mute.muted {
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}

.btn-option-mute.muted:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  box-shadow: none;
}

.mute-icon {
  font-size: 0.9rem;
}

/* OKAY Button */
.modal-footer-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-coral-okay {
  background-color: #d92626;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  padding: 10px 28px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-coral-okay:hover {
  background-color: #ff3b30;
  box-shadow: 0 0 14px rgba(217, 38, 38, 0.45);
  transform: translateY(-1px);
}

.btn-secondary-sm {
  background: transparent;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 2px;
  padding: 7px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-sm:hover {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.75);
}

/* Dialog Titles */
.dialog-title-bebas {
  font-family: 'Barlow Condensed', 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.dialog-subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.38);
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* Play With Friend / Room Code Modal */
.modal-room-dialog {
  max-width: 480px;
  width: 92vw;
}

.room-modal-card-box {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease;
}

.room-modal-card-box:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.room-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.room-badge-pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  padding: 2px 8px;
  border-radius: 1px;
  border: 1px solid rgba(255,255,255,0.15);
}

.room-badge-pill.join-pill {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.12);
}

.room-box-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

.room-box-desc {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  margin-bottom: 12px;
  line-height: 1.4;
}

.code-big-badge {
  font-family: 'Barlow Condensed', 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 6px;
  color: #ffffff;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2px;
  padding: 10px 24px;
  margin-bottom: 10px;
  text-align: center;
}

.room-share-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.btn-full-width {
  width: 100%;
}

.room-divider-or {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0 12px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.room-divider-or::before,
.room-divider-or::after {
  content: "";
  flex: 1;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.room-divider-or span {
  padding: 0 12px;
  background: #000;
  color: rgba(255,255,255,0.25);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.room-join-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.room-code-input-box {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 4px;
  padding: 10px 12px;
  text-transform: uppercase;
  outline: none;
  transition: all 0.2s ease;
}

.room-code-input-box:focus {
  border-color: rgba(255,255,255,0.5);
  background: #0d0d0d;
}

.room-code-input-box::placeholder {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase;
}

.btn-join-room-action {
  background: #d92626;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-join-room-action:hover {
  background: #ff3b30;
  box-shadow: 0 0 14px rgba(217, 38, 38, 0.45);
  transform: translateY(-1px);
}

.dialog-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   PERSISTENT MUSIC DOCK & SEARCH BAR (White Glassmorphism Edition)
   ========================================================================== */
.music-floating-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(96vw, 1140px);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  border-radius: 20px;
  padding: 8px 16px;
  z-index: 1000;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 255, 213, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.45);
  transition: all 0.3s ease;
}

.music-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.music-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 6px 14px;
  width: clamp(200px, 26vw, 320px);
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.music-search-box:focus-within {
  border-color: #00ffd5;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 18px rgba(0, 255, 213, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.music-search-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
  color: #00ffd5;
  filter: drop-shadow(0 0 4px rgba(0, 255, 213, 0.6));
}

.search-svg-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.music-search-box:focus-within .search-svg-icon {
  transform: scale(1.18);
  color: #ffffff;
}

.music-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  width: 100%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.music-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.btn-music-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.btn-music-icon:hover {
  color: #ffffff;
}

.music-playback-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  justify-content: flex-end;
  min-width: 0;
}

.music-album-art-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.music-album-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-track-meta {
  display: flex;
  flex-direction: column;
  max-width: 160px;
  overflow: hidden;
  flex-shrink: 1;
}

.track-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.track-artist {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Transport Controls */
.music-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-music-ctrl {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.btn-music-ctrl:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #00ffd5;
  transform: scale(1.08);
}

.btn-play-main {
  background: radial-gradient(circle at 35% 35%, #00ffd5 0%, #00a896 100%);
  color: #0b111e;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 0 14px rgba(0, 255, 213, 0.6);
  font-weight: bold;
}

.btn-play-main:hover {
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(0, 255, 213, 0.9);
  background: radial-gradient(circle at 35% 35%, #50ffe3 0%, #00c9b4 100%);
  color: #0b111e;
}

/* Timeline & Scrubber Slider */
.music-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(120px, 16vw, 180px);
}

.time-label {
  font-size: 0.68rem;
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.85);
  min-width: 26px;
  font-weight: 500;
}

.slider-track-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.music-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.music-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
}

.music-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #00ffd5 60%, #009988 100%);
  border: 1.5px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 255, 213, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-slider:hover::-webkit-slider-thumb {
  transform: scale(1.25);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 255, 213, 1);
}

.music-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 213, 1);
}

.music-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 85px;
}

.vol-slider {
  width: 55px;
}

/* 3D YouTube Pill Badge */
.btn-yt-badge-3d {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(185, 28, 28, 0.6) 100%);
  border: 1.2px solid rgba(252, 165, 165, 0.6);
  color: #ffffff;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-yt-badge-3d:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.7) 0%, rgba(185, 28, 28, 0.85) 100%);
  border-color: #ffffff;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.7);
}

.yt-badge-svg {
  width: 14px;
  height: 14px;
  color: #ffffff;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.8));
}

/* Search Dropdown Popover */
.music-search-results {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: min(96vw, 440px);
  max-height: 380px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: all 0.2s ease;
}

.music-search-results.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.btn-text-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn-text-close:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  transform: none;
}

.results-list {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.result-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.result-art {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.result-meta {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.result-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-artist {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-play-icon {
  color: var(--color-teal-glow);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .music-progress-wrap,
  .music-volume-wrap,
  .btn-yt-badge {
    display: none;
  }
  .music-bar-inner {
    justify-content: space-between;
  }
}

/* ==========================================================================
   GAME ARENA (View 2 - Exact Recreation of Photo 3)
   ========================================================================== */
#view-game {
  background-color: transparent;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* Top Navigation Bar */
.game-top-bar {
  width: 100%;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.btn-back-menu {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-bebas);
  font-size: 1.15rem;
  letter-spacing: 1.2px;
  padding: 6px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-back-menu:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateX(-3px);
}

/* Quick Doctor Count Switcher in Header */
.player-count-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 3px 8px;
}

.switcher-label {
  font-family: var(--font-bebas);
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-right: 2px;
}

.btn-pcount {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-bebas);
  font-size: 1.05rem;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pcount:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-pcount.active {
  background: var(--color-coral);
  color: #ffffff;
  border-color: var(--color-coral);
  box-shadow: 0 0 10px rgba(255, 75, 75, 0.5);
}

/* Pass & Play Setup Modal Chips */
.pass-player-selector-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.chip-count-btn {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  color: rgba(255,255,255,0.7);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chip-count-btn:hover {
  background: #111;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.chip-count-btn.active {
  background: #fff;
  border-color: #fff;
  color: #000;
  font-weight: 800;
}

.roster-preview-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 18px;
}

.roster-preview-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3.5px solid;
  font-size: 0.78rem;
}

.game-top-mode-badge {
  font-family: var(--font-bebas);
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.85);
}

.btn-icon-top {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-top:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Game Arena Grid Workspace */
.game-arena-grid {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1320px;
  height: calc(100vh - 120px);
  padding: 18px 24px 70px 16px;
}

/* Left Column: Canvas Board */
.arena-board-column {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 12px;
  margin-left: 8px;
}

.board-canvas-card {
  position: relative;
  width: min(78vh, 620px);
  height: min(78vh, 620px);
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 35% 25%, #1e2634 0%, #10141d 75%, #0a0d13 100%);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.95), 
    0 0 40px rgba(0, 255, 213, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 0.25),
    inset 0 -3px 8px rgba(0, 0, 0, 0.85);
  border: 2.5px solid rgba(255, 255, 255, 0.14);
}

#ludo-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Center Gear Icon (Photo 3) */
.arena-gear-separator {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-center-gear {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-center-gear:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(45deg);
}

/* Right Column: Control Card (Photo 3 Dark Card) */
.arena-control-column {
  width: clamp(320px, 28vw, 400px);
  height: min(78vh, 620px);
  flex-shrink: 0;
}

.control-panel-card {
  background: #090a0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  height: 100%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-sizing: border-box;
}

/* Step Navigation (|< < > >|) */
.history-step-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-step-arrow {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-bebas);
  font-size: 1.25rem;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-step-arrow:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Active Doctor Turn Banner */
.active-turn-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}

.turn-doctor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 20px;
  font-family: var(--font-bebas);
  font-size: 1.35rem;
  letter-spacing: 1.2px;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.btn-turn-rename-trigger {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s ease;
  padding: 0;
  margin-left: 4px;
  vertical-align: middle;
}

.btn-turn-rename-trigger:hover {
  background: rgba(255, 255, 255, 0.38);
  transform: scale(1.12);
}

.turn-rename-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.turn-rename-input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: bold;
  padding: 2px 10px;
  outline: none;
  max-width: 150px;
  letter-spacing: 1px;
}

.turn-rename-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.turn-doctor-status {
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 500;
}

/* 3D Dice Roller Station */
.dice-action-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dice-box-wrapper {
  width: 52px;
  height: 52px;
  perspective: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto;
}

.dice-cube {
  position: relative;
  width: 44px;
  height: 44px;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  animation: diceIdle3DRotate 14s infinite linear;
}

@keyframes diceIdle3DRotate {
  0% { transform: rotateX(15deg) rotateY(0deg) rotateZ(5deg); }
  50% { transform: rotateX(-15deg) rotateY(180deg) rotateZ(-5deg); }
  100% { transform: rotateX(15deg) rotateY(360deg) rotateZ(5deg); }
}

.dice-cube[class*="rolling-"] {
  animation: none;
}

.dice-cube:hover:not(.rolling) {
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.5));
}

/* 6 Faces of the 3D Cube */
.dice-face {
  position: absolute;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
  box-sizing: border-box;
}

.dice-face.face-1 { transform: rotateY(0deg) translateZ(22px); }
.dice-face.face-2 { transform: rotateY(90deg) translateZ(22px); }
.dice-face.face-3 { transform: rotateX(90deg) translateZ(22px); }
.dice-face.face-4 { transform: rotateX(-90deg) translateZ(22px); }
.dice-face.face-5 { transform: rotateY(-90deg) translateZ(22px); }
.dice-face.face-6 { transform: rotateY(180deg) translateZ(22px); }

/* Realistic 3D Indented Pips */
.dice-face .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e293b, #020617);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.85), 0 1px 1px rgba(255, 255, 255, 0.7);
  align-self: center;
  justify-self: center;
}

/* Face 1: Medical Ruby Center Pip */
.dice-face.face-1 .pip:nth-child(1) {
  grid-column: 2;
  grid-row: 2;
  width: 13px;
  height: 13px;
  background: radial-gradient(circle at 35% 35%, #ff4b4b, #991b1b);
  box-shadow: 0 0 8px rgba(255, 75, 75, 0.7), inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Face 2 */
.dice-face.face-2 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face.face-2 .pip:nth-child(2) { grid-column: 3; grid-row: 3; }

/* Face 3 */
.dice-face.face-3 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face.face-3 .pip:nth-child(2) { grid-column: 2; grid-row: 2; }
.dice-face.face-3 .pip:nth-child(3) { grid-column: 3; grid-row: 3; }

/* Face 4 */
.dice-face.face-4 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face.face-4 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-face.face-4 .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-face.face-4 .pip:nth-child(4) { grid-column: 3; grid-row: 3; }

/* Face 5 */
.dice-face.face-5 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face.face-5 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-face.face-5 .pip:nth-child(3) { grid-column: 2; grid-row: 2; }
.dice-face.face-5 .pip:nth-child(4) { grid-column: 1; grid-row: 3; }
.dice-face.face-5 .pip:nth-child(5) { grid-column: 3; grid-row: 3; }

/* Face 6 */
.dice-face.face-6 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-face.face-6 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-face.face-6 .pip:nth-child(3) { grid-column: 1; grid-row: 2; }
.dice-face.face-6 .pip:nth-child(4) { grid-column: 3; grid-row: 2; }
.dice-face.face-6 .pip:nth-child(5) { grid-column: 1; grid-row: 3; }
.dice-face.face-6 .pip:nth-child(6) { grid-column: 3; grid-row: 3; }

/* Resting 3D Cube Orientations */
.dice-cube.show-1 { transform: rotateX(0deg) rotateY(0deg); }
.dice-cube.show-2 { transform: rotateY(-90deg); }
.dice-cube.show-3 { transform: rotateX(-90deg); }
.dice-cube.show-4 { transform: rotateX(90deg); }
.dice-cube.show-5 { transform: rotateY(90deg); }
.dice-cube.show-6 { transform: rotateY(180deg); }

/* Multiple Different 3D Tumbling Animations */
.dice-cube.rolling-1 {
  animation: diceTumbleCorkscrew 0.85s cubic-bezier(0.2, 0.8, 0.25, 1.15) forwards;
}
.dice-cube.rolling-2 {
  animation: diceTumbleFlip 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.25) forwards;
}
.dice-cube.rolling-3 {
  animation: diceTumbleWobble 0.85s cubic-bezier(0.25, 1, 0.35, 1.2) forwards;
}
.dice-cube.rolling-4 {
  animation: diceTumbleBarrel 0.85s cubic-bezier(0.15, 0.9, 0.2, 1.1) forwards;
}

@keyframes diceTumbleCorkscrew {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.9); }
  30% { transform: rotateX(360deg) rotateY(270deg) rotateZ(90deg) scale(1.2) translateY(-14px); }
  60% { transform: rotateX(720deg) rotateY(540deg) rotateZ(180deg) scale(1.05) translateY(-4px); }
  85% { transform: rotateX(900deg) rotateY(810deg) rotateZ(270deg) scale(0.95); }
  100% { transform: rotateX(1080deg) rotateY(1080deg) rotateZ(360deg) scale(1); }
}

@keyframes diceTumbleFlip {
  0% { transform: rotateX(0deg) rotateY(0deg) scale(1); }
  25% { transform: rotateX(-360deg) rotateY(180deg) rotateZ(-45deg) scale(1.22) translateY(-18px); }
  55% { transform: rotateX(-720deg) rotateY(360deg) rotateZ(-90deg) scale(1.1) translateY(-6px); }
  80% { transform: rotateX(-900deg) rotateY(540deg) rotateZ(-45deg) scale(0.97); }
  100% { transform: rotateX(-1080deg) rotateY(720deg) rotateZ(0deg) scale(1); }
}

@keyframes diceTumbleWobble {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  20% { transform: rotateX(240deg) rotateY(-180deg) rotateZ(120deg) scale(1.18) translateY(-12px); }
  50% { transform: rotateX(480deg) rotateY(-450deg) rotateZ(240deg) scale(1.08) translateY(-8px); }
  75% { transform: rotateX(720deg) rotateY(-630deg) rotateZ(300deg) scale(0.96); }
  100% { transform: rotateX(900deg) rotateY(-720deg) rotateZ(360deg) scale(1); }
}

@keyframes diceTumbleBarrel {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  35% { transform: rotateX(180deg) rotateY(540deg) rotateZ(180deg) scale(1.24) translateY(-16px); }
  70% { transform: rotateX(360deg) rotateY(900deg) rotateZ(270deg) scale(1.04) translateY(-4px); }
  100% { transform: rotateX(540deg) rotateY(1260deg) rotateZ(360deg) scale(1); }
}

.btn-roll-prescription {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-family: var(--font-bebas);
  font-size: 1.15rem;
  letter-spacing: 1.5px;
  padding: 8px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.5);
  transition: all 0.2s ease;
}

.btn-roll-prescription:hover:not(:disabled) {
  background: linear-gradient(135deg, #ef4444 0%, #b71c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.7);
}

.btn-roll-prescription:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Roster Section */
.doctors-roster-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roster-header-title,
.log-header-title {
  font-family: var(--font-bebas);
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: #ffffff;
  font-weight: bold;
}

.roster-header-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doctors-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-height: 105px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.doctors-list::-webkit-scrollbar {
  display: none;
}

.doctor-pill-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  border-left: 3px solid #ffffff;
  transition: all 0.2s ease;
  position: relative;
  min-height: 38px;
}

.doctor-pill-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.doctor-pill-card.active {
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 10px rgba(0, 128, 128, 0.35);
  border-left-width: 4px;
}

.doctor-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 4px;
}

.doctor-name-group {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.doctor-display-name {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: all 0.2s ease;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85px;
}

.doctor-display-name:hover {
  border-bottom-color: currentColor;
  opacity: 0.9;
}

.btn-rename-pill {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0.5;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #fff;
  flex-shrink: 0;
}

.doctor-pill-card:hover .btn-rename-pill,
.doctor-pill-card.active .btn-rename-pill {
  opacity: 1;
}

.btn-rename-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.15);
}

/* Inline Edit Form in Card */
.doctor-rename-form {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.rename-input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.74rem;
  padding: 2px 5px;
  outline: none;
  transition: border-color 0.2s;
}

.rename-input:focus {
  border-color: #00cccc;
  box-shadow: 0 0 6px rgba(0, 204, 204, 0.4);
}

.btn-rename-save,
.btn-rename-cancel {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 2px 6px;
  cursor: pointer;
  color: #fff;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-rename-save {
  background: rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-weight: bold;
}
.btn-rename-save:hover {
  background: rgba(34, 197, 94, 0.55);
}

.btn-rename-cancel {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}
.btn-rename-cancel:hover {
  background: rgba(239, 68, 68, 0.45);
}

.doctor-token-stats {
  font-size: 0.67rem;
  color: #aaa;
  margin-top: 2px;
}

/* Event Log */
.event-log-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  min-height: 90px;
  max-height: 120px;
}

.log-entries-scroll {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  scrollbar-width: none; /* Firefox: completely hidden */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar completely on WebKit browsers */
.log-entries-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.log-entries-scroll:hover::-webkit-scrollbar-thumb,
.log-entries-scroll:focus-within::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
}

.log-entries-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-coral);
}

.log-entry {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.8);
}

.log-entry.system {
  color: var(--color-amber);
}

.log-entry.capture {
  color: var(--color-coral);
  font-weight: 600;
}

.log-entry.grad {
  color: #00ffd5;
  font-weight: 600;
}

/* Control Actions Row (Bottom 4 buttons) */
.control-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.btn-action-round {
  background: rgba(183, 28, 28, 0.25);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn-action-round:hover {
  background: #b71c1c;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

/* Responsiveness for Game Arena */
@media (max-width: 900px) {
  .game-arena-grid {
    flex-direction: column;
    height: auto;
    padding-bottom: 90px;
  }
  .board-canvas-card {
    width: min(92vw, 420px);
    height: min(92vw, 420px);
  }
  .arena-gear-separator {
    display: none;
  }
  .arena-control-column {
    width: min(92vw, 420px);
    height: auto;
  }
}

/* Victory Dialog */
.victory-dialog {
  text-align: center;
}

.victory-icon-trophy {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.victory-stats-card {
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.modal-yt-dialog {
  max-width: 600px;
}

.modal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yt-search-bar-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.yt-search-bar-row input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-sans);
}

.yt-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #ffffff;
  padding: 4px 10px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: var(--color-teal);
}

.yt-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
}

.yt-frame-wrapper iframe {
  width: 100%;
  height: 100%;
}

/* Dice-Only Focus View Styles (Ludo Board stays visible, right card becomes a small resizable square!) */
.dice-box-resize-handle {
  display: none;
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 105;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0.6) 60%, transparent 60%, transparent 70%, rgba(255, 255, 255, 0.6) 70%);
  border-radius: 0 0 12px 0;
}

#view-game.dice-only-active .arena-control-column {
  position: relative !important;
  width: 175px !important;
  height: 175px !important;
  min-width: 110px !important;
  min-height: 110px !important;
  max-width: 350px !important;
  max-height: 350px !important;
  flex-shrink: 0;
  margin-top: 12px;
  z-index: 99;
}

#view-game.dice-only-active .dice-box-resize-handle {
  display: block;
}

#view-game.dice-only-active .control-panel-card {
  width: 100% !important;
  height: 100% !important;
  padding: 8px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(220, 38, 38, 0.25) !important;
  box-sizing: border-box;
}

#view-game.dice-only-active .history-step-nav-bar,
#view-game.dice-only-active .btn-roll-prescription,
#view-game.dice-only-active .doctors-roster-section,
#view-game.dice-only-active .event-log-container,
#view-game.dice-only-active .control-actions-row {
  display: none !important;
}

#view-game.dice-only-active .active-turn-banner {
  padding: 0;
}

#view-game.dice-only-active .turn-doctor-badge {
  font-size: 1.05rem;
  padding: 3px 12px;
  margin-bottom: 2px;
}

#view-game.dice-only-active .turn-doctor-status {
  font-size: 0.7rem;
}

.btn-eye-close-mode {
  background: rgba(183, 28, 28, 0.25);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  padding: 0;
}

.btn-eye-close-mode:hover {
  background: #b71c1c;
  border-color: #ef4444;
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

/* 4 Corner Resize Handles for Video Window */
.win-resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 110;
}
.win-resize-handle.nw { top: 0; left: 0; cursor: nwse-resize; }
.win-resize-handle.ne { top: 0; right: 0; cursor: nesw-resize; }
.win-resize-handle.sw { bottom: 0; left: 0; cursor: nesw-resize; }
.win-resize-handle.se { bottom: 0; right: 0; cursor: nwse-resize; }

/* Embedded Video & Browser Focus Window Styles */
.video-focus-overlay {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 580px;
  height: 380px;
  min-width: 320px;
  min-height: 220px;
  max-width: 90vw;
  max-height: 85vh;
  background: #000000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.98), 0 0 0 1px #000000;
  resize: both;
  overflow: hidden;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: move;
  user-select: none;
  gap: 8px;
}

.video-win-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-win-nav {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-radius: 6px;
  width: 26px;
  height: 24px;
  font-size: 0.85rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-win-nav:hover {
  background: #b71c1c;
  border-color: #ef4444;
  color: #ffffff;
}

.video-focus-title {
  font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: none;
}
.custom-globe-icon,
.custom-tv-icon {
  height: 22px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  background: transparent !important;
  border: none !important;
}
.video-focus-subbar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  gap: 8px;
}

.video-input-sm {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 5px 10px;
  color: #ffffff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.video-input-sm:focus {
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.btn-video-load {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  border: 1px solid #ff5252;
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  padding: 5px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.8px;
  white-space: nowrap;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 12px rgba(183, 28, 28, 0.4);
}

.btn-video-load:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
}

.video-drag-handle {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.8px;
}

.btn-video-win-close {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ff6b6b;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-video-win-close:hover {
  background: #ef4444;
  color: #fff;
}

.video-focus-body {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}

.video-focus-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Jitsi Video Overlay Window */
.jitsi-video-overlay {
  position: fixed;
  top: 80px;
  right: 40px;
  width: 520px;
  height: 420px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  min-width: 340px;
  min-height: 280px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.jitsi-video-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.jitsi-live-dot {
  color: #22c55e;
  margin-right: 6px;
  font-size: 1.1rem;
  animation: pulse-live 1.5s infinite ease-in-out;
}

@keyframes pulse-live {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.jitsi-focus-body {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #090d16;
  position: relative;
}

/* ── BACKEND STATUS BAR (TOP-RIGHT ABOVE START MATCH) ── */
.backend-status-pill {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: 'Barlow Condensed', 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.backend-status-pill .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
}

.backend-status-pill.connected {
  background: #10b981 !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.backend-status-pill.disconnected {
  background: #dc2626 !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.backend-status-pill.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}
