/* VARIABLES ESTÉTICAS 100% PLANAS, SIN SOMBRAS Y ULTRA-NÍTIDAS (FLAT DESIGN) */
:root {
  --bg-page: #FAF8F5;         /* Crema marfil ultra-suave, reduce brillo */
  --bg-card: #FFFFFF;         /* Blanco puro para tarjetas */
  
  /* Burbujas de diálogo con bordes sólidos y definidos, sin sombras difusas */
  --bg-say: #FFF0F1;          /* Burbuja rosa-blush suave para leer */
  --bg-say-border: #E5A3A6;   /* Borde rosa sólido y definido */
  
  --bg-do: #F2F7F1;           /* Burbuja verde menta suave para consejos */
  --bg-do-border: #8CB884;    /* Borde verde menta sólido y definido */
  
  --text-primary: #2C2623;     /* Carbón oscuro suave */
  --text-secondary: #6A605B;   /* Gris medio para detalles */
  --text-say: #1A1412;         /* Letra carbón muy definida y de alto contraste */
  
  --border-color: #E6DCD0;    /* Borde de división champaña sutil y plano */
  --accent-gold: #CCA474;     /* Oro champaña */
  --accent-gold-light: #F9F5F0;
  --accent-rose: #E2B4B7;     /* Oro rosa */
  --accent-rose-light: #FFF5F5;
  
  --success: #8CB884;         /* Verde completado */
  --success-light: #F2F8F1;
  
  /* TIPOGRAFÍA ÚNICA INTER (LA MÁS NÍTIDA Y FÁCIL DE LEER, SIN SERIF) */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  
  --text-scale: 1.0;          /* Escalador interactivo de fuentes */
  --transition: all 0.15s ease-in-out;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* CONTENEDOR PRINCIPAL */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* Encabezado */
header.app-header {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color); /* Borde plano */
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.header-title h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.header-title p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.text-scale-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.text-scale-controls {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

.scale-btn {
  border: none;
  background: none;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.scale-btn:not(:last-child) {
  border-right: 2px solid var(--border-color);
}

.scale-btn:hover {
  background-color: var(--accent-gold-light);
}

.scale-btn.active {
  background-color: var(--accent-gold);
  color: #ffffff;
}

/* SPLIT LAYOUT */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* BARRA LATERAL (SIDEBAR DE PASOS) */
aside.app-sidebar {
  width: 320px;
  background-color: var(--bg-card);
  border-right: 2px solid var(--border-color); /* Borde plano */
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 8;
}

.sidebar-progress {
  padding: 18px 20px;
  border-bottom: 2px solid var(--border-color);
  background-color: var(--bg-page);
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-bar-container {
  height: 8px;
  background-color: #e6dcd0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-gold));
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 3px;
  border: 2px solid transparent;
}

.nav-item:hover {
  background-color: var(--bg-page);
}

.nav-item.active {
  background-color: var(--accent-gold-light);
  border-color: rgba(204, 164, 116, 0.4);
}

.nav-item.active .nav-step-title {
  font-weight: 800;
  color: var(--text-primary);
}

.nav-item-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background-color: var(--bg-card);
  transition: var(--transition);
}

.nav-item.completed .nav-item-check {
  border-color: var(--success);
  background-color: var(--success);
  color: #ffffff;
}

.nav-item.completed .nav-item-check svg {
  display: block;
}

.nav-item-check svg {
  display: none;
  width: 10px;
  height: 10px;
  stroke-width: 4px;
}

.nav-step-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav-step-num {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.nav-step-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

/* CONTENIDO DEL GUION (DERECHA) */
main.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.content-wrapper {
  width: 100%;
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fade-slide-in {
  animation: fadeSlideIn 0.15s ease-out;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

/* TARJETA DEL GUION - TOTALMENTE PLANA */
.step-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color); /* Borde plano */
  border-radius: 16px;
  box-shadow: none; /* Sin sombras */
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

/* Encabezado */
.step-card-header {
  margin-bottom: 22px;
  border-bottom: 2px solid var(--border-color); /* Borde plano */
  padding-bottom: 16px;
}

.step-card-kicker {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.step-card-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.step-card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
}

/* Música */
.music-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-rose-light);
  border: 2px solid rgba(226, 180, 183, 0.5); /* Borde sólido */
  color: #92585b;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  align-self: flex-start;
  transition: var(--transition);
}

.music-pill:hover {
  background-color: var(--accent-rose);
  color: var(--text-primary);
}

.music-pill svg {
  width: 14px;
  height: 14px;
}

/* Secciones de Bloques */
.speech-section {
  margin-bottom: 18px;
}

.speech-label {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.speech-label svg {
  color: var(--accent-rose);
  width: 14px;
  height: 14px;
}

/* BURBUJAS DE DIÁLOGO "GLOBOS" - PLANAS, ULTRA-NÍTIDAS, SIN SOMBRAS Y EN LETRA MEDIUM */
.speech-bubble-say {
  background-color: var(--bg-say);
  border: 2px solid var(--bg-say-border); /* Borde plano */
  border-left-width: 6px;
  border-radius: 12px;
  padding: 24px 30px;
  margin-bottom: 18px;
  box-shadow: none;
}

.speech-bubble-say p {
  /* FUENTE EN PESO MEDIUM (500) - PERFECTAMENTE CRISP, NO FUZZY, SUPER NÍTIDA */
  font-size: calc(2.1rem * var(--text-scale));
  line-height: 1.55;
  font-weight: 500;
  color: var(--text-say);
  letter-spacing: -0.1px;
}

/* Resaltar nombres o palabras críticas */
.speech-bubble-say b {
  color: #000000;
  font-weight: 800;
  background-color: rgba(204, 164, 116, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Burbuja del discurso de Cielo */
.speech-bubble-cielo {
  background-color: var(--accent-gold-light);
  border: 2px solid var(--accent-gold);
  border-left-width: 6px;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 10px;
  margin-bottom: 18px;
  box-shadow: none;
}

.speech-bubble-cielo p {
  font-size: calc(1.5rem * var(--text-scale));
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-primary);
  font-style: italic;
}

/* Burbuja de Consejos */
.action-bubble {
  background-color: var(--bg-do);
  border: 2px solid var(--bg-do-border);
  border-left-width: 6px;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: none;
}

.action-bubble p {
  font-size: calc(1.1rem * var(--text-scale));
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 600;
}

/* Checkbox de la Tarjeta */
.card-footer-check {
  margin-top: auto;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background-color: var(--bg-card);
}

.checkbox-input:checked + .checkbox-custom {
  border-color: var(--success);
  background-color: var(--success);
}

.checkbox-custom svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 4.5px;
  display: none;
}

.checkbox-input:checked + .checkbox-custom svg {
  display: block;
}

.checkbox-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-secondary);
  transition: var(--transition);
}

.checkbox-input:checked ~ .checkbox-label {
  color: var(--success);
}

/* PORTADA DE INICIO (PASO 0) */
.cover-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cover-header {
  text-align: center;
  padding: 16px 0;
  border-bottom: 2px solid var(--border-color);
}

.cover-kicker {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent-gold);
}

.cover-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.8px;
}

