/* radiofundacion - single page radio player
 * Identidad visual propia (sin compartir tokens con cloud/ ni sanjuanalmundo/).
 * Tema oscuro, acento vino + dorado, disco vinilo animado como pieza central.
 */

:root {
    --bg-1:        #0d0608;
    --bg-2:        #1a0d12;
    --surface:     rgba(255, 255, 255, .04);
    --surface-2:   rgba(255, 255, 255, .08);
    --border:      rgba(255, 255, 255, .10);
    --wine:        #9d2050;
    --wine-glow:   rgba(157, 32, 80, .55);
    --gold:        #d4a24c;
    --gold-soft:   #e8c585;
    --text:        #f4ece4;
    --text-soft:   rgba(244, 236, 228, .72);
    --text-mute:   rgba(244, 236, 228, .48);
    --radius:      14px;
    --radius-lg:   24px;
    --shadow-lg:   0 30px 80px rgba(0, 0, 0, .55);
    --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-display:'Georgia', 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(157, 32, 80, .35) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(212, 162, 76, .14) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.page {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ---------- Header ---------- */

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, var(--gold) 0%, var(--gold) 18%, #2a1a14 19%, #2a1a14 36%, var(--gold-soft) 37%, var(--gold-soft) 38%, transparent 39%),
        conic-gradient(from 0deg, #1a0e0a, #2a1a14, #1a0e0a);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .55), 0 6px 24px rgba(0, 0, 0, .55);
    flex-shrink: 0;
}
.brand-text {
    line-height: 1.15;
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.brand-name em {
    font-style: italic;
    color: var(--gold);
}
.brand-tag {
    font-size: .78rem;
    color: var(--text-mute);
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: 8px 0 4px;
}
.hero-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 99px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 18px;
}
.hero-eyebrow .live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff3b5c;
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 59, 92, .7);
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 92, .65); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.01em;
    margin: 0 auto;
    max-width: 800px;
}
.hero-title em {
    font-style: italic;
    color: var(--gold);
}
.hero-sub {
    margin: 14px auto 0;
    max-width: 580px;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.55;
}

/* ---------- Player ---------- */

.player {
    background: linear-gradient(160deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .015) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 40px 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 36px;
    align-items: center;
}
@media (max-width: 720px) {
    .player {
        grid-template-columns: 1fr;
        padding: 28px 22px 22px;
        gap: 24px;
        text-align: center;
    }
}

/* Disco vinilo */
.disc-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}
.disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%,
            var(--wine) 0%, var(--wine) 14%,
            #1a0608 15%, #1a0608 17%,
            #2b1218 18%, #2b1218 21%,
            #1a0608 22%, #1a0608 24%,
            #251015 25%
        ),
        repeating-radial-gradient(circle at 50% 50%,
            #0d0608 0px, #0d0608 1px,
            #1a1014 2px, #1a1014 3px
        );
    box-shadow:
        0 0 0 6px rgba(0, 0, 0, .35),
        0 30px 60px rgba(0, 0, 0, .55),
        inset 0 0 60px rgba(0, 0, 0, .5);
    position: relative;
    overflow: hidden;
    animation: spin 6s linear infinite;
    animation-play-state: paused;
}
.disc::before {
    /* etiqueta central */
    content: '';
    position: absolute;
    inset: 38%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, var(--gold) 0%, var(--gold-soft) 60%, #a07728 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), inset 0 0 12px rgba(0, 0, 0, .25);
}
.disc::after {
    /* eje central */
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #0d0608;
    box-shadow: 0 0 0 2px var(--gold);
}
.disc-glare {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08) 0%, transparent 40%, transparent 60%, rgba(255, 255, 255, .04) 100%);
    pointer-events: none;
}
.player.is-playing .disc { animation-play-state: running; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Lado derecho del player: titulo + controles */
.player-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.now-label {
    font-size: .72rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.now-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
    min-height: 2.5em;
    /* clamp a 2 lineas con elipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.now-title.is-empty {
    color: var(--text-mute);
    font-style: italic;
}

/* Barra de progreso */
.progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
}
.progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 99px;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
}
.progress-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--wine) 0%, var(--gold) 100%);
    border-radius: 99px;
    transition: width .25s linear;
}

/* Controles */
.controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
@media (max-width: 720px) {
    .controls { justify-content: center; }
}
.btn-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #1a0608;
    font-size: 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(212, 162, 76, .35), inset 0 -3px 0 rgba(0, 0, 0, .15);
    transition: transform .12s ease, box-shadow .2s ease;
    flex-shrink: 0;
}
.btn-play:hover  { transform: scale(1.04); box-shadow: 0 16px 36px rgba(212, 162, 76, .45), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-play:active { transform: scale(.96); }
.btn-play svg    { width: 22px; height: 22px; display: block; }
.btn-play .icon-pause { display: none; }
.player.is-playing .btn-play .icon-play  { display: none; }
.player.is-playing .btn-play .icon-pause { display: block; }

.btn-skip {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}
.btn-skip:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .2); }
.btn-skip svg   { width: 16px; height: 16px; }

/* Volumen */
.volume {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    color: var(--text-mute);
    min-width: 0;
}
@media (max-width: 720px) { .volume { margin-left: 0; } }
.volume svg { width: 18px; height: 18px; flex-shrink: 0; }
.volume input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    border-radius: 99px;
    background: var(--surface-2);
    outline: none;
    cursor: pointer;
}
.volume input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid #1a0608;
    cursor: pointer;
}
.volume input[type=range]::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid #1a0608;
    cursor: pointer;
    border: none;
}

/* ---------- Up next ---------- */

.up-next {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.up-next-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.up-next-title {
    font-size: .76rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.up-next-count {
    font-size: .78rem;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
}
.up-next-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}
.up-next-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-size: .9rem;
    color: var(--text-soft);
    min-width: 0;
}
.up-next-item:first-child { border-top: none; }
.up-next-num {
    width: 22px;
    text-align: right;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
    font-size: .78rem;
    flex-shrink: 0;
}
.up-next-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Acerca ---------- */

.about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 720px) {
    .about { grid-template-columns: 1fr; }
}
.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.about-icon {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--gold);
}
.about-title {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 4px;
}
.about-text {
    color: var(--text-soft);
    font-size: .85rem;
    line-height: 1.5;
}

/* ---------- Footer ---------- */

.footer {
    margin-top: auto;
    padding: 22px 24px;
    text-align: center;
    color: var(--text-mute);
    font-size: .78rem;
    border-top: 1px solid var(--border);
}
.footer strong {
    color: var(--text-soft);
    font-weight: 600;
}

/* ---------- Empty state (sin audios) ---------- */

.empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-mute);
    font-size: .95rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
