* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(180deg, #8a3800 0%, #4a1c00 100%); /* naranja oscuro */
    color: #ffffff;
    font-family: "Courier New", Courier, monospace;
}

.app-shell {
    display: flex;
    width: 100%;
    /*max-width: 1400px;*/
    margin: 0 auto;
}

/* Sidebar izquierdo */
.sidebar {
    width: 180px;
    padding: 1.5rem 0.8rem;
    background: rgba(10, 10, 10, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        12px 0 40px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(255, 165, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar.compact {
    width: 90px;
    padding: 10px 0;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 165, 0, 0.18), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(0, 200, 150, 0.2), transparent 55%);
    opacity: 0.8;
    mix-blend-mode: screen;
    pointer-events: none;
}

.sidebar-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.brand {
    text-align: center;
    margin-bottom: 1.5rem;
    transition: opacity 0.3s ease, margin 0.3s ease;
}

.sidebar.compact .brand {
    margin-bottom: 0.8rem;
}

.sidebar.compact .brand-tagline {
    display: none;
}

.sidebar.compact .brand-name {
    font-size: 0.85rem;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.brand-link:hover {
    opacity: 0.8;
}

.brand-name {
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.brand-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #bbbbbb;
    opacity: 0.9;
}

.alphabet {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem;
    flex: 1;
}

.alphabet-item {
    text-align: center;
}

.letter-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #eaeaea;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: all 0.18s ease;
}

.sidebar.compact .letter-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0;
}

.letter-btn:hover {
    background: rgba(255, 165, 0, 0.15);
    color: #ffd27f;
    transform: translateX(1px);
}

.letter-btn.active {
    background: rgba(250, 164, 4, 0.918);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.6);
}

/* Estilos para repertorios */
.repertoire-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    overflow-y: auto;
}

.repertoire-item {
    text-align: center;
}

.repertoire-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #eaeaea;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.1em;
    text-align: left;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.repertoire-btn:hover {
    background: rgba(255, 165, 0, 0.15);
    color: #ffd27f;
    border-color: rgba(255, 165, 0, 0.3);
    transform: translateX(2px);
}

.repertoire-btn.active {
    background: rgba(250, 164, 4, 0.918);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.6);
    border-color: rgba(255, 165, 0, 0.8);
}

.current-repertoire-display {
    font-size: 2.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.6rem;
    color: #ffa500;
    font-weight: bold;
}

/* Contenido principal */

.main-content {
    flex: 1;
    padding: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.main-content::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 165, 0, 0.12), transparent 60%),
        radial-gradient(circle at 80% 100%, rgba(0, 200, 150, 0.16), transparent 60%);
    opacity: 0.8;
    mix-blend-mode: screen;
    pointer-events: none;
}

.main-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

header.main-header {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}

.title {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: bold;
    flex: 0 0 auto;
    margin: 0;
    display: inline-block;
}

.back-link {
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffa500;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 165, 0, 0.3);
    background: rgba(255, 165, 0, 0.1);
    transition: all 0.18s ease;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

.back-link:hover {
    background: rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.6);
    transform: translateX(-2px);
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #cccccc;
    margin-top: 0.3rem;
}

.divider {
    width: 180px;
    height: 2px;
    margin-top: 0.9rem;
    background: linear-gradient(90deg, #00c896, #ffa500);
    border-radius: 999px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #bbbbbb;
}

.info-pill {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.content-panel {
    flex: 1;
    background: rgba(10, 10, 10, 0.92);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-panel.song-mode {
    margin-top: 0;
}

.current-letter-display {
    font-size: 4rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.6rem;
    color: #ffa500;
}

.panel-content {
    flex: 1;
    overflow: auto;
}

.song-list {
    list-style: none;
    padding: 0;
    margin: 0.3rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.song-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #f5f5f5;
    font-size: 1.02rem;
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.song-item a:hover {
    background: rgba(255, 165, 0, 0.16);
    border-color: rgba(255, 165, 0, 0.6);
    transform: translateX(2px);
    box-shadow: 0 0 18px rgba(255, 165, 0, 0.3);
}

.song-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffa500;
}

.empty-message {
    font-size: 0.9rem;
    color: #bbbbbb;
    margin-top: 0.6rem;
}

/* Contenedor del iframe para mostrar la letra */
.iframe-wrapper {
    flex: 1;
    display: none; /* se muestra al elegir canción */
    margin-top: 0.4rem;
    min-height: 0; /* Permite que flex funcione correctamente */
    position: relative;
    flex-direction: column;
}

.iframe-wrapper iframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.92);
    flex: 1;
    margin-top: 60px; /* Espacio para la barra de navegación */
}

.song-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.85) 70%, transparent 100%);
    backdrop-filter: blur(4px);
}

.back-button {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #ffa500;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.18s ease;
    backdrop-filter: blur(4px);
}

.back-button:hover {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.8);
    transform: translateX(-2px);
    box-shadow: 0 0 18px rgba(255, 165, 0, 0.4);
}

.repertoire-title-in-song {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffa500;
    text-align: center;
    flex: 1;
    margin: 0 1rem;
}

.song-nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.nav-button {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #ffa500;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.18s ease;
    backdrop-filter: blur(4px);
}

.nav-button:hover {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.8);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.4);
}

.nav-button:disabled,
.nav-button[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.sidebar {
    transition: width 0.3s ease, padding 0.3s ease, display 0.3s ease;
}

footer {
    margin-top: 0.6rem;
    font-size: 0.7rem;
    color: #e0e0e0;
    text-align: right;
}

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 1.4rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 26px rgba(0, 0, 0, 0.8);
    }

    .alphabet {
        grid-template-columns: repeat(13, 1fr);
        row-gap: 0.4rem;
    }

    .main-content {
        padding: 1.6rem 1.4rem 1.4rem;
    }

    .current-letter-display {
        font-size: 3rem;
    }
}

