/* ==========================================================================
   HELIANZ DENTAL TV QUEUE DISPLAY - STYLESHEET
   Optimized for 1080p / 4K Displays, Smart TVs, and Landscape Monitors
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #070D1B;
  --bg-surface: #0E172B;
  --bg-card: rgba(18, 29, 51, 0.78);
  --bg-card-hover: rgba(28, 44, 76, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);

  /* Accents */
  --cyan-primary: #06B6D4;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --teal-accent: #14B8A6;
  --emerald-success: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --amber-warning: #F59E0B;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --indigo-accent: #6366F1;
  --rose-accent: #F43F5E;

  /* Typography */
  --font-brand: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-pure: #FFFFFF;
  --text-heading: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #64748B;

  /* Shadows & Glass */
  --glass-blur: blur(16px);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.1);
  --shadow-glow-cyan: 0 0 35px rgba(6, 182, 212, 0.4);
  --shadow-glow-amber: 0 0 40px rgba(245, 158, 11, 0.45);
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-body);
  font-family: var(--font-sans);
  user-select: none;
}

/* Background Ambient Gradient */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: -10%;
  width: 55vw;
  height: 55vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

/* TV CONTAINER */
.tv-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ==========================================================================
   AUDIO UNLOCK BANNER (Smart TV Browsers Autoplay Handling)
   ========================================================================== */
.audio-unlock-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid var(--cyan-primary);
  border-radius: 14px;
  padding: 10px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--shadow-glow-cyan);
  backdrop-filter: var(--glass-blur);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { transform: translate(-50%, -100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-icon {
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
}

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

.banner-text strong {
  font-size: 0.95rem;
  color: var(--text-pure);
}

.banner-text span {
  font-size: 0.8rem;
  color: var(--text-body);
}

.btn-unlock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--teal-accent));
  color: #04101A;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-unlock:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

/* ==========================================================================
   TOP HEADER BAR (8vh)
   ========================================================================== */
.tv-header {
  height: 8.5vh;
  min-height: 60px;
  background: rgba(14, 23, 43, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2vw;
  z-index: 10;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(20, 184, 166, 0.3));
  border: 1px solid rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

.brand-text h1 {
  font-family: var(--font-brand);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-pure);
  line-height: 1.1;
  background: linear-gradient(90deg, #FFFFFF, #CFFAFE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.branch-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.18);
  color: var(--cyan-primary);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.clinic-select-dropdown {
  background: rgba(6, 182, 212, 0.18);
  color: var(--cyan-primary);
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.clinic-select-dropdown:hover, .clinic-select-dropdown:focus {
  background: rgba(6, 182, 212, 0.3);
  border-color: var(--cyan-primary);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.clinic-select-dropdown option {
  background: #0E172B;
  color: #FFFFFF;
}

.clinic-address {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 14px;
  border-radius: 20px;
}

.live-pulse {
  width: 9px;
  height: 9px;
  background-color: var(--emerald-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald-success);
  animation: pulseGreen 1.6s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-text {
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #6EE7B7;
}

.conn-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.conn-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.conn-status.online .dot {
  background: var(--emerald-success);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.clock-display {
  text-align: right;
}

.time-main {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 1px;
  line-height: 1;
}

.date-sub {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--cyan-primary);
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan-primary);
  color: var(--text-pure);
  transform: translateY(-2px);
}

.caller-btn {
  width: auto;
  padding: 0 12px;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  font-size: 0.78rem;
  font-weight: 600;
}

.caller-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: var(--indigo-accent);
  color: #FFFFFF;
}

/* ==========================================================================
   MAIN SPLIT SCREEN (84vh)
   ========================================================================== */
.tv-main {
  flex: 1;
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 1.2vw;
  padding: 1.2vw;
  overflow: hidden;
}

/* ==========================================================================
   LEFT SECTION: QUEUE DISPLAY
   ========================================================================== */
.queue-section {
  display: flex;
  flex-direction: column;
  gap: 1.1vw;
  height: 100%;
  overflow: hidden;
}

/* HERO CALLING CARD */
.hero-calling-card {
  position: relative;
  background: linear-gradient(135deg, rgba(14, 31, 58, 0.9), rgba(10, 20, 39, 0.95));
  border: 2px solid rgba(6, 182, 212, 0.6);
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(6, 182, 212, 0.2);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
  transition: all 0.4s ease;
}

.hero-calling-card.active-call-animation {
  border-color: var(--amber-warning);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.5), 0 0 100px rgba(245, 158, 11, 0.25);
  animation: pulseCardAmber 1.2s infinite alternate ease-in-out;
}

@keyframes pulseCardAmber {
  0% { transform: scale(1); }
  100% { transform: scale(1.012); }
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calling-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 4px 14px;
  border-radius: 20px;
}

.calling-badge .beacon {
  width: 10px;
  height: 10px;
  background: var(--amber-warning);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--amber-warning);
  animation: beaconPulse 1s infinite alternate;
}

@keyframes beaconPulse {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.calling-label-text {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #FDE68A;
}

/* Audio wave visualizer */
.audio-wave-anim {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.audio-wave-anim span {
  width: 4px;
  background: var(--amber-warning);
  border-radius: 2px;
  animation: waveBar 0.8s infinite ease-in-out;
}

.audio-wave-anim span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.audio-wave-anim span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.audio-wave-anim span:nth-child(3) { height: 22px; animation-delay: 0.3s; }
.audio-wave-anim span:nth-child(4) { height: 12px; animation-delay: 0.4s; }
.audio-wave-anim span:nth-child(5) { height: 8px; animation-delay: 0.5s; }

@keyframes waveBar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1.2); }
}

