/* ============================================
   CUSTOM AUDIO PLAYER - Absolute Fire
   ============================================ */

.audio-player {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* Top gradient line */
.audio-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.5) 30%,
        rgba(168, 85, 247, 0.5) 70%,
        transparent 100%
    );
}

/* Play/Pause Button */
.audio-player-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.audio-player-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
    border-radius: 50%;
}

.audio-player-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.audio-player-btn i {
    font-size: 16px;
    position: relative;
    z-index: 1;
    margin-left: 3px;
}

.audio-player-btn.playing i {
    margin-left: 0;
}

/* Progress Section */
.audio-player-progress-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Time Display */
.audio-player-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.audio-player-time-current {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Progress Bar Container */
.audio-player-progress {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.audio-player-progress:hover {
    height: 8px;
}

.audio-player-progress:hover .audio-player-progress-fill {
    background: linear-gradient(90deg, var(--accent-primary) 0%, #a855f7 100%);
}

/* Progress Fill */
.audio-player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 3px;
    transition: background 0.2s ease;
}

/* Buffered Progress */
.audio-player-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Progress Thumb (appears on hover) */
.audio-player-progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.audio-player-progress:hover .audio-player-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* Volume Control */
.audio-player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-player-volume-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.audio-player-volume-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.audio-player-volume-slider {
    width: 0;
    opacity: 0;
    transition: all 0.2s ease;
}

.audio-player-volume:hover .audio-player-volume-slider {
    width: 60px;
    opacity: 1;
}

.audio-player-volume-slider input {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.audio-player-volume-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Waveform Visualization */
.audio-player-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 24px;
    padding: 0 8px;
}

.audio-player-waveform-bar {
    width: 3px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.audio-player.playing .audio-player-waveform-bar {
    animation: waveform 0.5s ease-in-out infinite;
}

.audio-player.playing .audio-player-waveform-bar:nth-child(1) { animation-delay: 0s; }
.audio-player.playing .audio-player-waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-player.playing .audio-player-waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-player.playing .audio-player-waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-player.playing .audio-player-waveform-bar:nth-child(5) { animation-delay: 0.15s; }

@keyframes waveform {
    0%, 100% { height: 4px; background: rgba(99, 102, 241, 0.3); }
    50% { height: 22px; background: linear-gradient(180deg, #6366f1, #a855f7); }
}

/* Loading State */
.audio-player.loading .audio-player-btn i {
    animation: spin 1s linear infinite;
}

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

/* Mini Player Variant */
.audio-player.mini {
    padding: 8px 12px;
    gap: 10px;
}

.audio-player.mini .audio-player-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
}

.audio-player.mini .audio-player-btn i {
    font-size: 14px;
}

.audio-player.mini .audio-player-waveform {
    display: none;
}

/* Entry Player (in debate view) */
.audio-player.entry-player {
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(8, 8, 8, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Mic Check Player */
.mic-check-step-content .audio-player {
    margin-top: 8px;
}


/* Responsive */
@media (max-width: 480px) {
    .audio-player {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .audio-player-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .audio-player-volume {
        display: none;
    }
    
    .audio-player-waveform {
        display: none;
    }
}