.cover-subtitle {
  font-size: 1.0rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Grid de Datos */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.meta-box {
  background-color: var(--accent-gold-light);
  border: 2px solid rgba(204, 164, 116, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
}

.meta-box-label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.meta-box-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Guía de lectura */
.instructions-box {
  background-color: var(--bg-page);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 22px;
}

.instructions-box h3 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instructions-list li {
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  gap: 8px;
  font-weight: 600;
}

.instructions-list li::before {
  content: "✦";
  color: var(--accent-gold);
  font-weight: 900;
}

/* Lista de Cotejo Inicial (Checklist) */
.checklist-section {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.checklist-section h3 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checklist-counter {
  font-size: 0.75rem;
  font-weight: 900;
  background-color: var(--accent-rose-light);
  color: var(--accent-rose);
  padding: 4px 10px;
  border-radius: 10px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .checklist-grid {
    grid-template-columns: 1fr;
  }
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-page);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  transition: var(--transition);
}

.checklist-item:hover {
  background-color: var(--accent-gold-light);
}

.checklist-item.checked {
  background-color: var(--success-light);
  border-color: rgba(154, 180, 149, 0.3);
}

.checklist-item-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  transition: var(--transition);
  flex-shrink: 0;
}

.checklist-item.checked .checklist-item-check {
  background-color: var(--success);
  border-color: var(--success);
}

.checklist-item-check svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 4.5px;
  display: none;
}

.checklist-item.checked .checklist-item-check svg {
  display: block;
}

.checklist-item-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.checklist-item.checked .checklist-item-label {
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* FÓRMULAS DE APOYO */
.phrases-view h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.phrases-view > p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 20px;
}

.phrases-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phrase-card {
  background-color: var(--bg-page);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  transition: var(--transition);
}

.phrase-card:hover {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-light);
}

.phrase-card h3 {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.phrase-card p {
  font-size: calc(1.3rem * var(--text-scale));
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
}

/* BARRA INFERIOR DE NAVEGACIÓN - PLANA */
.navigation-bar {
  padding: 10px 20px 12px;
  background-color: var(--bg-page);
  border-top: 2px solid var(--border-color); /* Borde plano */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.nav-btn-group {
  display: flex;
  gap: 12px;
}

.navigation-bar .btn {
  min-width: 140px;
  height: 48px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: none; /* Sin sombras */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border-color); /* Plano */
  background-color: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition);
  user-select: none;
}

.navigation-bar .btn:hover {
  background-color: var(--accent-gold-light);
  border-color: var(--accent-gold);
}

.navigation-bar .btn-primary {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: none; /* Sin sombras */
}

.navigation-bar .btn-primary:hover {
  background-color: #be976b;
  border-color: #be976b;
}

