/* --- VARIABLES Y BASES --- */
:root { 
    --accent: #0070f3; 
    --dark: #111; 
    --gray: #666; 
    --bg: #f8f9fa; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: var(--bg); 
    margin: 0; 
    color: var(--dark); 
}

header { 
    background: #fff; 
    padding: 15px 20px; 
    border-bottom: 1px solid #eaeaea; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 600px; 
    margin: 0 auto; 
}

.logo { font-weight: 800; letter-spacing: -0.5px; }
nav a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }

#app { max-width: 600px; margin: 0 auto; padding: 20px; }

/* --- HOME --- */
.home-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.home-img { 
    width: 100px; height: 100px; border-radius: 20px; 
    object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.home-titles h1 { font-size: 1.4rem; margin: 0; line-height: 1.2; }
.alias { color: var(--gray); margin: 5px 0 0 0; font-size: 0.9rem; }
.home-body p { line-height: 1.6; color: #444; font-size: 1rem; }
.btn-main { 
    background: var(--dark); color: #fff; border: none; padding: 18px; 
    width: 100%; border-radius: 12px; font-weight: 700; margin-top: 20px; cursor: pointer; 
}

/* --- LISTADO Y GRUPOS --- */
.main-title { font-size: 1.5rem; margin-bottom: 25px; }

.sala-section { 
    background: #fff; border-radius: 16px; margin-bottom: 20px; 
    overflow: hidden; border: 1px solid #eaeaea; 
}

/* Estructura de fila (Sala y Obra) */
.sala-item, .obra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    gap: 15px;
}

.sala-item { background: #f1f1f1; font-weight: 700; }
.obra-row { border-top: 1px solid #f5f5f5; }

/* Contenido a la izquierda */
.item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    cursor: pointer;
    overflow: hidden;
}

.item-content img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.item-content h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sala-icon { color: #666; font-size: 20px; }

/* Botones de acción a la derecha */
.item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.btn-info, .btn-list-audio {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-info { color: var(--accent); }
.btn-list-audio { color: #555; }

.btn-info:hover, .btn-list-audio:hover { background: #f0f0f0; }

/* Estado activo del audio */
.btn-list-audio.playing {
    color: #fff;
    background: var(--accent);
    transform: scale(1.1);
}

/* --- VISTA DE DETALLE --- */
.detalle-card { background: #fff; border-radius: 20px; overflow: hidden; }
.detalle-img { width: 100%; height: auto; display: block; }
.detalle-body { padding: 25px; }

.audio-box { 
    margin: 20px 0; background: #f8f9fa; 
    padding: 10px; border-radius: 40px; 
}
audio { width: 100%; }

.descripcion { line-height: 1.7; color: #333; margin-bottom: 25px; }

/* Características / Ficha Técnica */
.specs-container {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.specs-container h4 {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.specs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-tag {
    background: #f0f0f0;
    color: #444;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #e0e0e0;
}

.btn-back { 
    background: none; border: 1px solid #ddd; width: 100%; 
    padding: 15px; border-radius: 12px; margin-top: 30px; 
    font-weight: 600; display: flex; align-items: center; 
    justify-content: center; gap: 10px; cursor: pointer;
}


.alias-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alias-container .btn-list-audio {
    padding: 0;
    font-size: 20px;
    color: var(--accent);
}

.author-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 12px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info .label {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 1px;
}

.author-card h4 {
    margin: 0;
    font-size: 1rem;
}

.author-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
