/* Álbumes en vivo — Enclave */
:root {
    --alb-bg: #06090f;
    --alb-surface: #0f172a;
    --alb-surface-2: #16213a;
    --alb-text: #f1f5f9;
    --alb-muted: #94a3b8;
    --alb-accent: #4fc3c8;
    --alb-accent-text: #06090f;
    --alb-border: rgba(255, 255, 255, 0.1);
    --alb-like: #f43f5e;
    --alb-radius: 14px;
}
[data-theme="light"] {
    --alb-bg: #f7f9fb;
    --alb-surface: #ffffff;
    --alb-surface-2: #eef3f6;
    --alb-text: #1a202c;
    --alb-muted: #4a5568;
    --alb-accent: #00767c;
    --alb-accent-text: #ffffff;
    --alb-border: rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }
body.alb {
    margin: 0;
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--alb-bg);
    color: var(--alb-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.alb-noscroll { overflow: hidden; }
.alb a { color: inherit; }

/* Barra superior */
.alb-top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--alb-bg) 88%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--alb-border);
}
.alb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.alb-brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.alb-top-links { display: flex; gap: 16px; font-size: .95rem; }
.alb-top-links a { text-decoration: none; color: var(--alb-muted); }
.alb-top-links a:hover { color: var(--alb-accent); }

.alb-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }

/* Botones */
.alb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--alb-accent); color: var(--alb-accent-text);
    font: inherit; font-weight: 600; text-decoration: none;
    transition: transform .15s, filter .15s;
}
.alb-btn:hover { filter: brightness(1.08); }
.alb-btn:active { transform: scale(.97); }
.alb-btn:disabled { opacity: .6; cursor: default; }
.alb-btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.alb-btn-ghost { background: transparent; color: var(--alb-text); border: 1px solid var(--alb-border); }
.alb-btn:focus-visible, .alb-item-btn:focus-visible, .alb-like:focus-visible { outline: 3px solid var(--alb-accent); outline-offset: 2px; }

/* Galería de álbumes */
.alb-intro { text-align: center; max-width: 640px; margin: 8px auto 28px; }
.alb-intro h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.alb-intro p { margin: 0; color: var(--alb-muted); }
.alb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.alb-card { background: var(--alb-surface); border: 1px solid var(--alb-border); border-radius: var(--alb-radius); overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.alb-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.alb-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--alb-surface-2) center / cover no-repeat; display: grid; place-items: center; color: var(--alb-muted); font-size: 2.4rem; }
.alb-card-img .alb-live { position: absolute; top: 10px; left: 10px; }
.alb-card-body { padding: 12px 16px 16px; }
.alb-card-body h2 { margin: 0 0 4px; font-size: 1.1rem; }
.alb-card-body p { margin: 0; color: var(--alb-muted); font-size: .9rem; }

.alb-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #e11d48; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.alb-live span { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: alb-pulse 1.4s infinite; }
@keyframes alb-pulse { 50% { opacity: .25; } }

.alb-empty { text-align: center; padding: 60px 16px; color: var(--alb-muted); }
.alb-empty > i { font-size: 3rem; margin-bottom: 12px; display: block; }

