@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Noto+Sans+Devanagari:wght@400;600;700&family=Poppins:wght@300;400;500;600;700&family=Rozha+One&display=swap');

:root {
  --bg-main: #0c0a09;
  --bg-surface: #171412;
  --bg-surface-elevated: #241e1a;
  --bg-surface-glass: rgba(23, 20, 18, 0.85);
  
  --border-subtle: rgba(217, 119, 6, 0.2);
  --border-bright: rgba(245, 158, 11, 0.5);
  
  --gold-primary: #fbbf24;
  --gold-dark: #d97706;
  --gold-glow: rgba(251, 191, 36, 0.25);
  --saffron: #f97316;
  --saffron-glow: rgba(249, 115, 22, 0.3);
  
  --text-main: #fef3c7;
  --text-bright: #ffffff;
  --text-muted: #a8a29e;
  --text-gold: #fde68a;
  
  --font-display: 'Cinzel', serif;
  --font-hindi: 'Rozha One', 'Noto Sans Devanagari', serif;
  --font-body: 'Poppins', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-crossfade: 1.2s ease-in-out;
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
}

/* ==========================================================================
   APP HEADER & NAVIGATION
   ========================================================================== */
.app-header {
  background: linear-gradient(180deg, rgba(20, 16, 13, 0.98) 0%, rgba(12, 10, 9, 0.94) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  width: 100%;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, #fbbf24 0%, #d97706 70%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 12px var(--gold-glow);
}

.brand-titles h1 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--gold-primary);
  text-transform: uppercase;
  white-space: nowrap;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  color: #1a0f00;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--gold-glow);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: #332b25;
  border-color: var(--border-bright);
  color: var(--text-bright);
}

.btn-compact {
  padding: 6px 10px;
  font-size: 0.78rem;
}

/* ==========================================================================
   MOBILE SEGMENTED TAB NAVIGATION
   ========================================================================== */
.mobile-tab-nav {
  display: none; /* Hidden on desktop */
}

/* ==========================================================================
   MAIN DASHBOARD LAYOUT (DESKTOP DEFAULT)
   ========================================================================== */
.main-container {
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  gap: 16px;
  padding: 16px 20px;
  height: calc(100vh - 60px);
  overflow: hidden;
  width: 100%;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  min-width: 0;
}

.panel-header {
  padding: 12px 16px;
  background: rgba(36, 30, 26, 0.5);
  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.9rem;
  letter-spacing: 0.04em;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Active Deity Action Bar (Edit / Delete) */
.active-deity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  gap: 8px;
  width: 100%;
}

.active-deity-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-deity-label strong {
  color: var(--gold-primary);
}

.active-deity-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-del {
  color: #f87171;
}

.btn-del:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* Inline Active Deity Gallery Box */
.active-deity-gallery-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.active-deity-gallery-box .custom-thumbnails {
  max-height: 120px;
  overflow-y: auto;
  padding: 2px;
}

.thumb-item.active-thumb {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* ==========================================================================
   DEITY QUICK PADS
   ========================================================================== */
.deity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.deity-pad {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  min-width: 0;
  width: 100%;
}

.deity-pad:hover {
  background: #2e2621;
  border-color: var(--border-bright);
}

.deity-pad:active {
  transform: scale(0.97);
}

.deity-pad.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(217, 119, 6, 0.28) 100%);
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
}

.deity-pad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.deity-name-hindi {
  font-family: var(--font-hindi);
  font-size: 1rem;
  color: var(--gold-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deity-hotkey {
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.image-counter {
  font-size: 0.65rem;
  color: var(--saffron);
}

/* Media Manager & Dropzone */
.media-manager-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drop-zone {
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background: rgba(245, 158, 11, 0.03);
}

.drop-zone:hover, .drop-zone.dragover {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--gold-primary);
}

.drop-zone-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.tag-selector-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tag-select {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
}

.custom-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.thumb-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item .thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.85);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.5);
  width: 22px;
  height: 22px;
  font-size: 11px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   CENTER COLUMN: PREVIEW SCREEN & PLAYBACK CONTROLS
   ========================================================================== */
.center-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.preview-stage-container {
  flex: 1;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-bright);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
  min-height: 240px;
}

.visual-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--transition-crossfade);
}

.visual-canvas-layer.active {
  opacity: 1;
}