.hero-body {
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  gap: 20px;
}

.ticket-wrapper {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(15, 23, 42, 0.8));
  border: 2px solid rgba(6, 182, 212, 0.4);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.15);
}

.ticket-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cyan-primary);
  margin-bottom: 4px;
}

.ticket-number {
  font-family: var(--font-brand);
  font-size: 3.6rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.7);
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 14px;
}

.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box.room-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-success);
}

.icon-box.doctor-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
}

.detail-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-info .label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.detail-info .value {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-name {
  color: #E0F2FE !important;
}

.highlight-room {
  color: #6EE7B7 !important;
}

/* ==========================================================================
   DOCTOR ROOMS MATRIX
   ========================================================================== */
.rooms-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-primary);
}

.title-with-icon h2 {
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-heading);
}

.count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  padding: 2px 10px;
  border-radius: 12px;
}

.queue-badge {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--cyan-primary);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: var(--glass-blur);
  transition: all 0.25s ease;
}

.room-card.is-serving {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(18, 29, 51, 0.85));
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

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

.room-name {
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-pure);
}

.status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.status-pill.serving {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-pill.available {
  background: rgba(6, 182, 212, 0.15);
  color: #67E8F9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.room-doctor-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 4px 0;
}

.room-ticket-serving {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 4px 10px;
  margin-top: 4px;
}

.serving-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.serving-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-pure);
}

.serving-num.empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   UPCOMING TICKETS / WAITING LIST
   ========================================================================== */
.waiting-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.waiting-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.waiting-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  text-align: center;
  backdrop-filter: var(--glass-blur);
}

.waiting-mini-ticket {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cyan-primary);
}

.waiting-mini-patient {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.waiting-mini-room {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   RIGHT SECTION: MEDIA & VIDEO PLAYER (52% Width)
   ========================================================================== */
.media-section {
  display: flex;
  flex-direction: column;
  gap: 1.1vw;
  height: 100%;
  overflow: hidden;
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  flex: 1;
  min-height: 0;
}

.video-header {
  height: 44px;
  background: rgba(18, 29, 51, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.video-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.video-play-icon {
  color: var(--rose-accent);
  display: flex;
  align-items: center;
}

.video-title {
  font-family: var(--font-brand);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.meta-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-body);
  padding: 2px 8px;
  border-radius: 6px;
}

.btn-video-audio {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-video-audio:hover {
  background: rgba(6, 182, 212, 0.2);
  color: var(--text-pure);
}

/* Video Frame (16:9 Aspect Ratio) */
.video-player-frame {
  position: relative;
  width: 100%;
  flex: 1;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-container, .html5-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.video-hover-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 23, 43, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 6px 14px;
  backdrop-filter: var(--glass-blur);
  opacity: 0;
  transition: opacity 0.3s;
}

.video-player-frame:hover .video-hover-controls {
  opacity: 1;
}

.vid-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s;
}

.vid-ctrl-btn:hover {
  background: rgba(6, 182, 212, 0.3);
  transform: scale(1.1);
}

.vid-ctrl-btn.play-btn {
  background: var(--cyan-primary);
  color: #051824;
}

/* Playlist Bar */
.playlist-bar {
  background: rgba(18, 29, 51, 0.95);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.playlist-bar-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.playlist-thumbnails {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
}

.playlist-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.playlist-thumbnails::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.playlist-item-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-body);
  transition: all 0.2s;
}

.playlist-item-card:hover, .playlist-item-card.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan-primary);
  color: var(--text-pure);
}

