/* =========================================================
   LYRICATOR PRO - OPERATOR CONSOLE DESIGN SYSTEM
   Modern Dark Glassmorphism, Responsive Live Stage Dashboard
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Cinzel:wght@600;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@400;600;700;800;900&family=Orbitron:wght@600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&family=Righteous&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg-main: #0a0c12;
  --bg-surface-1: #111420;
  --bg-surface-2: #181d2d;
  --bg-surface-3: #22293e;
  --bg-glass: rgba(24, 29, 45, 0.75);
  --bg-glass-elevated: rgba(34, 41, 62, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-active: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #60a5fa;

  --accent-primary: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --chroma-green: #00ff00;
  --chroma-blue: #0033ff;

  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-bebas: 'Bebas Neue', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.25);
}

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

input, textarea, select {
  user-select: text;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ================= HEADER BAR ================= */
.header-bar {
  height: 62px;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 20;
  backdrop-filter: blur(12px);
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title span.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); 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); }
}

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

/* Mode Switcher Tabs */
.mode-switcher-bar {
  display: flex;
  background: var(--bg-surface-2);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #10b981;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #f43f5e);
  border-color: #f43f5e;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-download {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  text-decoration: none;
}
.btn-download:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 8px;
  width: 36px;
  height: 36px;
}

.kbd-badge {
  font-size: 0.65rem;
  padding: 2px 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: monospace;
}

/* ================= MAIN 3-COLUMN WORKSPACE ================= */
.app-container {
  display: grid;
  grid-template-columns: 290px 1fr 380px;
  flex: 1;
  height: calc(100vh - 62px);
  min-height: 0;
  overflow: hidden;
}

/* ================= COLUMN 1: SONG LIBRARY ================= */
.col-library {
  background: var(--bg-surface-1);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

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

.panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-toolbar {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
}

.library-filter-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-subtle);
}

