/* ─────────────────────────────────────────────────────
   GHOSTT PLATFORM - Estilos globales
   Paleta oscura profesional inspirada en el ambiente
   de producción musical y DJ sets
   ───────────────────────────────────────────────────── */

/* Variables de diseño — Tema Oscuro (default) */
:root {
    --bg-primary:    #0a0a0f;
    --bg-secondary:  #12121a;
    --bg-card:       #1a1a26;
    --bg-card-hover: #1f1f30;
    --accent:        #FF5722;       /* naranja Ghost */
    --accent-dark:   #E64A19;       /* naranja hover */
    --accent-glow:   #FF8A65;       /* naranja claro */
    --accent-light:  rgba(255, 87, 34, 0.15);
    --text-primary:  #f0f0f8;
    --text-secondary:#a0a0b8;
    --text-muted:    #606078;
    --border:        rgba(255, 87, 34, 0.2);
    --border-light:  rgba(255,255,255, 0.06);
    --success:       #10b981;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --radius:        10px;
    --radius-lg:     16px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow:   0 0 20px rgba(255,87,34,0.3);
    --navbar-bg:     rgba(10, 10, 15, 0.92);
}

/* ─── TEMA: Claro ─── */
[data-theme="light"] {
    --bg-primary:    #FFFFFF;
    --bg-secondary:  #F0F0F0;
    --bg-card:       #F5F5F5;
    --bg-card-hover: #EBEBEB;
    --accent:        #FF5722;
    --accent-dark:   #E64A19;
    --accent-glow:   #D84315;
    --accent-light:  rgba(255, 87, 34, 0.10);
    --text-primary:  #1A1A1A;
    --text-secondary:#444444;
    --text-muted:    #888888;
    --border:        rgba(255, 87, 34, 0.3);
    --border-light:  rgba(0, 0, 0, 0.08);
    --shadow:        0 4px 24px rgba(0,0,0,0.12);
    --shadow-glow:   0 0 20px rgba(255,87,34,0.2);
    --navbar-bg:     rgba(255, 255, 255, 0.96);
}

/* ─── TEMA: Atardecer ─── */
[data-theme="sunset"] {
    --bg-primary:    #1A0A00;
    --bg-secondary:  #251200;
    --bg-card:       #2D1B00;
    --bg-card-hover: #3A2200;
    --accent:        #FF6D3A;
    --accent-dark:   #FF5722;
    --accent-glow:   #FFAB70;
    --accent-light:  rgba(255, 109, 58, 0.15);
    --text-primary:  #FFE0CC;
    --text-secondary:#FFBB8A;
    --text-muted:    #A06040;
    --border:        rgba(255, 109, 58, 0.3);
    --border-light:  rgba(255, 150, 80, 0.1);
    --shadow:        0 4px 24px rgba(0,0,0,0.6);
    --shadow-glow:   0 0 20px rgba(255,109,58,0.4);
    --navbar-bg:     rgba(45, 21, 0, 0.95);
}

/* ─── TEMA: Transición suave al cambiar ─── */
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 0.5s ease, color 0.5s ease,
                border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* ─── TEMA: Overrides específicos modo Claro ─── */
