/*
 * AxiomCodex Radio Stream Player
 * Professional HTML5 audio player for live MP3/AAC/Opus streams
 * Standalone — no external dependencies
 */

.axiomcodex-player {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    color: #e0e0e0;
    font-family: var(--axiomcodex-font, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    max-width: 600px;
}

.axiomcodex-player-dark {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

.axiomcodex-player-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #1a1a2e;
}

/* Now Playing Header */
.axpcm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.axpcm-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.axpcm-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: axpcm-pulse 1.5s ease-in-out infinite;
}

@keyframes axpcm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.axpcm-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.axpcm-subtitle {
    font-size: 13px;
    opacity: 0.7;
    margin: 0;
}

/* Visualizer */
.axpcm-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 48px;
    margin: 16px 0;
    padding: 0 8px;
}

.axpcm-bar {
    width: 4px;
    min-height: 4px;
    background: #4a90d9;
    border-radius: 2px;
    transition: height 0.1s ease;
    flex-shrink: 0;
}

.axpcm-bar.animating {
    animation: axpcm-bar-bounce var(--axpcm-duration, 0.5s) ease-in-out infinite alternate;
}

.axpcm-bar:nth-child(odd) { --axpcm-delay: 0s; }
.axpcm-bar:nth-child(even) { --axpcm-delay: 0.15s; }

.axpcm-bar:nth-child(1) { --axpcm-duration: 0.4s; }
.axpcm-bar:nth-child(2) { --axpcm-duration: 0.5s; }
.axpcm-bar:nth-child(3) { --axpcm-duration: 0.3s; }
.axpcm-bar:nth-child(4) { --axpcm-duration: 0.6s; }
.axpcm-bar:nth-child(5) { --axpcm-duration: 0.45s; }
.axpcm-bar:nth-child(6) { --axpcm-duration: 0.35s; }
.axpcm-bar:nth-child(7) { --axpcm-duration: 0.55s; }
.axpcm-bar:nth-child(8) { --axpcm-duration: 0.4s; }

@keyframes axpcm-bar-bounce {
    0% { height: var(--axpcm-min-h, 8px); opacity: 0.6; }
    100% { height: var(--axpcm-max-h, 40px); opacity: 1; }
}

/* Controls Row */
.axpcm-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.axpcm-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #4a90d9;
    color: white;
    flex-shrink: 0;
}

.axpcm-btn:hover {
    transform: scale(1.05);
    background: #3a7bc8;
}

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

.axpcm-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Volume */
.axpcm-volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.axpcm-volume-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

.axpcm-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.axpcm-player-light .axpcm-volume-slider {
    background: rgba(0, 0, 0, 0.15);
}

.axpcm-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a90d9;
    cursor: pointer;
    border: 2px solid white;
}

.axpcm-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a90d9;
    cursor: pointer;
    border: 2px solid white;
}

/* Stream Selector */
.axpcm-stream-selector {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.axpcm-player-light .axpcm-stream-selector {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.axpcm-selector-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 8px;
    display: block;
}

.axpcm-stream-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.axpcm-stream-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.axpcm-stream-btn:hover {
    border-color: #4a90d9;
    color: #4a90d9;
}

.axpcm-stream-btn.active {
    background: #4a90d9;
    border-color: #4a90d9;
    color: white;
}

.axpcm-player-light .axpcm-stream-btn {
    border-color: rgba(0, 0, 0, 0.2);
}

.axpcm-player-light .axpcm-stream-btn:hover {
    border-color: #4a90d9;
    color: #4a90d9;
}

.axpcm-player-light .axpcm-stream-btn.active {
    background: #4a90d9;
    border-color: #4a90d9;
    color: white;
}

/* Status */
.axpcm-status {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.axpcm-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #95a5a6;
}

.axpcm-status-dot.connected {
    background: #2ecc71;
}

.axpcm-status-dot.buffering {
    background: #f39c12;
}

.axpcm-status-dot.error {
    background: #e74c3c;
}
