:root {
    --primary-blue: #002266;
    --dark-blue: #001133;
    --primary-gold: #D4AF37;
    --bright-gold: #FFD700;
    --accent-gold: #FFE066;
    --bg-color: #f1f5f9;
    --sidebar-width: 320px;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    height: 100vh;
    height: 100dvh;
    display: flex;
    overflow: hidden;
    color: var(--text-main);
}

/* SIDEBAR */
aside {
    width: var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    padding: 20px 15px;
    color: var(--bright-gold);
    text-align: center;
    border-bottom: 4px solid var(--primary-gold);
    flex-shrink: 0;
}

.sidebar-header h1 {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 800;
}

.home-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 8px;
    transition: color 0.2s;
    font-weight: 600;
}
.home-link:hover {
    color: var(--bright-gold);
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 25px;
    border: 2px solid var(--primary-gold);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
}

.search-box input:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.4), 0 2px 8px rgba(0,0,0,0.15);
}

.menu-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-section {
    border-bottom: 1px solid #f1f5f9;
}

.menu-title {
    padding: 14px 20px;
    font-weight: 700;
    color: var(--primary-blue);
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.menu-title:hover {
    background: #e2e8f0;
}

.menu-content {
    display: none;
    background: white;
}

.menu-content.open {
    display: block;
}

.song-item {
    padding: 12px 25px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    font-size: 0.92rem;
    color: #334155;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.song-item:hover {
    background-color: #fffbeb;
    color: var(--primary-blue);
    padding-left: 30px;
}

.song-item.active {
    background-color: rgba(0, 34, 102, 0.08);
    border-left: 4px solid var(--primary-blue);
    font-weight: 700;
    color: var(--primary-blue);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
    text-align: center;
    flex-shrink: 0;
}

.drive-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    color: var(--primary-blue);
    padding: 9px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.drive-btn:hover {
    background-color: var(--primary-gold);
    color: var(--dark-blue);
    border-color: var(--primary-gold);
}

/* MAIN CONTENT */
main {
    flex: 1;
    display: block;
    background-color: #e2e8f0;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
    height: 100%;
}

.main-content-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 25px 20px 150px;
    min-height: 100%;
}

.estandarte-container {
    background-color: #ffffff;
    width: 100%;
    min-height: 80vh;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.estandarte-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../image_d0e8af.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    gap: 15px;
    background-color: #ffffff;
    border: 2px solid var(--primary-blue);
    outline: 2px solid var(--primary-gold);
    outline-offset: -4px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
}

.header-left {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
}

.header-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--primary-gold);
    object-fit: cover;
}

.category-badge {
    background: var(--primary-blue);
    color: var(--bright-gold);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 4px;
}

.song-title-display {
    color: var(--primary-blue);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.composers {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 3px;
    display: block;
}

.header-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Tone Controls */
.tone-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.tone-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tone-btn:hover {
    background: #001133;
}

.tone-display {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-blue);
    padding: 0 6px;
    min-width: 45px;
    text-align: center;
}

/* Font Size Controls */
.zoom-controls {
    display: flex;
    gap: 4px;
}

.zoom-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--primary-blue);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.zoom-btn:hover {
    background: #e2e8f0;
}

/* Lyrics & Chords Display */
.lyrics-display {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #1e293b;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.lyrics-display.chords-mode {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    line-height: 1.9;
}

/* Chords Highlighting */
.chord {
    color: #b45309;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    background: rgba(254, 240, 138, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 2px;
    cursor: pointer;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.chord:hover {
    background: rgba(253, 224, 71, 0.9);
}

.chord-block {
    background: #f8fafc;
    border-left: 4px solid var(--primary-gold);
    padding: 10px 14px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    color: #475569;
    font-size: 0.92em;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

/* Media Players */
.media-player-container {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.media-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-iframe {
    width: 100%;
    height: 90px;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--primary-blue);
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.big-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--primary-gold);
    margin-bottom: 25px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Mobile Back Button */
.back-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 10px 0;
    margin-bottom: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    aside {
        position: absolute;
        width: 100%;
        height: 100%;
        transform: translateX(0);
    }
    aside.hidden {
        transform: translateX(-100%);
    }
    .back-btn { display: flex; }
    .estandarte-container { padding: 25px 18px; }
    .content-header { flex-direction: column; align-items: flex-start; }
    .header-tools { width: 100%; justify-content: space-between; margin-top: 10px; }
}
