/**
 * LARS Advanced Audio Player Styles
 * Responsive and mobile-friendly design
 */

.lars-advanced-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Player Header */
.lars-player-header {
    margin-bottom: 15px;
}

.lars-player-info {
    text-align: center;
}

.lars-player-title {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.lars-player-artist {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Visualizer Timeline */
.lars-visualizer-timeline {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    min-height: 70px;
    overflow: hidden;
}

.lars-visualizer-bar {
    flex: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    border-radius: 4px;
    transition: transform 0.2s ease, opacity 0.3s ease;
    opacity: 0.35;
    transform-origin: bottom;
    height: 50%;
}

.lars-visualizer-bar.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(96, 165, 250, 0.8));
    opacity: 1;
    transform: scaleY(1.25);
}

/* Progress Bar */
.lars-progress-container {
    margin-bottom: 15px;
}

.lars-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.2s ease;
}

.lars-progress-bar:hover {
    height: 8px;
}

.lars-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.lars-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.lars-progress-bar:hover .lars-progress-handle {
    opacity: 1;
}

/* Player Controls */
.lars-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lars-live-ops {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lars-live-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.lars-live-buttons button {
    flex: 1;
    min-width: 130px;
    padding: 8px 14px;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.7);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lars-live-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
}

.lars-live-notes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lars-live-notes-textarea {
    width: 100%;
    min-height: 110px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    resize: vertical;
    font-family: 'IBM Plex Mono', 'Source Code Pro', monospace;
    font-size: 13px;
}

.lars-note-status {
    font-size: 12px;
    min-height: 18px;
    color: rgba(255, 255, 255, 0.55);
}

.lars-note-status-success {
    color: #86efac;
}

.lars-note-status-error {
    color: #fecdd3;
}

.lars-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lars-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

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

.lars-time-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    min-width: 100px;
}

.lars-time-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Volume Control */
.lars-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 150px;
}

.lars-volume-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.lars-volume-btn:hover {
    transform: scale(1.1);
}

.lars-volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.lars-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lars-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* EQ Toggle Button */
.lars-eq-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lars-eq-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* EQ Panel */
.lars-eq-panel {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
}

.lars-eq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lars-eq-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.lars-eq-reset {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.lars-eq-reset:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* EQ Controls */
.lars-eq-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.lars-eq-band {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lars-eq-band label {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.lars-eq-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.lars-eq-slider {
    width: 100%;
    height: 100px;
    -webkit-appearance: slider-vertical;
    writing-mode: bt-lr;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

.lars-eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 10px;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lars-eq-slider::-moz-range-thumb {
    width: 20px;
    height: 10px;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lars-eq-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    min-width: 50px;
    text-align: center;
}

.lars-eq-freq {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* EQ Presets */
.lars-eq-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.lars-preset {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.lars-preset:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.lars-preset:active {
    transform: translateY(0);
}

/* Player Links (Download/Platform) */
.lars-player-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.lars-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.lars-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.lars-link:active {
    transform: translateY(0);
}

.lars-link-icon {
    font-size: 14px;
    line-height: 1;
}

.lars-link-text {
    font-weight: 500;
}

.lars-download-link:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.lars-platform-link:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}

/* Error Message */
.lars-player-error {
    background: #dc3545;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lars-advanced-player {
        padding: 15px;
    }
    
    .lars-player-title {
        font-size: 18px;
    }
    
    .lars-player-controls {
        gap: 10px;
    }
    
    .lars-play-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lars-time-display {
        font-size: 12px;
        min-width: 80px;
    }
    
    .lars-volume-control {
        min-width: 120px;
    }
    
    .lars-eq-controls {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .lars-eq-slider {
        height: 80px;
    }
    
    .lars-eq-presets {
        gap: 8px;
    }
    
    .lars-preset {
        padding: 6px 12px;
        font-size: 12px;
    }

    .lars-player-links {
        flex-direction: column;
        gap: 8px;
    }

    .lars-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lars-player-controls {
        justify-content: center;
    }
    
    .lars-volume-control {
        width: 100%;
        order: 3;
    }
    
    .lars-eq-toggle {
        width: 100%;
        order: 4;
    }
    
    .lars-eq-controls {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lars-advanced-player {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}