.lib-filter-tab {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.lib-filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.lib-filter-tab.active {
  background: var(--bg-surface-3);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.lib-filter-count {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 700;
}
.lib-filter-tab.active .lib-filter-count {
  background: var(--accent-primary);
  color: #fff;
}

.search-box {
  padding: 8px 12px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.search-box .search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.song-list-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.song-item-card {
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.song-item-card:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.song-item-card.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

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

.song-title-text {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.song-item-card.active .song-title-text {
  color: var(--accent-accent, #93c5fd);
}

.song-top-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.song-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.song-item-card:hover .song-card-actions {
  opacity: 1;
}

.song-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.song-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: scale(1.08);
}

.song-action-btn.btn-delete-song:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.song-action-btn.btn-dup-song:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
}

.song-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.song-tags {
  display: flex;
  gap: 4px;
}

.badge-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* ================= COLUMN 2: LIVE LYRICS CONTROLLER ================= */
.col-controller {
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.controller-top-header {
  padding: 14px 20px;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.current-song-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.current-song-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.current-song-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Quick Section Jump Pills Bar */
.section-pills-bar {
  padding: 10px 20px;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.section-pill {
  padding: 6px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.section-pill:hover {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.section-pill.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Lyrics Grid Slide Deck - Fully Scrollable Up & Down */
.lyrics-grid-container {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.lyrics-grid-container::-webkit-scrollbar {
  width: 8px;
}
.lyrics-grid-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}
.lyrics-grid-container::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.45);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.lyrics-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.85);
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label-header {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

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

.slide-card {
  background: var(--bg-surface-1);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  justify-content: center;
}

.slide-card:hover {
  background: var(--bg-surface-2);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.slide-card.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}

.slide-card.active::before {
  content: 'LIVE ON STAGE';
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-primary);
  color: #fff;
  letter-spacing: 0.5px;
}

.slide-index-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.slide-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  text-align: center;
  padding-top: 6px;
}

.slide-card.active .slide-text {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Controller Bottom Nav Toolbar */
.controller-nav-bar {
  padding: 12px 20px;
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= COLUMN 3: STAGE MONITOR & TUNING ================= */
.col-stage-tuning {
  background: var(--bg-surface-1);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 62px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.col-stage-tuning::-webkit-scrollbar {
  width: 7px;
}
.col-stage-tuning::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.col-stage-tuning::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.45);
  border-radius: 4px;
}
.col-stage-tuning::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}

/* LIVE MONITOR SCREEN PREVIEW */
.monitor-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.monitor-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-screen-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.preview-screen-wrapper.bg-green {
  background-color: var(--chroma-green) !important;
}
.preview-screen-wrapper.bg-blue {
  background-color: var(--chroma-blue) !important;
}
.preview-screen-wrapper.bg-black {
  background-color: #000000 !important;
}
.preview-screen-wrapper.bg-gradient {
  background: linear-gradient(135deg, #090e1a, #1a2238) !important;
}

.preview-lyric-wrapper {
  width: 100%;
  max-width: 95%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Layout Modes in Preview */
.preview-screen-wrapper.layout-center {
  align-items: center;
  justify-content: center;
}

.preview-screen-wrapper.layout-lower-third {
  align-items: flex-end;
  padding-bottom: 8px;
}

.preview-screen-wrapper.layout-lower-third .preview-lyric-wrapper {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  width: 94%;
}

.preview-screen-wrapper.layout-karaoke-2line .preview-lyric-wrapper {
  gap: 4px;
}

.preview-screen-wrapper.layout-full-slide .preview-lyric-wrapper {
  width: 95%;
}

.preview-lyric-render {
  font-family: var(--preview-font, 'Outfit', sans-serif);
  font-size: var(--preview-font-size, 1.1rem);
  font-weight: 800;
  color: var(--preview-text-color, #ffffff);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  transition: all 0.15s ease;
}

.preview-secondary-lyric {
  display: none;
  font-family: var(--preview-font, 'Outfit', sans-serif);
  font-size: calc(var(--preview-font-size, 1.1rem) * 0.7);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;
  word-break: break-word;
}

.preview-screen-wrapper.layout-karaoke-2line .preview-secondary-lyric {
  display: block;
}

.preview-screen-wrapper.is-uppercase .preview-lyric-render,
.preview-screen-wrapper.is-uppercase .preview-secondary-lyric {
  text-transform: uppercase;
}

.preview-screen-wrapper.has-stroke .preview-lyric-render {
  -webkit-text-stroke: var(--preview-stroke-width, 2px) var(--preview-stroke-color, #000);
}

.preview-screen-wrapper.has-stroke .preview-secondary-lyric {
  -webkit-text-stroke: 1px var(--preview-stroke-color, #000);
}

.preview-screen-wrapper.has-glow .preview-lyric-render {
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 255, 255, 0.3);
}

.preview-screen-wrapper.blackout .preview-lyric-wrapper {
  display: none !important;
}
.preview-screen-wrapper.blackout {
  background: #000000 !important;
}

.preview-badge-status {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  transition: background 0.2s ease;
}

/* Transitions for Stage Monitor Preview */
.preview-lyric-wrapper.transition-fade-smooth {
  animation: previewFadeInSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-fade-fast {
  animation: previewFadeInSmooth calc(var(--preview-trans-dur, 0.35s) * 0.5) ease-out both;
}

.preview-lyric-wrapper.transition-slide,
.preview-lyric-wrapper.transition-slide-up {
  animation: previewSlideUpSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-slide-left {
  animation: previewSlideLeftSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-slide-fade-down {
  animation: previewSlideDownSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-pop-scale {
  animation: previewPopScaleSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.preview-lyric-wrapper.transition-glow-pulse {
  animation: previewGlowPulseAnim var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-zoom-blur {
  animation: previewZoomBlurSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-flip-3d {
  animation: previewFlip3dSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-blur-expand {
  animation: previewBlurExpandSmooth var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preview-lyric-wrapper.transition-elastic-bounce {
  animation: previewElasticBounceSmooth var(--preview-trans-dur, 0.45s) cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

/* Directional Entrance & Exit Transitions for Preview */
.preview-lyric-wrapper.enter-from-left,
.preview-lyric-wrapper.transition-enter-left-settle,
.preview-lyric-wrapper.transition-fly-in-left-out-right {
  animation: previewEnterFromLeftAnim var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.preview-lyric-wrapper.exit-to-right {
  animation: previewExitToRightAnim calc(var(--preview-trans-dur, 0.35s) * 0.45) cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

.preview-lyric-wrapper.enter-from-right,
.preview-lyric-wrapper.transition-enter-right-settle,
.preview-lyric-wrapper.transition-fly-in-right-out-left {
  animation: previewEnterFromRightAnim var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.preview-lyric-wrapper.exit-to-left {
  animation: previewExitToLeftAnim calc(var(--preview-trans-dur, 0.35s) * 0.45) cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

.preview-lyric-wrapper.enter-from-top,
.preview-lyric-wrapper.transition-fly-in-top-out-bottom {
  animation: previewEnterFromTopAnim var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.preview-lyric-wrapper.exit-to-bottom {
  animation: previewExitToBottomAnim calc(var(--preview-trans-dur, 0.35s) * 0.45) cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

.preview-lyric-wrapper.enter-from-bottom,
.preview-lyric-wrapper.transition-fly-in-bottom-out-top {
  animation: previewEnterFromBottomAnim var(--preview-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.preview-lyric-wrapper.exit-to-top {
  animation: previewExitToTopAnim calc(var(--preview-trans-dur, 0.35s) * 0.45) cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

.preview-lyric-wrapper.exit-fade-quick {
  animation: previewExitFadeQuickAnim calc(var(--preview-trans-dur, 0.35s) * 0.4) ease-in forwards !important;
}

@keyframes previewFadeInSmooth {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes previewSlideUpSmooth {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes previewSlideLeftSmooth {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes previewSlideDownSmooth {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes previewPopScaleSmooth {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes previewGlowPulseAnim {
  0% { opacity: 0; filter: brightness(2.2) drop-shadow(0 0 16px #fff); transform: scale(0.96); }
  100% { opacity: 1; filter: brightness(1) drop-shadow(0 0 0 transparent); transform: scale(1); }
}

@keyframes previewZoomBlurSmooth {
  from { opacity: 0; filter: blur(6px); transform: scale(1.2); }
  to { opacity: 1; filter: blur(0px); transform: scale(1); }
}

@keyframes previewFlip3dSmooth {
  from { opacity: 0; transform: perspective(400px) rotateX(45deg) translateY(10px); }
  to { opacity: 1; transform: perspective(400px) rotateX(0deg) translateY(0); }
}

@keyframes previewBlurExpandSmooth {
  from { opacity: 0; filter: blur(8px); letter-spacing: 6px; }
  to { opacity: 1; filter: blur(0px); letter-spacing: normal; }
}

@keyframes previewElasticBounceSmooth {
  0% { opacity: 0; transform: scale(0.6); }
  70% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes previewEnterFromLeftAnim {
  0% { opacity: 0; transform: translateX(-100%); }
  70% { opacity: 1; transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes previewExitToRightAnim {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes previewEnterFromRightAnim {
  0% { opacity: 0; transform: translateX(100%); }
  70% { opacity: 1; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes previewExitToLeftAnim {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-100%); }
}

@keyframes previewEnterFromTopAnim {
  0% { opacity: 0; transform: translateY(-100%); }
  70% { opacity: 1; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes previewExitToBottomAnim {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(100%); }
}

@keyframes previewEnterFromBottomAnim {
  0% { opacity: 0; transform: translateY(100%); }
  70% { opacity: 1; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes previewExitToTopAnim {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-100%); }
}

@keyframes previewExitFadeQuickAnim {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96); }
}

/* Continuous Loop Ambient Motions for Stage Monitor */
.preview-lyric-wrapper.loop-cloud-float,
.preview-lyric-render.loop-cloud-float {
  animation: previewCloudFloatMotion var(--loop-duration, 5s) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-gentle-wave,
.preview-lyric-render.loop-gentle-wave {
  animation: previewGentleWaveMotion var(--loop-duration, 5s) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-breathing-scale,
.preview-lyric-render.loop-breathing-scale {
  animation: previewBreathingScaleMotion var(--loop-duration, 4s) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-neon-flicker-pulse,
.preview-lyric-render.loop-neon-flicker-pulse {
  animation: previewNeonPulseMotion calc(var(--loop-duration, 5s) * 0.7) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-shimmer-flow,
.preview-lyric-render.loop-shimmer-flow {
  animation: previewShimmerFlowMotion var(--loop-duration, 5s) ease-in-out infinite !important;
}

.preview-lyric-wrapper.loop-heartbeat-pulse,
.preview-lyric-render.loop-heartbeat-pulse {
  animation: previewHeartbeatPulseMotion calc(var(--loop-duration, 5s) * 0.4) ease-in-out infinite !important;
}

.preview-lyric-wrapper.loop-floating-bubble,
.preview-lyric-render.loop-floating-bubble {
  animation: previewFloatingBubbleMotion var(--loop-duration, 5s) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-pendulum-swing,
.preview-lyric-render.loop-pendulum-swing {
  animation: previewPendulumSwingMotion var(--loop-duration, 5s) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-cinematic-drift,
.preview-lyric-render.loop-cinematic-drift {
  animation: previewCinematicDriftMotion calc(var(--loop-duration, 5s) * 1.6) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-rainbow-chroma,
.preview-lyric-render.loop-rainbow-chroma {
  animation: previewRainbowChromaMotion calc(var(--loop-duration, 5s) * 1.5) linear infinite !important;
}

.preview-lyric-wrapper.loop-stage-energy,
.preview-lyric-render.loop-stage-energy {
  animation: previewStageEnergyMotion calc(var(--loop-duration, 5s) * 0.5) ease-in-out infinite alternate !important;
}

.preview-lyric-wrapper.loop-continuous-marquee-left,
.preview-lyric-render.loop-continuous-marquee-left {
  display: inline-block !important;
  white-space: nowrap !important;
  animation: previewMarqueeLeft calc(var(--loop-duration, 5s) * 2.5) linear infinite !important;
}

.preview-lyric-wrapper.loop-continuous-marquee-right,
.preview-lyric-render.loop-continuous-marquee-right {
  display: inline-block !important;
  white-space: nowrap !important;
  animation: previewMarqueeRight calc(var(--loop-duration, 5s) * 2.5) linear infinite !important;
}

@keyframes previewCloudFloatMotion {
  0% { transform: translateY(0px) rotate(0deg) scale(var(--start-scale, 1)); }
  33% { transform: translateY(-4px) rotate(-0.4deg) scale(calc(var(--start-scale, 1) * 1.01)); }
  66% { transform: translateY(3px) rotate(0.4deg) scale(calc(var(--start-scale, 1) * 0.995)); }
  100% { transform: translateY(-2px) rotate(0deg) scale(calc(var(--start-scale, 1) * 1.005)); }
}

@keyframes previewGentleWaveMotion {
  0% { transform: translateY(0) skewX(0deg) scale(var(--start-scale, 1)); }
  50% { transform: translateY(-5px) skewX(-1deg) scale(var(--end-scale, 1.08)); }
  100% { transform: translateY(3px) skewX(0.8deg) scale(var(--start-scale, 1)); }
}

@keyframes previewBreathingScaleMotion {
  0% { transform: scale(var(--start-scale, 1)); }
  100% { transform: scale(var(--end-scale, 1.08)); }
}

@keyframes previewNeonPulseMotion {
  0% { filter: brightness(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.2)); transform: scale(var(--start-scale, 1)); }
  100% { filter: brightness(1.25) drop-shadow(0 0 14px rgba(255, 255, 255, 0.6)); transform: scale(var(--end-scale, 1.08)); }
}

@keyframes previewShimmerFlowMotion {
  0%, 100% { transform: scale(var(--start-scale, 1)); }
  50% { transform: scale(var(--end-scale, 1.08)); filter: brightness(1.1); }
}

@keyframes previewHeartbeatPulseMotion {
  0% { transform: scale(var(--start-scale, 1)); }
  15% { transform: scale(var(--end-scale, 1.08)); }
  30% { transform: scale(var(--start-scale, 1)); }
  45% { transform: scale(calc(var(--start-scale, 1) + (var(--end-scale, 1.08) - var(--start-scale, 1)) * 0.6)); }
  60% { transform: scale(var(--start-scale, 1)); }
  100% { transform: scale(var(--start-scale, 1)); }
}

@keyframes previewFloatingBubbleMotion {
  0% { transform: translateY(0px) scale(var(--start-scale, 1)); }
  50% { transform: translateY(-6px) scale(var(--end-scale, 1.08)); }
  100% { transform: translateY(4px) scale(calc(var(--start-scale, 1) * 0.98)); }
}

@keyframes previewPendulumSwingMotion {
  0% { transform: rotate(-3deg) translateX(-5px) scale(var(--start-scale, 1)); }
  50% { transform: rotate(0deg) translateX(0px) scale(var(--end-scale, 1.08)); }
  100% { transform: rotate(3deg) translateX(5px) scale(var(--start-scale, 1)); }
}

@keyframes previewCinematicDriftMotion {
  0% { transform: translateX(-6px) scale(var(--start-scale, 1)); }
  100% { transform: translateX(6px) scale(var(--end-scale, 1.08)); }
}

@keyframes previewRainbowChromaMotion {
  0% { filter: hue-rotate(0deg) drop-shadow(0 0 4px rgba(255, 100, 100, 0.4)); transform: scale(var(--start-scale, 1)); }
  50% { filter: hue-rotate(180deg) drop-shadow(0 0 8px rgba(100, 200, 255, 0.6)); transform: scale(var(--end-scale, 1.08)); }
  100% { filter: hue-rotate(360deg) drop-shadow(0 0 4px rgba(255, 100, 100, 0.4)); transform: scale(var(--start-scale, 1)); }
}

@keyframes previewStageEnergyMotion {
  0% { transform: scale(var(--start-scale, 1)) rotate(0deg); filter: brightness(1); }
  25% { transform: scale(var(--end-scale, 1.06)) rotate(0.4deg); filter: brightness(1.2); }
  50% { transform: scale(var(--start-scale, 1)) rotate(-0.4deg); filter: brightness(1.05); }
  75% { transform: scale(var(--end-scale, 1.06)) rotate(0.2deg); filter: brightness(1.25); }
  100% { transform: scale(var(--start-scale, 1)) rotate(0deg); filter: brightness(1); }
}

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

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

/* Typography Casing Utility Classes for Preview */
.preview-screen-wrapper.case-uppercase .preview-lyric-render,
.preview-screen-wrapper.case-uppercase .preview-secondary-lyric {
  text-transform: uppercase !important;
}

.preview-screen-wrapper.case-titlecase .preview-lyric-render,
.preview-screen-wrapper.case-titlecase .preview-secondary-lyric {
  text-transform: capitalize !important;
}

.preview-screen-wrapper.case-small-caps .preview-lyric-render,
.preview-screen-wrapper.case-small-caps .preview-secondary-lyric {
  font-variant: small-caps !important;
}

.preview-screen-wrapper.case-none .preview-lyric-render,
.preview-screen-wrapper.case-none .preview-secondary-lyric {
  text-transform: none !important;
}

/* STAGE EMERGENCY DECK (HOTKEY BUTTONS) */
.stage-deck-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.deck-btn {
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.deck-btn:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.2);
}

.deck-btn.active {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.deck-btn.active-green {
  background: #059669;
  border-color: #10b981;
  color: #fff;
}

.deck-btn.active-blue {
  background: #1d4ed8;
  border-color: #3b82f6;
  color: #fff;
}

/* LOGO SLIDE CONFIG BOX */
.logo-config-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 4px;
}

.logo-config-header {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
  user-select: none;
}

.logo-config-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.logo-config-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-config-header:hover .logo-config-title {
  color: var(--text-primary);
}

.logo-config-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-config-arrow.is-collapsed {
  transform: rotate(-90deg);
}

.logo-config-content {
  padding: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-config-content.is-collapsed {
  display: none;
}

.logo-thumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-top: 4px;
}

.logo-thumb-preview {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-thumb-name {
  font-size: 0.72rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.btn-text-danger {
  font-size: 0.68rem;
  color: var(--accent-rose);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-top: 2px;
  display: block;
}

.btn-text-danger:hover {
  color: #ff8899;
}

/* ================= TELEPROMPTER DECK & PREVIEW ================= */
.prompter-deck-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, rgba(0, 0, 0, 0) 100%);
}

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

.prompter-mode-pills {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.prompter-pill-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.prompter-pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.prompter-pill-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.prompter-action-row {
  display: flex;
  gap: 8px;
}

.prompter-play-btn {
  flex: 2;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
}

.prompter-play-btn.is-playing {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
}

.prompter-rewind-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.prompter-manual-row {
  display: flex;
  gap: 8px;
}

.prompter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.prompter-checkbox-label:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Teleprompter Live Monitor Preview */
.preview-prompter-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000000;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.preview-prompter-eyeline {
  position: absolute;
  top: 32%;
  left: 4px;
  right: 4px;
  height: 24px;
  border-top: 1px dashed rgba(255, 215, 0, 0.6);
  border-bottom: 1px dashed rgba(255, 215, 0, 0.6);
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffd700;
  font-size: 0.6rem;
  font-weight: bold;
}

.preview-prompter-lines {
  padding-top: 35px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.05s linear;
  will-change: transform;
}

.preview-prompter-line {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--prompter-text-color, #ffffff);
  opacity: 0.55;
  text-align: center;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.15s ease;
  text-shadow: none;
}

.preview-prompter-wrapper.has-glow .preview-prompter-line {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.preview-prompter-line.active {
  color: var(--prompter-highlight-color, #ffd700);
  opacity: 1;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.04);
  text-shadow: none;
}

.preview-prompter-wrapper.has-glow .preview-prompter-line.active {
  text-shadow: 0 0 8px var(--prompter-highlight-color, rgba(255, 215, 0, 0.6)), 0 2px 6px rgba(0, 0, 0, 0.95);
}

/* TUNING CONTROLS TABS / ACCORDIONS */
.tuning-section {
  padding: 16px 16px 120px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preset-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.preset-btn {
  padding: 6px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-btn:hover {
  background: var(--bg-surface-3);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary);
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

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

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.val-badge {
  font-size: 0.75rem;
  color: var(--text-primary);
  background: var(--bg-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-surface-3);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Background Selector Chips */
.bg-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.bg-chip {
  height: 38px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.15s;
}

.bg-chip:hover {
  transform: scale(1.05);
}

.bg-chip.active {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.bg-chip.chip-black { background: #000000; color: #fff; }
.bg-chip.chip-green { background: #00ff00; color: #000; }
.bg-chip.chip-blue { background: #0022ff; color: #fff; }
.bg-chip.chip-gradient { background: linear-gradient(135deg, #090e1a, #1a2238); color: #fff; }

/* Layout Mode Buttons */
.layout-selector-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.layout-btn {
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
}

.layout-btn:hover {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.layout-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* Select inputs */
select.custom-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

select.custom-select:focus {
  border-color: var(--accent-primary);
}

/* Color input */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

/* ================= MODAL DIALOGS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface-1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

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

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

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

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

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
  font-family: monospace;
  line-height: 1.4;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  background: var(--bg-surface-3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Online Lyrics Result Cards */
.online-result-card {
  padding: 12px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
}

.online-result-card:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.15);
}

.online-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.online-result-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.online-result-snippet {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ================= SEARCHABLE FONT PICKER UI ================= */
.font-active-card {
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.font-active-card:hover {
  background: var(--bg-surface-3);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.font-active-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.font-active-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-active-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-active-sample {
  font-size: 0.75rem;
  color: var(--accent-accent, #93c5fd);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.font-picker-modal-box {
  max-width: 820px;
  width: 92%;
  max-height: 88vh;
}

.font-search-bar {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 12px;
}

.font-search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.font-search-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.font-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

.font-category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.font-chip {
  padding: 6px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.font-chip:hover {
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.font-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

.font-direct-loader-card {
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Scrollable Font Grid (Scrollable, takes fixed comfortable height) */
.font-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
}

.font-picker-grid::-webkit-scrollbar {
  width: 7px;
}
.font-picker-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.font-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.45);
  border-radius: 4px;
}
.font-picker-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}

.font-card {
  padding: 12px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.font-card:hover {
  background: var(--bg-surface-3);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.font-card.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

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

.font-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-card.active .font-card-title {
  color: var(--accent-accent, #93c5fd);
}

.font-card-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.font-card-preview {
  font-size: 1.15rem;
  line-height: 1.25;
  color: #ffffff;
  min-height: 32px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= RESPONSIVE DESIGN & ADAPTIVE LAYOUT ================= */

/* Laptop / Medium Display (1080p with 125%-150% scaling or 1366x768) */
@media (max-width: 1366px) {
  .app-container {
    grid-template-columns: 260px 1fr 340px;
  }
  
  .panel-header {
    padding: 10px 14px;
  }
  
  .controller-top-header {
    padding: 10px 16px;
  }
  
  .section-pills-bar {
    padding: 8px 16px;
  }
  
  .lyrics-grid-container {
    padding: 16px 16px 70px 16px;
    gap: 14px;
  }
  
  .slides-container {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
  }
  
  .slide-card {
    padding: 12px 14px;
    min-height: 80px;
  }
  
  .slide-text {
    font-size: 0.88rem;
  }
}

/* Compact Laptop / Small Screen (1024px - 1200px) */
@media (max-width: 1100px) {
  .app-container {
    grid-template-columns: 230px 1fr 310px;
  }
  
  .header-bar {
    padding: 0 12px;
  }
  
  .brand-title {
    font-size: 1.1rem;
  }
  
  .current-song-title {
    font-size: 1.1rem;
  }
  
  .preset-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet & Mobile Layout (< 860px) */
@media (max-width: 860px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .app-container {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .col-library {
    height: 320px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .col-controller {
    height: 500px;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .col-stage-tuning {
    height: auto;
    max-height: none;
    border-left: none;
  }
  
  .lyrics-grid-container {
    height: 380px;
  }
}

/* ================= IN-APP CONFIRMATION & ALERT MODAL ================= */
.modal-confirm-box {
  max-width: 440px;
  width: 90%;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-surface-1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-confirm-body {
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.modal-confirm-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-confirm-icon.info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.modal-confirm-content {
  flex: 1;
}

.modal-confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.modal-confirm-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.modal-confirm-footer {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Flash Banner Preset Chips */
.flash-preset-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.flash-chip-btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.flash-chip-btn:hover {
  background: var(--bg-surface-3);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Line Display Mode Segmented Buttons */
.line-mode-btn {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.line-mode-btn:hover {
  background: var(--bg-surface-3);
  color: #fff;
}

.line-mode-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Safe Zone Preset Chips */
.safe-preset-chip {
  padding: 5px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.safe-preset-chip:hover {
  background: var(--bg-surface-3);
  color: #fff;
}

.safe-preset-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary);
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
}

.secondary-line-config {
  display: flex;
}