/* Ambient backdrop blur - fills 16:9 screen with divine glowing aura */
.stage-ambient-blur {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center 20%;
  filter: blur(45px) brightness(0.42) saturate(1.4);
  transform: scale(1.1);
  pointer-events: none;
}

/* Foreground crisp image - 100% full view, zero top/bottom cut */
.stage-foreground-image {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 25px rgba(245, 158, 11, 0.25));
  transition: transform 0.5s ease;
}

/* Projector screen specific inset for foreground so it never touches header or lyrics */
.stage-bg-layer .stage-foreground-image {
  inset: 50px 30px 85px 30px;
}

/* Controller preview specific inset */
.visual-canvas-layer .stage-foreground-image {
  inset: 12px 10px 26px 10px;
}

/* Fit Mode Variations */
/* 1. Full Picture (Default) */
.fit-contain .stage-ambient-blur {
  display: block;
}
.fit-contain .stage-foreground-image {
  background-size: contain !important;
  background-position: center center !important;
}

/* 2. Top Focus (Cover with top 10% anchor) */
.fit-cover-top .stage-ambient-blur {
  display: none;
}
.fit-cover-top .stage-foreground-image {
  inset: 0 !important;
  background-size: cover !important;
  background-position: center 10% !important;
}

/* 3. Fill Screen (Cover centered) */
.fit-cover .stage-ambient-blur {
  display: none;
}
.fit-cover .stage-foreground-image {
  inset: 0 !important;
  background-size: cover !important;
  background-position: center center !important;
}

/* Gentle divine breathing animations */
.stage-bg-layer.active .stage-foreground-image,
.visual-canvas-layer.active .stage-foreground-image {
  animation: divineBreathe 24s infinite alternate ease-in-out;
}

@keyframes divineBreathe {
  0% { transform: scale(1.0); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1.01); }
}

.stage-bg-layer.active .stage-ambient-blur,
.visual-canvas-layer.active .stage-ambient-blur {
  animation: ambientFloat 30s infinite alternate ease-in-out;
}

@keyframes ambientFloat {
  0% { transform: scale(1.1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(0.6deg); }
  100% { transform: scale(1.12) rotate(-0.6deg); }
}

.ambient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.4) 80%, rgba(0, 0, 0, 0.75) 100%);
  z-index: 2;
}

.mantra-banner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(12, 10, 9, 0.88);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(8px);
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-hindi);
  font-size: 0.95rem;
  color: var(--gold-primary);
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Playback Control Bar */
.control-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.control-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn:hover {
  background: #332b25;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.control-btn.active {
  background: var(--gold-primary);
  color: #1a0f00;
  font-weight: bold;
}

.control-select-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.slideshow-timer-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
}

/* ==========================================================================
   BHAJANS & LYRICS TELEPROMPTER
   ========================================================================== */
.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 12px 9px 34px;
  color: var(--text-bright);
  font-size: 0.85rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.bhajan-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.bhajan-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.bhajan-card:active {
  transform: scale(0.98);
}

.bhajan-card:hover {
  background: #2e2621;
  border-color: var(--border-bright);
}

.bhajan-card.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
  border-color: var(--saffron);
}

.bhajan-card-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.bhajan-card-meta {
  display: flex;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.scale-badge {
  color: var(--gold-primary);
}

/* Lyrics Box & Teleprompter */
.lyrics-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 180px;
}

.lyrics-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.lyrics-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lyrics-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--gold-primary);
  font-weight: 600;
}

.lyrics-content {
  overflow-y: auto;
  flex: 1;
  max-height: 240px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-gold);
  white-space: pre-line;
  font-family: var(--font-hindi);
  padding-right: 4px;
}

/* ==========================================================================
   DESKTOP VS TABLET VS MOBILE RESPONSIVE RULES
   ========================================================================== */

/* Large Desktop (>= 1280px) */
@media (min-width: 1280px) {
  .panel-media {
    display: none; /* On desktop, media upload is inside left panel or separate */
  }
}

