/* CSS Design System Inspired by Spotify - Elegant Single Player Version */

:root {
    --bg-base: #121212;
    --bg-surface: #181818;
    --bg-interactive: #242424;
    --brand-green: #1ed760;
    --brand-green-hover: #1db954;
    
    --text-base: #ffffff;
    --text-muted: #b3b3b3;
    
    --font-family-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-heavy: rgba(0, 0, 0, 0.6) 0px 16px 38px;
    --border-subtle: rgba(255, 255, 255, 0.04);
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: #0b0b0b;
    background-image: linear-gradient(rgba(11, 11, 11, 0.85), rgba(11, 11, 11, 0.85)), url('https://ipib.org.br/wp-content/uploads/2024/12/telas.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--text-base);
    font-family: var(--font-family-sans);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Background Atmospheric Glows */
.ambient-glow {
    position: absolute;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

.bg-glow-1 {
    background: var(--brand-green);
    top: -10%;
    right: -10%;
}

.bg-glow-2 {
    background: #4f46e5;
    bottom: -10%;
    left: -10%;
}

/* Centering Wrapper */
.player-wrapper {
    z-index: 2;
    padding: 24px;
    width: 100%;
    max-width: 420px;
}

/* Elegant Player Card */
.player-card {
    background: transparent;
    border: none;
    padding: 32px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    transition: transform 0.3s ease;
}

/* Album / Station Art */
.artwork-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: #e5e8eb;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Equalizer Bars Overlay */
.equalizer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equalizer-overlay.active {
    opacity: 1;
}

.bar {
    width: 8px;
    height: 15%;
    background-color: var(--brand-green);
    border-radius: 4px 4px 0 0;
    transition: height 0.1s ease;
}

/* Equalizer active dynamic loops */
.equalizer-overlay.active .bar1 { animation: flowWave 1s infinite alternate ease-in-out; }
.equalizer-overlay.active .bar2 { animation: flowWave 0.7s infinite alternate ease-in-out 0.15s; }
.equalizer-overlay.active .bar3 { animation: flowWave 1.3s infinite alternate ease-in-out 0.3s; }
.equalizer-overlay.active .bar4 { animation: flowWave 0.8s infinite alternate ease-in-out 0.08s; }
.equalizer-overlay.active .bar5 { animation: flowWave 1.1s infinite alternate ease-in-out 0.22s; }

@keyframes flowWave {
    0% { height: 15%; }
    100% { height: 95%; }
}

/* Typography metadata */
.station-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.station-meta h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-base);
}

.station-meta p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Controls section layout */
.controls-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    justify-content: center;
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Active playing status color update */
.equalizer-overlay.active + .station-meta .badge,
.player-card.playing .status-text {
    color: var(--brand-green);
}

/* Buttons actions block */
.actions-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-circle);
    background-color: var(--brand-green);
    color: #000000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(30, 215, 96, 0.35) 0px 8px 20px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-button:hover {
    transform: scale(1.08);
    background-color: var(--brand-green-hover);
    box-shadow: rgba(30, 215, 96, 0.5) 0px 8px 24px;
}

.play-button:active {
    transform: scale(0.96);
}

.play-button svg {
    width: 28px;
    height: 28px;
}

/* Volume styling */
.volume-row {
    width: 100%;
    max-width: 260px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.mute-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mute-button:hover {
    color: var(--text-base);
}

.mute-button svg {
    width: 18px;
    height: 18px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    background: #4d4d4d;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-base);
    transition: background-color 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb {
    background-color: var(--brand-green);
}

.hide {
    display: none !important;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .player-wrapper {
        padding: 16px;
    }

    .player-card {
        padding: 24px 20px;
    }

    .artwork-container {
        width: 170px;
        height: 170px;
    }
}
