/* ==========================================================================
   PROPRESENTER SIMULATOR - BROADCAST LYRICS & PLAYOUT CONSOLE
   IP26 Live Broadcast & Multimedia Production Portal
   ========================================================================== */

:root {
  --pp-bg: var(--bg-primary, #121212);
  --pp-surface: var(--bg-surface, #1f1f1f);
  --pp-panel: var(--bg-surface-elevated, #262626);
  --pp-panel-border: var(--border-subtle, #333333);
  --pp-header-bg: rgba(24, 26, 31, 0.88);
  --pp-text: var(--text-primary, #f4f4f5);
  --pp-text-muted: var(--text-secondary, #9ca3af);
  --pp-accent: var(--accent-cyan, #00d2ff);
  --pp-accent-glow: rgba(0, 210, 255, 0.2);
  --pp-active-orange: #f59e0b;
  --pp-active-glow: rgba(245, 158, 11, 0.35);
  --pp-live-red: #ef4444;
  --pp-pvw-green: #10b981;
  --pp-verse-blue: #27272a;
  --pp-chorus-amber: #27272a;
  --pp-bridge-purple: #27272a;
  --pp-blank-slate: #1f1f22;
  --font-mono: var(--font-mono, 'JetBrains Mono', monospace);
  --font-sans: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  --font-heading: var(--font-display, 'Outfit', sans-serif);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.presenter-body {
  background-color: var(--pp-bg);
  color: var(--pp-text);
  font-family: var(--font-sans);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* Header styling inherited from .desktop-header.header-fluid in style.css */
.presenter-header {
  border-bottom: 1px solid var(--border-subtle);
}

/* Center Toolbar: Quick Clear Buttons */
.clear-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  position: static;
  margin: 0 var(--space-4);
}

.clear-btn,
.clear-bar .clear-btn {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  width: auto;
  height: auto;
  background: var(--bg-surface-elevated, #262626);
  border: 1px solid var(--border-subtle, #333333);
  color: var(--text-secondary, #d4d4d8);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast, 0.15s ease);
  flex-shrink: 0;
}

.clear-btn:hover,
.clear-bar .clear-btn:hover {
  background: var(--bg-surface-hover, #2f2f2f);
  color: #fff;
  border-color: var(--border-strong, #484848);
}

.clear-btn.active,
.clear-bar .clear-btn.active {
  background: #991b1b;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.clear-btn.btn-blackout,
.clear-bar .clear-btn.btn-blackout {
  border-color: #71717a;
  color: #f87171;
}

.clear-btn.btn-blackout.active,
.clear-bar .clear-btn.btn-blackout.active {
  background: #dc2626;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.5);
}


/* Main 3-Column Layout */
.presenter-main {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  overflow: hidden;
  background: var(--pp-bg);
}

@media (max-width: 1280px) {
  .presenter-main {
    grid-template-columns: 280px 1fr 340px;
  }
}

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

/* ==========================================================================
   LEFT COLUMN: LIBRARY & PLAYLIST + YOUTUBE PLAYER
   ========================================================================== */
.library-column {
  background: var(--pp-surface);
  border-right: 1px solid var(--pp-panel-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.library-header {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--pp-panel-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.col-heading {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.song-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e4e4e7;
  background: #27272a;
  border: 1px solid #3f3f46;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Search Box */
.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  pointer-events: none;
}

.library-search {
  width: 100%;
  background: #141416;
  border: 1px solid #2e2e32;
  color: #f4f4f5;
  border-radius: 6px;
  padding: 7px 10px 7px 32px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.library-search:focus {
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 3px var(--pp-accent-glow);
}

/* Songlist Items */
.song-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: #1a1a1d;
  border: 1px solid #27272a;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-item:hover {
  background: #242428;
  border-color: #3f3f46;
}

.song-item.active-song {
  background: #28282e;
  border-color: #52525b;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.song-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.song-title-text {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.3;
}

.song-yt-badge {
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.song-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #71717a;
}

.song-slides-num {
  color: #a1a1aa;
}

/* Embedded YouTube Player Drawer in Left Column */
.yt-player-box {
  border-top: 1px solid var(--pp-panel-border);
  background: #141416;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.yt-label {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}


.yt-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #2e2e32;
}

.yt-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.yt-now-playing-title {
  font-size: 11px;
  color: #d4d4d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   CENTER COLUMN: SLIDE PRESENTATION DECK (1-2 LINES PER SLIDE)
   ========================================================================== */
.deck-column {
  background: var(--pp-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.deck-header {
  padding: 10px 18px;
  background: var(--pp-surface);
  border-bottom: 1px solid var(--pp-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.deck-song-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-song-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.deck-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pp-text-muted);
}

.deck-navigation-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-nav-btn {
  background: #202023;
  border: 1px solid #333338;
  color: #f4f4f5;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.deck-nav-btn:hover {
  background: #2c2c30;
  border-color: #52525b;
}

.deck-nav-btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000000;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.25);
}

.deck-nav-btn.primary:hover {
  background: linear-gradient(135deg, #38e1ff, #60a5fa);
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

/* Slides Grid */
.slides-grid-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-label-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-verse { background: #222226; color: #d4d4d8; border: 1px solid #3f3f46; }
.tag-chorus { background: #2a2218; color: #f59e0b; border: 1px solid #78350f; }
.tag-pre-chorus { background: #2a2218; color: #fb923c; border: 1px solid #7c2d12; }
.tag-bridge { background: #26202a; color: #c084fc; border: 1px solid #581c87; }
.tag-intro, .tag-blank { background: #1e1e22; color: #a1a1aa; border: 1px solid #333338; }

.slides-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* Individual Slide Card */
.slide-card {
  aspect-ratio: 16 / 9;
  background: #18181b;
  border: 2px solid #27272a;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.slide-card:hover {
  border-color: #52525b;
  transform: translateY(-2px);
  background: #202024;
}

/* Active Slide Glowing State */
.slide-card.active-slide {
  border-color: var(--pp-active-orange) !important;
  box-shadow: 0 0 16px var(--pp-active-glow), inset 0 0 0 1px var(--pp-active-orange);
  background: #222220;
}

.slide-card.active-slide::after {
  content: 'ON AIR';
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--pp-active-orange);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  animation: pulse-live 1.2s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

.slide-badge-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #71717a;
  background: #111113;
  padding: 1px 6px;
  border-radius: 3px;
}

.slide-content-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4px 8px;
}

.slide-lyric-line {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.slide-card.is-blank .slide-lyric-line {
  color: #64748b;
  font-style: italic;
  font-size: 11px;
}

/* ==========================================================================
   RIGHT COLUMN: LIVE OUTPUT PREVIEWS & STYLING CUSTOMIZER
   ========================================================================== */
.output-column {
  background: var(--pp-surface);
  border-left: 1px solid var(--pp-panel-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 16px;
  gap: 16px;
}

.output-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--pp-panel-border);
  padding-bottom: 8px;
}

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

.sync-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-live 1.2s infinite;
}

.res-tag {
  background: #202023;
  border: 1px solid #333338;
  color: #9ca3af;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}

/* ==========================================================================
   UNIFIED PROPRESENTER 7 OUTPUT MONITOR
   ========================================================================== */
.unified-monitor-card {
  background: #141416;
  border: 1px solid #2e2e32;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* Pro7 Screen Selector Top Bar */
.screen-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  padding: 6px 8px;
}

.screen-tabs-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.screen-tab-btn {
  background: #202023;
  border: 1px solid #2e2e32;
  color: #9ca3af;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.screen-tab-btn:hover {
  background: #27272a;
  color: #f4f4f5;
  border-color: #3f3f46;
}

.screen-tab-btn.active {
  background: rgba(0, 210, 255, 0.14);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.15s ease;
}

.screen-tab-btn.active .dot-audience { background: #e4e4e7; box-shadow: 0 0 6px rgba(255, 255, 255, 0.4); }
.screen-tab-btn.active .dot-stage { background: #10b981; box-shadow: 0 0 6px #10b981; }
.screen-tab-btn.active .dot-stream { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }


/* Unified Viewport Monitor */
.unified-viewport {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #0d0d0e;
  overflow: hidden;
}

.screen-view {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.screen-view.active {
  display: flex;
  flex-direction: column;
  animation: fadeInView 0.18s ease;
}

@keyframes fadeInView {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.view-osd-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: rgba(18, 18, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.5px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* VIEW 1: Auditorium LED Screen */
.preview-screen-box {
  width: 100%;
  height: 100%;
  background: #0d0d0e;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px 24px;
  text-align: center;
}

/* Screen Background */
.screen-bg-dark {
  background: #0d0d0e;
}

.live-lyrics-text {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  max-width: 92%;
  transition: all 0.15s ease;
}

/* VIEW 2: Stage Display / Foldback Confidence Monitor */
.confidence-box {
  width: 100%;
  height: 100%;
  background: #101012;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stage-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161618;
  border: 1px solid #27272a;
  border-radius: 4px;
  padding: 4px 10px;
}

.stage-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.5px;
}

.stage-song-info {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #e4e4e7;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-dest-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
}

.stage-current-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px 12px;
  position: relative;
}

.stage-section-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.confidence-current {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
}

.confidence-next-row {
  background: #161618;
  border: 1px solid #27272a;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.confidence-next-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
  flex-shrink: 0;
}

.confidence-next-text {
  font-size: 11px;
  color: #d4d4d8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* VIEW 3: Stream Lower-Third Preview Box */
.stream-preview-bg {
  background: #151518;
  position: relative;
}

.stream-cam-watermark {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 3px;
}

.lower-third-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(20, 20, 24, 0.94);
  border-left: 4px solid #f59e0b;
  border-radius: 5px;
  padding: 6px 14px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lt-line-current {
  font-size: 12px;
  font-weight: 700;
  color: #fef08a; /* Yellow line 1 */
  line-height: 1.3;
}

.lt-line-next {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

/* Monitor Footer Status Bar */
.monitor-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141416;
  border-top: 1px solid #27272a;
  padding: 6px 10px;
}

.monitor-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-indicator-dot.dot-live {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}




/* ==========================================================================
   DESKTOP ONLY LOCKOUT SCREEN (< 1024px or portrait)
   Inherits unified .desktop-lock-screen and .lockout-card from style.css
   ========================================================================== */
@media (max-width: 1024px), (orientation: portrait) {
  .desktop-lock-screen {
    display: flex !important;
  }
  .presenter-main, .presenter-header, .desktop-header {
    display: none !important;
  }
}