[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #444;
    border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1A1A1A;
}
[data-theme="light"] .nav-hamburger {
    border-color: rgba(0, 0, 0, 0.12);
    color: #1A1A1A;
}
[data-theme="light"] .nav-hamburger:hover { background: rgba(0,0,0,0.06); }
[data-theme="light"] .navbar-links a      { color: #555; }
[data-theme="light"] .navbar-links a:hover { color: #1A1A1A; }
[data-theme="light"] .spinner {
    border-color: rgba(0,0,0,0.15);
    border-top-color: var(--accent);
}
[data-theme="light"] .progress-bar-bg { background: rgba(0,0,0,0.08); }
[data-theme="light"] .tag {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #555;
}
[data-theme="light"] .player-wrapper { background: #E8E8E8; }
[data-theme="light"] .modal-close:hover { color: #1A1A1A; }
[data-theme="light"] .auth-tab { color: #888; }
[data-theme="light"] .auth-tab:hover { color: #555; }
[data-theme="light"] .auth-input { background: #EFEFEF; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .search-input { background: #F5F5F5; border-color: rgba(0,0,0,0.1); color: #1A1A1A; }
[data-theme="light"] .filter-select { background: #F5F5F5; border-color: rgba(0,0,0,0.1); color: #444; }
[data-theme="light"] .hero-badge { background: rgba(255,87,34,0.08); }
[data-theme="light"] .hero { background: radial-gradient(ellipse at 50% 0%, rgba(255,87,34,0.07) 0%, transparent 65%); }

/* ─── TEMA: Selector de temas ─── */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0.2rem;
    flex-shrink: 0;
}
.theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.theme-btn:hover { background: rgba(255, 87, 34, 0.15); }
.theme-btn.active { background: var(--accent); }

/* Reset y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── TIPOGRAFÍA ─── */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }

a { color: var(--accent-glow); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── LAYOUT ─── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 4rem 0; }

/* ─── NAVBAR ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, var(--accent-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-links { display: flex; gap: 1.5rem; align-items: center; }
.navbar-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}
.navbar-links a:hover { color: var(--text-primary); text-decoration: none; }

/* ─── HERO ─── */
.hero {
    text-align: center;
    padding: 5rem 0 3rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,87,34,0.12) 0%, transparent 65%);
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 1rem 0 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.hero-badge {
    display: inline-block;
    background: var(--accent-light);
    border: 1px solid var(--border);
    color: var(--accent-glow);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

/* ─── FILTROS Y BÚSQUEDA ─── */
.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    align-items: center;
    padding-right: 2rem;
}

.search-input {
    flex: 1;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-secondary);
    padding: 0.7rem 2rem 0.7rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--accent); color: var(--text-primary); }

/* ─── GRILLA DE TRACKS ─── */
.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ─── TARJETA DE TRACK ─── */
.track-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.track-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 87, 34, 0.42);
    box-shadow: 0 10px 36px rgba(255, 87, 34, 0.18), 0 0 24px rgba(255, 87, 34, 0.12);
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.track-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.track-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.track-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.track-price {
    background: var(--accent-light);
    border: 1px solid var(--border);
    color: var(--accent-glow);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
}

.track-price-pen {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-right: 0.1rem;
    white-space: nowrap;
}

.track-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 500;
}
.tag-bpm { color: var(--warning); border-color: rgba(245,158,11,0.25); }
.tag-key { color: var(--accent-glow); border-color: rgba(255,87,34,0.3); }

/* ─── REPRODUCTOR DE PREVIEW ─── */
.player-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    color: white;
    font-size: 1rem;
}
.play-btn:hover { background: var(--accent-glow); transform: scale(1.08); }
.play-btn.playing { background: var(--danger); }

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.progress-bar-bg {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.player-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.preview-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ─── BOTONES ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.3rem;
    min-height: 44px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); text-decoration: none; }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── MODAL DE COMPRA ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    place-items: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: grid; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: min(480px, 92vw);
    box-shadow: var(--shadow), var(--shadow-glow);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
}
.modal-close:hover { color: var(--text-primary); }

/* ─── ALERTAS ─── */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}
.alert.show { display: block; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert-error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: var(--danger);  }

/* ─── LOADING SPINNER ─── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── EMPTY STATE ─── */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }

/* ─── FOOTER ─── */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4rem;
}

/* ─── BOTÓN DESCARGAR (tarjeta de track ya comprado) ─── */
.btn-download-card {
    background: rgba(16,185,129,0.12);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.3);
    width: 100%;
}
.btn-download-card:hover {
    background: var(--success);
    color: white;
    transform: translateY(-1px);
}

/* ─── MODAL DE AUTENTICACIÓN ─── */
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 0;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.auth-tab:hover  { color: var(--text-secondary); }
.auth-tab.active { color: var(--accent-glow); border-bottom-color: var(--accent-glow); }

.auth-field { margin-bottom: 1rem; }
.form-lbl {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-muted); }

/* ─── HAMBURGER NAV BUTTON ─── */
.nav-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.08); border-color: var(--border); }

