:root {
    --bg: #0a0a0a;
    --surface: #1a1a1a;
    --accent: #00ff88;
    --text: #e8e8e8;
    --text-dim: #888;
    --error: #ff4444;
}

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

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.player {
    background: var(--surface);
    border: 2px solid var(--accent);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.player.playing::before {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scaleX(0.3); opacity: 0.5; }
    50% { transform: scaleX(1); opacity: 1; }
}

.header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--accent);
    text-align: center;
}

.station {
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent);
}

.controls {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.format-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.format-btn {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
}

.format-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.format-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: bold;
}

.format-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.play-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.play-btn {
    background: var(--accent);
    border: none;
    color: var(--bg);
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent);
}

.play-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.play-btn:active {
    transform: scale(0.95);
}

.volume-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.volume-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--text-dim);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg);
    border-radius: 0;
}

.volume-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px var(--accent);
}

.volume-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px var(--accent);
}

.status {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--text-dim);
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-dim);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status.error {
    color: var(--error);
}

.status.playing {
    color: var(--accent);
}

.visualizer {
    display: none;
    padding: 0 1.5rem 1rem;
    height: 60px;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.visualizer.active {
    display: flex;
}

.bar {
    width: 4px;
    background: var(--accent);
    opacity: 0.3;
    transition: height 0.1s ease;
}

@media (max-width: 480px) {
    .station {
        font-size: 1.5rem;
    }
    
    .play-controls {
        flex-direction: column;
    }
    
    .volume-control {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player::before,
    .play-btn,
    .bar {
        animation: none !important;
        transition: none !important;
    }
}