/* ==========================================================================
   TIPS & HEALTH INFO CAROUSEL
   ========================================================================== */
.tips-carousel-card {
  background: linear-gradient(135deg, rgba(18, 29, 51, 0.8), rgba(14, 23, 43, 0.9));
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 14px 18px;
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-lg);
}

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

.tips-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-accent);
  font-family: var(--font-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.tips-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tips-indicators .indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all 0.3s;
}

.tips-indicators .indicator.active {
  width: 18px;
  border-radius: 10px;
  background: var(--teal-accent);
}

.tip-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tip-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tip-text-wrap h3 {
  font-family: var(--font-brand);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 3px;
}

.tip-text-wrap p {
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.35;
}

/* ==========================================================================
   RUNNING TICKER / MARQUEE FOOTER (8vh)
   ========================================================================== */
.tv-footer {
  height: 7.5vh;
  min-height: 50px;
  background: rgba(10, 17, 33, 0.95);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 10;
}

.marquee-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--teal-accent));
  color: #04101A;
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 0 20px;
  height: 100%;
  flex-shrink: 0;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.tag-pulse {
  width: 8px;
  height: 8px;
  background: #04101A;
  border-radius: 50%;
  animation: pulseDark 1.2s infinite;
}

@keyframes pulseDark {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.marquee-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.marquee-content {
  display: inline-block;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 600;
  color: #E2E8F0;
  letter-spacing: 0.5px;
  padding-left: 100%;
  animation: marqueeScroll 35s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   MODALS (Caller Remote & Settings)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: var(--glass-blur);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  width: 90vw;
  max-width: 950px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  background: rgba(18, 29, 51, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan-primary);
}

.modal-title h2 {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-pure);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: var(--text-pure);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 14px 24px;
  background: rgba(18, 29, 51, 0.9);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Caller Remote Specific */
.caller-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.control-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: rgba(10, 17, 33, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-pure);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.caller-action-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-primary-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--teal-accent));
  color: #04101A;
  font-family: var(--font-brand);
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
  transition: all 0.2s;
}

.btn-primary-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FDE68A;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-call:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: var(--amber-warning);
}

.btn-action-seat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #A7F3D0;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-seat:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: var(--emerald-success);
}

.btn-action-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #C7D2FE;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-done:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: var(--indigo-accent);
}

.manual-call-card {
  background: rgba(10, 17, 33, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
}

.manual-call-card h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.manual-inputs {
  display: grid;
  grid-template-columns: 140px 1fr 160px;
  gap: 10px;
}

.btn-manual-call {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--cyan-primary);
  color: var(--cyan-primary);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-manual-call:hover {
  background: var(--cyan-primary);
  color: #04101A;
}

.caller-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.caller-table-wrap h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
}

.caller-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.caller-table th, .caller-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.caller-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.caller-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.06);
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-card {
  background: rgba(10, 17, 33, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-card.full-width {
  grid-column: span 2;
}

.settings-card h3 {
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cyan-primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-body);
}

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

.form-range {
  width: 100%;
  accent-color: var(--cyan-primary);
}

.settings-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.settings-playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-remove-vid {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #FDA4AF;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}

.add-video-form h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 10px 0 6px 0;
}

.add-video-inputs {
  display: grid;
  grid-template-columns: 1fr 1.5fr 150px;
  gap: 8px;
}

/* ==========================================================================
   RESPONSIVE SCALING FOR 4K AND TABLETS
   ========================================================================== */
@media (min-width: 2560px) {
  html {
    font-size: 24px;
  }
}

@media (max-width: 1024px) {
  .tv-main {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}
