/* ═══════════════════════════════════════════════════════════
   DIVINA FM — Styles (Dashboard Redesign)
   Premium dark · Midnight Blue + Gold · Mobile First · Glassmorphism
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Nueva paleta Azul Celestial Profundo */
  --navy-950: #0f172a; /* Deep Celestial Blue */
  --navy-900: #020617; /* Midnight Dark Blue */
  
  /* Tonos dorados intactos (Gloria / Luz) */
  --gold-500: #dcb363; /* Bright Gold */
  --gold-400: #e8ca84; /* Soft Gold */
  --gold-300: #f4e1a5;
  
  /* Textos */
  --text-primary: #fdfbf7; /* Heavenly White */
  --text-secondary: #cbd5e1; /* Soft Slate/Blueish grey */
  
  /* Glassmorphism actualizado a tonos azules */
  --glass-bg: rgba(15, 23, 42, 0.45); /* Transparent Blue Slate */
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-glow: rgba(220, 179, 99, 0.2);
  
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', serif;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.5);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--navy-950);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }
.hidden { display: none !important; }

/* ═══ BACKGROUND VIDEO ═══ */
.video-background {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1; overflow: hidden;
  background: var(--navy-900);
  pointer-events: none;
}
.video-background video {
  width: 100vw; height: 100vh;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
  pointer-events: none;
}
/* Actualizado con gradiente de azules profundos */
.video-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
}

/* ═══ DASHBOARD LAYOUT ═══ */
.dashboard-container {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  max-width: 1280px; margin: 0 auto;
  padding: 24px 16px; gap: 24px;
}

/* ═══ MAIN LOGO ═══ */
.logo-container {
  display: flex; 
  justify-content: center; 
  align-items: center;
  padding: 60px 20px 40px; 
  animation: fade-in-down 1s var(--ease-spring) both; 
  width: 100%;
}

.main-logo {
  height: clamp(80px, 15vw, 180px); 
  width: auto; 
  max-width: 90%; 
  filter: drop-shadow(0 2px 10px rgba(253, 251, 247, 0.15)) drop-shadow(0 0 15px rgba(220, 179, 99, 0.15));
  transition: transform 0.4s var(--ease-spring), filter 0.4s ease; 
}

.main-logo:hover {
  transform: scale(1.05); 
  filter: drop-shadow(0 4px 15px rgba(253, 251, 247, 0.25)) drop-shadow(0 0 25px rgba(220, 179, 99, 0.25));
}

/* ═══ GLASS CARDS ═══ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ═══ CONTENT GRID ═══ */
.content-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  align-content: center;
}

/* Cards Animation */
.verse-card, .reflection-card { display: flex; flex-direction: column; height: 100%; }
.verse-card { animation: fade-in-up 1s var(--ease-spring) 0.1s both; }
.reflection-card { animation: fade-in-up 1s var(--ease-spring) 0.2s both; }

/* ═══ VERSE & REFLECTION CARDS ═══ */
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.card-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--gold-400); background: rgba(212,168,83,0.1);
  padding: 6px 14px; border-radius: 99px;
  border: 1px solid rgba(212,168,83,0.2);
  text-transform: uppercase;
}

/* Verse */
.verse-content { position: relative; text-align: center; margin-bottom: 24px; flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 220px; }
.verse-quote-mark {
  font-family: var(--font-serif); font-size: 6rem; line-height: 1;
  color: var(--gold-500); opacity: 0.15;
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.verse-text {
  font-family: var(--font-serif); font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 400; font-style: italic; line-height: 1.6;
  color: var(--text-primary); margin-bottom: 16px;
  position: relative; z-index: 1;
}
.verse-reference { display: block; font-style: normal; }
.verse-book { font-size: 1rem; font-weight: 600; color: var(--gold-400); letter-spacing: 0.05em; }

.card-actions { display: flex; justify-content: center; gap: 12px; margin-top: auto; }
.action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary); background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 99px;
  transition: all 250ms ease;
}
.action-btn:hover {
  color: var(--gold-400); border-color: var(--gold-500);
  background: rgba(212,168,83,0.1); transform: translateY(-2px);
}

/* Reflection */
.reflection-date {
  font-size: 0.8rem; font-weight: 700; color: var(--text-secondary);
  background: rgba(255,255,255,0.05); padding: 4px 12px; border-radius: 99px;
}
.reflection-title {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 12px; line-height: 1.3;
}
.reflection-text {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px;
}

/* ═══ SINGLE PLAYER ═══ */
.main-player {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 24px; margin-top: auto;
  animation: fade-in-up 1s var(--ease-spring) 0.3s both;
  border-bottom: 4px solid var(--gold-500);
}

.player-info { text-align: center; width: 100%; }
.live-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; color: var(--gold-400);
  margin-bottom: 8px;
}
.live-dot {
  width: 8px; height: 8px; background: #E74C3C; border-radius: 50%;
  animation: live-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(231,76,60,0.6);
}
@keyframes live-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.85)} }