/* Cabecera del álbum */
.alb-hero {
    position: relative; min-height: 260px; display: flex; align-items: flex-end;
    background: linear-gradient(180deg, rgba(6, 9, 15, .15), rgba(6, 9, 15, .88)), var(--alb-hero, linear-gradient(135deg, #012a52, #00767c)) center / cover no-repeat;
    color: #fff;
}
.alb-hero-in { width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 16px 24px; }
.alb-hero h1 { margin: 10px 0 6px; font-size: clamp(1.7rem, 5vw, 2.8rem); line-height: 1.15; overflow-wrap: anywhere; }
.alb-hero-meta { margin: 0; opacity: .9; }
.alb-hero-desc { margin: 10px 0 0; max-width: 680px; opacity: .9; overflow-wrap: anywhere; }

.alb-upload { text-align: center; margin: 0 0 24px; }
.alb-upload-help { color: var(--alb-muted); font-size: .85rem; margin: 8px 0 0; }
.alb-progress { position: relative; max-width: 420px; margin: 14px auto 0; height: 28px; border-radius: 999px; background: var(--alb-surface-2); overflow: hidden; }
.alb-progress div { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--alb-accent); transition: width .3s; }
.alb-progress span { position: relative; display: block; line-height: 28px; font-size: .85rem; font-weight: 600; }
.alb-closed { text-align: center; color: var(--alb-muted); margin: 0 0 24px; }

/* Podio */
.alb-podium { margin: 0 0 28px; }
.alb-podium h2 { font-size: 1.1rem; margin: 0 0 12px; }
.alb-podium h2 i { color: #f59e0b; }
.alb-podium-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.alb-podium-item { position: relative; padding: 0; border: 0; border-radius: var(--alb-radius); overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--alb-surface-2); }
.alb-podium-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-podium-medal { position: absolute; top: 6px; left: 8px; font-size: 1.6rem; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.alb-podium-cap { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font-size: .8rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grilla (masonry con columnas) */
.alb-grid { columns: 4 220px; column-gap: 12px; }
.alb-item { break-inside: avoid; margin: 0 0 12px; background: var(--alb-surface); border: 1px solid var(--alb-border); border-radius: var(--alb-radius); overflow: hidden; }
.alb-item.is-new { animation: alb-in .5s ease; }
@keyframes alb-in { from { opacity: 0; transform: scale(.96); } }
.alb-item-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--alb-surface-2); cursor: zoom-in; }
.alb-item-btn img { display: block; width: 100%; height: auto; }
.alb-item-cap { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: .85rem; }
.alb-item-autor { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-item-likes { color: var(--alb-muted); white-space: nowrap; }
.alb-item-likes .fa-solid.fa-heart { color: var(--alb-like); }
.alb-empty-grid { text-align: center; color: var(--alb-muted); padding: 32px 0; }
.alb-more { text-align: center; margin-top: 12px; }

/* Visor */
.alb-viewer { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 1fr 360px; background: rgba(0, 0, 0, .92); }
.alb-viewer[hidden] { display: none; }
.alb-viewer-fig { margin: 0; display: grid; place-items: center; min-height: 0; padding: 16px; }
.alb-viewer-fig img { max-width: 100%; max-height: calc(100vh - 32px); object-fit: contain; border-radius: 8px; }
.alb-viewer-side { background: var(--alb-surface); color: var(--alb-text); display: flex; flex-direction: column; min-height: 0; }
.alb-viewer-head { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--alb-border); }
.alb-viewer-head small { display: block; color: var(--alb-muted); }
.alb-viewer-autor { overflow-wrap: anywhere; }
.alb-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.alb-avatar-sm { width: 30px; height: 30px; font-size: .85rem; }
.alb-viewer-actions { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--alb-border); }
.alb-like { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--alb-border); background: transparent; color: var(--alb-text); font: inherit; font-weight: 600; cursor: pointer; }
.alb-like.is-on { color: var(--alb-like); border-color: var(--alb-like); }
.alb-quienes { color: var(--alb-muted); font-size: .85rem; overflow-wrap: anywhere; }
.alb-comments { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.alb-comments-list { list-style: none; margin: 0; padding: 12px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.alb-comments-list li { display: flex; gap: 10px; }
.alb-comments-list p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.alb-com-head { display: flex; gap: 8px; align-items: baseline; }
.alb-com-head small { color: var(--alb-muted); }
.alb-comments-state { margin: 0; padding: 0 16px; color: var(--alb-muted); font-size: .85rem; }
.alb-comment-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--alb-border); }
.alb-comment-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--alb-border); background: var(--alb-surface-2); color: var(--alb-text); font: inherit; }
.alb-comment-form button { border: 0; border-radius: 50%; width: 42px; height: 42px; background: var(--alb-accent); color: var(--alb-accent-text); cursor: pointer; }
.alb-viewer-close, .alb-viewer-nav { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.2rem; cursor: pointer; }
.alb-viewer-close { top: 12px; left: 12px; }
.alb-viewer-nav { top: 50%; transform: translateY(-50%); }
.alb-viewer-nav.prev { left: 12px; }
.alb-viewer-nav.next { right: 372px; }

/* Modal nombre */
.alb-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.alb-modal[hidden] { display: none; }
.alb-modal-box { width: 100%; max-width: 380px; background: var(--alb-surface); color: var(--alb-text); border-radius: var(--alb-radius); padding: 24px; }
.alb-modal-box h3 { margin: 0 0 4px; }
.alb-modal-box p { margin: 0 0 16px; color: var(--alb-muted); }
.alb-modal-box input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--alb-border); background: var(--alb-surface-2); color: var(--alb-text); font: inherit; font-size: 1rem; }
.alb-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.alb-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 130; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: #111827; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.alb-toast[hidden] { display: none; }

.alb-foot { text-align: center; padding: 20px 16px; color: var(--alb-muted); font-size: .85rem; border-top: 1px solid var(--alb-border); }

@media (max-width: 820px) {
    .alb-viewer { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
    .alb-viewer-fig img { max-height: 60vh; }
    .alb-viewer-side { max-height: 45vh; border-radius: 16px 16px 0 0; }
    .alb-viewer-nav { top: 30vh; }
    .alb-viewer-nav.next { right: 12px; }
    .alb-grid { columns: 2 150px; column-gap: 8px; }
    .alb-item { margin-bottom: 8px; }
    .alb-top-links a span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .alb-live span, .alb-item.is-new { animation: none; }
}