/* Menú móvil */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background-color: var(--accent-gold);
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  box-shadow: none; /* Sin sombras */
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(61, 54, 51, 0.25);
  z-index: 7;
  backdrop-filter: blur(1.5px);
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  header.app-header {
    padding: 8px 16px;
  }

  .header-title h1 {
    font-size: 1.1rem;
  }

  .header-title p {
    font-size: 0.65rem;
  }

  .text-scale-label {
    font-size: 0.65rem;
  }

  .scale-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  aside.app-sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    bottom: 0;
    height: 100vh;
    border-right: 2px solid var(--border-color);
  }

  aside.app-sidebar.mobile-open {
    left: 0;
  }

  .sidebar-overlay.mobile-open {
    display: block;
  }

  .mobile-menu-toggle {
    display: flex;
    bottom: 60px; /* Evita tapar botones compactos */
    right: 16px;
  }

  main.app-content {
    padding: 12px; /* Más compacto */
  }

  .step-card {
    padding: 20px; /* Más compacto */
    border-radius: 12px;
  }

  .step-card-title {
    font-size: 1.35rem; /* Más balanceado */
  }

  .step-card-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .speech-bubble-say {
    padding: 14px 18px; /* Más compacto */
    margin-bottom: 12px;
  }
  
  .speech-bubble-say p {
    font-size: calc(1.4rem * var(--text-scale));
  }

  .action-bubble {
    padding: 12px 18px;
  }

  .action-bubble p {
    font-size: calc(0.95rem * var(--text-scale));
  }

  .navigation-bar {
    padding: 8px 12px 8px; /* Súper compacto */
  }

  .navigation-bar .btn {
    min-width: 90px;
    height: 38px; /* Botón súper estilizado y compacto */
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

/* ==========================================================================
   ESTILOS DEL REPRODUCTOR FLOTANTE PREMIUM (PLANOS, SIN SOMBRAS)
   ========================================================================== */
#audio-player-wrapper {
  position: fixed;
  bottom: 85px;
  right: 24px;
  z-index: 100;
  font-family: var(--font-primary);
}

#player-float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

#player-float-btn:hover {
  background-color: var(--bg-say-border);
  transform: scale(1.05);
}

#player-float-btn:active {
  transform: scale(0.95);
}

.music-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.playing-bars {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.playing-bars span {
  width: 3px;
  height: 100%;
  background-color: var(--text-primary);
  animation: bounceBars 0.8s ease-in-out infinite alternate;
  transform-origin: bottom;
}

.playing-bars span:nth-child(2) { animation-delay: 0.2s; }
.playing-bars span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceBars {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

#audio-player-wrapper.is-playing .music-note-icon {
  display: none;
}

#audio-player-wrapper.is-playing .playing-bars {
  display: flex;
}

#player-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  background-color: var(--bg-card);
  border: 2px solid var(--text-primary);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
  opacity: 1;
  transform: scale(1);
}

#player-panel.collapsed {
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  pointer-events: none;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.player-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.close-panel-btn {
  border: none;
  background: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 2px 6px;
}

.close-panel-btn:hover {
  color: var(--text-primary);
}

.active-track-info {
  text-align: center;
  margin-bottom: 12px;
  background-color: var(--bg-page);
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

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

.track-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.progress-container {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 4px;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--accent-gold);
  width: 0%;
  transition: width 0.1s linear;
}

.time-container {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.ctrl-btn {
  background: none;
  border: 2px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.ctrl-btn:hover {
  border-color: var(--text-primary);
  background-color: var(--accent-gold-light);
}

.ctrl-btn.play-btn {
  width: 48px;
  height: 48px;
  background-color: var(--accent-gold);
  border-color: var(--text-primary);
  color: #ffffff;
}

.ctrl-btn.play-btn:hover {
  background-color: #be976b;
}

.ctrl-btn.active {
  background-color: var(--bg-say);
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 10px;
}

.volume-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition);
}

.volume-btn:hover {
  color: var(--text-primary);
}

.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.mini-playlist {
  border-top: 2px solid var(--border-color);
  padding-top: 12px;
}

.playlist-header {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.playlist-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
}

.playlist-items::-webkit-scrollbar {
  width: 4px;
}
.playlist-items::-webkit-scrollbar-track {
  background: var(--bg-page);
}
.playlist-items::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  background-color: var(--bg-page);
}

.playlist-item:hover {
  background-color: var(--accent-gold-light);
}

.playlist-item.active {
  background-color: var(--bg-say);
  border-color: var(--bg-say-border);
}

.playlist-item-num {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  width: 14px;
  text-align: center;
}

.playlist-item.active .playlist-item-num {
  color: var(--accent-rose);
}

.playlist-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.playlist-item-artist {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.playlist-item-play-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
  opacity: 0.5;
}

.playlist-item.active .playlist-item-play-icon {
  color: var(--accent-rose);
  opacity: 1;
}

@media (max-width: 900px) {
  #audio-player-wrapper {
    bottom: 85px;
    right: 16px;
  }
  #player-panel {
    width: 290px;
    bottom: 65px;
    right: 0;
  }
}