/* ─── RESPONSIVE — 768 px ─── */
@media (max-width: 768px) {

    /* Hamburger visible */
    .nav-hamburger { display: flex; }

    /* Navbar container puede envolver */
    .navbar .container { flex-wrap: wrap; }

    /* Links: ocultos por defecto, se despliegan al añadir .nav-open */
    .navbar-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 0 0.5rem;
        gap: 0.75rem;
        border-top: 1px solid var(--border-light);
        margin-top: 0.5rem;
    }
    .navbar-links.nav-open { display: flex; }

    /* Botones del nav a ancho completo en móvil */
    .navbar-links .btn { width: 100%; justify-content: center; }
    .navbar-links #authNav,
    .navbar-links #userNav { width: 100%; display: flex !important; flex-direction: column; gap: 0.5rem; }

    /* Hero reducido */
    .hero { padding: 2.5rem 0 1.5rem; }
    .hero-subtitle { font-size: 1rem; }

    /* Secciones con menos padding */
    .section { padding: 2rem 0; }

    /* Filtros apilados */
    .filters { flex-direction: column; }
    .search-input { min-width: unset; width: 100%; }
    .filter-select { width: 100%; }

    /* Catálogo en 1 columna */
    .tracks-grid { grid-template-columns: 1fr; }

    /* Admin: form-row en columna única */
    .form-row { grid-template-columns: 1fr; }

    /* Stats del admin apiladas */
    .stats-bar { flex-wrap: wrap; gap: 1rem; }

    /* Stats de mi-cuenta apiladas */
    .stats-row { flex-wrap: wrap; gap: 1rem; justify-content: center; }

    /* Cuenta header apilado */
    .cuenta-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .cuenta-header .btn { width: 100%; justify-content: center; }

    /* Tabla de admin → cards */
    .tracks-table,
    .tracks-table tbody,
    .tracks-table tr,
    .tracks-table td { display: block; width: 100%; }
    .tracks-table thead  { display: none; }
    .tracks-table tr {
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        border-radius: var(--radius);
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }
    .tracks-table tr:hover td { background: transparent; }
    .tracks-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    .tracks-table td:last-child { border-bottom: none; padding-top: 0.6rem; }
    .tracks-table td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        white-space: nowrap;
        flex-shrink: 0;
    }
    /* Primera celda (título/artista): sin etiqueta, estilo bloque */
    .tracks-table td:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 0.6rem;
        margin-bottom: 0.1rem;
    }
    .tracks-table td:first-child::before { display: none; }
    /* Celda de acciones: sin etiqueta */
    .tracks-table td:last-child::before { display: none; }

    /* Botones touch-friendly mínimo 44 px */
    .btn-sm { min-height: 44px; padding: 0.5rem 0.9rem; font-size: 0.85rem; }

    /* Modal como bottom sheet */
    .modal {
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 1.5rem 1.25rem;
        max-height: 90vh;
        overflow-y: auto;
        margin: 0;
    }
    .modal-overlay.active {
        display: flex;
        align-items: flex-end;
    }

    /* Login card pantalla completa */
    .login-card {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
        border: none;
        padding: 2rem 1.5rem;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════
   ANIMACIONES — Scroll Reveal · Page Transitions · Ripple
   (animations.js depende de estas clases)
   ═══════════════════════════════════════════════════════ */

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Restaurar la transición de hover rápida en cards después de su reveal */
.track-card.reveal.visible,
.biblioteca-card.reveal.visible {
    transition: opacity 0.3s ease, transform 0.2s ease,
                border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Transición de página ── */
@keyframes ghostPageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}
body { animation: ghostPageIn 0.35s ease forwards; }

body.page-exit {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
}

/* ── Efecto Ripple en botones ── */
.btn { position: relative; overflow: hidden; }

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0);
    animation: ghostRipple 0.55s ease-out forwards;
    pointer-events: none;
}
@keyframes ghostRipple {
    to { transform: scale(4); opacity: 0; }
}

/* ─── SELECTOR DE TEMA FLOTANTE ─── */
.theme-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    gap: 0.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0.3rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.theme-fab:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.06);
}
.theme-fab .theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.theme-fab .theme-btn:hover  { background: var(--accent-light); }
.theme-fab .theme-btn.active { background: var(--accent); }

/* ─── RESPONSIVE — 480 px ─── */
@media (max-width: 480px) {
    .container  { padding: 0 1rem; }
    .navbar-brand { font-size: 1.25rem; }
    .track-card { padding: 1.25rem; }
    .panel      { padding: 1.25rem; }
}

/* ─── CASSETTE CARD ─────────────────────────────────────────── */

.cassette-card { padding: 0; overflow: hidden; }

.cassette-card .track-header,
.cassette-card .track-meta,
.cassette-card .player-wrapper { padding-left: 1.25rem; padding-right: 1.25rem; }

.cassette-card .track-header { padding-top: 1rem; }
.cassette-card > .btn         { margin: 0 1.25rem 1rem; width: calc(100% - 2.5rem); }

/* Portada con imagen real — aspect ratio 16:9 */
.track-cover-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}
/* Portada placeholder sin imagen — altura compacta */
.track-cover-wrapper--placeholder {
    aspect-ratio: unset;
    height: 100px;
    max-height: 120px;
}
.track-cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.track-cover-wrapper:hover img { transform: scale(1.05); }

/* Placeholder cassette SVG */
.track-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
}
.track-cover-placeholder svg { width: 44px; height: 44px; opacity: 0.28; }

/* ── Barra inferior cassette — decoración tipo cassette al pie del card ── */
.cassette-reels {
    display: flex;
    align-items: center;
    padding: 10px 1.5rem 13px;
    background: rgba(0, 0, 0, 0.20);
    border-top: 1px solid var(--border-light);
}
.cassette-reel {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    position: relative;
    flex-shrink: 0;
}
.cassette-reel::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
}
.cassette-reel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.55;
    transform: translate(-50%, -50%);
}
.cassette-tape-line {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 10px;
    border-radius: 1px;
}

/* Animación ruedas al reproducir */
@keyframes reelSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.cassette-reel.spinning { animation: reelSpin 1.8s linear infinite; }

/* Waveform canvas */
.waveform-canvas {
    width: 100%;
    height: 36px;
    display: block;
    cursor: pointer;
    border-radius: 4px;
}
