/**
 * Futuristic Song Player Styles
 */

.song-player {
    background: var(--surface-1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.song-player.gradient {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.song-player::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.player-header {
    margin-bottom: var(--space-lg);
}

.song-info {
    position: relative;
    z-index: 1;
}

.song-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.song-meta {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Waveform */
.waveform-container {
    position: relative;
    height: 80px;
    margin: var(--space-lg) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.waveform-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    transition: width 0.1s linear;
}

/* Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.song-player:not(.gradient) .control-btn {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.play-btn {
    width: 56px;
    height: 56px;
}

.time-display {
    display: flex;
    gap: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.time-separator {
    opacity: 0.5;
}

/* Progress Bar */
.progress-container {
    flex: 1;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.song-player:not(.gradient) .progress-bar {
    background: var(--surface-3);
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.progress-bar::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.volume-btn {
    width: 40px;
    height: 40px;
}

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

.song-player:not(.gradient) .volume-slider {
    background: var(--surface-3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

.speed-btn {
    width: 44px;
    height: 44px;
}

.speed-text {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Actions */
.player-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    position: relative;
    z-index: 1;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.song-player:not(.gradient) .action-btn {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.song-player:not(.gradient) .action-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .song-player {
        padding: var(--space-lg);
    }

    .player-controls {
        flex-wrap: wrap;
    }

    .volume-control {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-top: var(--space-md);
    }

    .volume-slider {
        flex: 1;
        max-width: 200px;
    }

    .player-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State */
.song-player.loading {
    opacity: 0.7;
    pointer-events: none;
}

.song-player.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