/* Tablet & Intermediate (769px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-container {
    grid-template-columns: 300px 1fr;
    height: auto;
    overflow-y: auto;
  }
  .panel-lyrics {
    grid-column: span 2;
  }
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS (<= 768px - Phones & Small Handhelds)
   ========================================================================== */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .app-header {
    padding: 8px 10px;
    gap: 8px;
    position: sticky;
    top: 0;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-titles h1 {
    font-size: 0.95rem;
  }

  .header-actions {
    gap: 5px;
  }

  .btn-compact {
    padding: 6px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .action-label {
    display: none; /* Icon + status indicator only on tiny phones */
  }

  /* Mobile Tab Navigation Bar */
  .mobile-tab-nav {
    display: flex;
    position: sticky;
    top: 51px;
    z-index: 95;
    background: rgba(18, 14, 11, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 8px;
    gap: 6px;
    width: 100%;
  }

  .mobile-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .mobile-tab-btn:active {
    transform: scale(0.96);
  }

  .mobile-tab-btn.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    font-weight: 600;
    box-shadow: 0 0 12px var(--gold-glow);
  }

  /* Main Container on Mobile: Vertical Stack */
  .main-container {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 10px;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Center Column (Live Stage Preview & Controls) */
  .center-column {
    order: -1; /* Keep Stage preview & controls at the TOP of the mobile screen */
    width: 100%;
  }

  .preview-stage-container {
    min-height: 170px;
    max-height: 190px;
    border-radius: var(--radius-md);
  }

  .mantra-banner {
    font-size: 0.82rem;
    padding: 4px 12px;
    max-width: 95%;
  }

  /* Mobile Playback Control Bar */
  .control-bar {
    flex-direction: column;
    padding: 10px;
    gap: 8px;
    width: 100%;
  }

  .transport-group {
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .control-btn {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
  }

  .btn-playpause {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
    background: var(--gold-primary);
    color: #120a02;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--gold-glow);
  }

  .settings-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .control-select-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
  }

  .control-select-wrap label {
    font-size: 0.7rem;
  }

  .slideshow-timer-select {
    width: 100%;
    height: 38px;
    padding: 6px 8px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }

  /* Tab switching visibility on mobile */
  .tab-content {
    display: none !important;
    width: 100%;
  }

  .tab-content.active {
    display: flex !important;
  }

  /* Active Deity Bar on Mobile */
  .active-deity-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }

  .active-deity-label {
    white-space: normal;
    text-align: center;
    font-size: 0.85rem;
  }

  .active-deity-btns {
    display: flex;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .active-deity-btns .btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.75rem;
    justify-content: center;
  }

  /* Deity Grid on Mobile */
  .deity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .deity-pad {
    padding: 10px 8px;
    min-height: 70px;
    width: 100%;
    box-sizing: border-box;
  }

  .deity-name-hindi {
    font-size: 0.95rem;
  }

  .deity-name-en {
    font-size: 0.7rem;
  }

  .image-counter {
    font-size: 0.65rem;
  }

  /* Lyrics on Mobile */
  .lyrics-box {
    min-height: 260px;
    padding: 10px;
  }

  .lyrics-content {
    max-height: 350px;
    font-size: 1.05rem;
    line-height: 1.75;
  }

  /* Media Upload on Mobile */
  .custom-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    max-height: 180px;
  }

  .thumb-item .thumb-del {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
}

/* ==========================================================================
   BIG SCREEN / PROJECTOR STANDALONE VIEW (projector.html)
   ========================================================================== */
.projector-body {
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  position: relative;
  cursor: none;
}

.projector-body.show-cursor {
  cursor: default;
}

.stage-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-bg-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.stage-bg-layer.active {
  opacity: 1;
}

.stage-overlay-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.4) 80%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Big Screen Lyrics Display */
.stage-lyrics-container {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 1100px;
  z-index: 10;
  text-align: center;
  background: rgba(12, 10, 9, 0.78);
  border: 1.5px solid var(--border-bright);
  backdrop-filter: blur(14px);
  padding: 24px 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--gold-glow);
  transition: var(--transition-smooth);
}

.stage-lyrics-text {
  font-family: var(--font-hindi);
  font-size: 2.2rem;
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 15px var(--gold-glow);
  white-space: pre-line;
}

.stage-lyrics-translit {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--gold-primary);
  margin-top: 10px;
  font-weight: 500;
  opacity: 0.9;
}

.stage-header-title {
  display: none !important;
}

/* Fullscreen Helper Overlay */
.floating-fullscreen-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  opacity: 0.2;
  transition: var(--transition-fast);
}

.floating-fullscreen-btn:hover {
  opacity: 1;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(217, 119, 6, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}