.player-logo { height: 44px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.player-subtitle { font-size: 0.9rem; color: var(--text-secondary); }

/* Visualizer */
.player-visualizer { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 24px; margin: 0 auto; opacity: 0; transition: opacity 0.3s; }
.playing .player-visualizer { opacity: 1; }
.viz-bar { width: 4px; background: var(--gold-400); border-radius: 2px; height: 6px; }
.playing .viz-bar { animation: viz-bounce 0.7s ease-in-out infinite alternate; }
.viz-bar:nth-child(1){animation-delay:0ms}.viz-bar:nth-child(2){animation-delay:150ms}
.viz-bar:nth-child(3){animation-delay:300ms}.viz-bar:nth-child(4){animation-delay:100ms}
.viz-bar:nth-child(5){animation-delay:250ms}
@keyframes viz-bounce { 0%{height:4px} 100%{height:24px} }

/* Controls */
.play-btn {
  width: 72px; height: 72px; min-width: 72px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  border-radius: 50%; color: var(--navy-900);
  box-shadow: 0 8px 24px rgba(212,168,83,0.3);
  transition: all 300ms var(--ease-spring);
}
.play-btn:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(212,168,83,0.5); }
.play-btn:active { transform: scale(0.95); }

/* Volume */
.player-volume { display: none; align-items: center; gap: 12px; width: 100%; max-width: 200px; }
.volume-btn { color: var(--text-secondary); transition: color 200ms; }
.volume-btn:hover { color: var(--text-primary); }
.volume-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: rgba(255,255,255,0.1); border-radius: 2px; outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  background: var(--gold-500); border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ═══ RESPONSIVE DASHBOARD ═══ */
@media(min-width: 768px) {
  .dashboard-container { padding: 40px; justify-content: center; }
  
  .content-grid { grid-template-columns: 1fr 1fr; align-items: stretch; margin-top: 20px; }
  
  .main-player {
    flex-direction: row; justify-content: center; align-items: center;
    padding: 0; margin: 60px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
  }
  .main-player::before { display: none !important; }
  .main-player:hover { transform: none; box-shadow: none; }
  .player-info, .player-visualizer, .player-volume { display: none !important; }
  
  .play-btn { 
    width: 140px; height: 140px; min-width: 140px; 
    box-shadow: 0 0 0 10px rgba(220, 179, 99, 0.15), 0 0 0 24px rgba(220, 179, 99, 0.05), 0 20px 40px rgba(0,0,0,0.5); 
    position: relative;
    animation: float-play 4s ease-in-out infinite;
  }
  
  .play-btn::before, .play-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 3px solid var(--gold-500);
    z-index: -1;
  }
  
  .play-btn::before {
    animation: liquid-pulse-1 4s linear infinite;
  }
  
  .play-btn::after {
    animation: liquid-pulse-2 4s linear infinite;
    animation-delay: 2s;
    border-color: var(--gold-400);
  }

  .play-btn:hover { 
    transform: scale(1.05); 
    animation-play-state: paused;
    box-shadow: 0 0 0 16px rgba(220, 179, 99, 0.2), 0 0 0 32px rgba(220, 179, 99, 0.1), 0 30px 60px rgba(0,0,0,0.6); 
  }
  .play-icon, .pause-icon { width: 64px; height: 64px; }
}

@media(max-width: 767px) {
  .dashboard-container { padding-bottom: 120px; /* Space for sticky player */ }
  
  /* Gradiente móvil actualizado a azules profundos */
  .main-player {
    position: fixed; bottom: 0; left: 0; right: 0;
    margin: 0; border-radius: 24px 24px 0 0;
    border-bottom: none; border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-top: 2px solid var(--gold-500);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
    flex-direction: row; padding: 16px 20px;
    z-index: 1000;
  }
  .player-info { text-align: left; flex: 1; }
  .player-logo { height: 28px; margin-bottom: 4px; }
  .player-subtitle { font-size: 0.8rem; }
  .play-btn { width: 64px; height: 64px; min-width: 64px; box-shadow: 0 4px 16px rgba(220, 179, 99, 0.4); }
  .play-icon, .pause-icon { width: 32px; height: 32px; }
  .player-visualizer { display: none; }
  .live-indicator { display: none; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float-play {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes liquid-pulse-1 {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; border-radius: 50%; }
  50% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; opacity: 0.4; }
  100% { transform: scale(2.2) rotate(180deg); opacity: 0; border-radius: 30% 70% 50% 50% / 50% 30% 70% 50%; }
}
@keyframes liquid-pulse-2 {
  0% { transform: scale(1) rotate(0deg); opacity: 0.5; border-radius: 50%; }
  50% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; opacity: 0.2; }
  100% { transform: scale(2.8) rotate(-180deg); opacity: 0; border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}