/* Space Cowboys — Persistent Audio Player */

:root { --player-h: 96px; }
@media (min-width: 720px) { :root { --player-h: 108px; } }

.persistent-player {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: #14110d;
    color: #f5f4f1;
    height: var(--player-h);
    border-top: 1px solid #2a241c;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
}

.persistent-player[hidden] { display: none; }

.player-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.75rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.player-btn {
    background: none;
    border: none;
    color: #f5f4f1;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0.55rem;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
}
.player-btn:hover { background: rgba(255,255,255,0.08); }
.player-btn:active { transform: scale(0.95); }

.player-btn-main {
    font-size: 1.55rem;
    width: 58px;
    height: 58px;
    background: var(--accent, #b45309);
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 14px rgba(180,83,9,0.4);
}
.player-btn-main:hover { background: var(--accent-dark, #92400e); }

/* Info & Progress */
.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.player-title {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    overflow: hidden;
    white-space: nowrap;
}

#player-episode-label {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--nav-accent, #fbbf24);
    background: rgba(251,191,36,0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

#player-chapter-label {
    font-family: var(--font-display, Georgia), serif;
    font-size: 1.05rem;
    color: #f5f4f1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.player-progress span {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.78rem;
    color: #a8a29e;
    min-width: 3.5rem;
}

#player-time-total { text-align: right; }

/* Range slider */
#player-seek {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #2a241c;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.15s;
}
#player-seek:hover { background: #3d3528; }

#player-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    background: var(--accent, #b45309);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #14110d;
    box-shadow: 0 0 0 1px var(--accent, #b45309);
}
#player-seek::-moz-range-thumb {
    width: 16px; height: 16px;
    background: var(--accent, #b45309);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #14110d;
}

/* Volume */
.player-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

#player-volume {
    width: 90px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #2a241c;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
#player-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: #f5f4f1;
    border-radius: 50%;
    cursor: pointer;
}
#player-volume::-moz-range-thumb {
    width: 12px; height: 12px;
    background: #f5f4f1;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#player-close { opacity: 0.45; font-size: 0.95rem; }
#player-close:hover { opacity: 1; }

/* Chapter highlight on episode page */
.chapter-link.active {
    background: rgba(180,83,9,0.1);
    border-left: 3px solid var(--accent, #b45309);
}

/* Responsive */
@media (max-width: 720px) {
    :root { --player-h: 84px; }
    .player-volume { display: none; }
    .player-inner { gap: 0.7rem; padding: 0 1rem; }
    #player-chapter-label { font-size: 0.9rem; }
    .player-btn-main { width: 48px; height: 48px; font-size: 1.3rem; }
    .player-btn { width: 38px; height: 38px; }
}
