/**
 * Music Bar Styles
 * 음악 플레이어 바 관련 모든 CSS 스타일
 * 추출된 날짜: 2025-08-13
 */

/* ===== CSS Variables ===== */
:root {
    /* Player Variables */
    --player-height: 90px;
    --player-text: #333333;
    --z-fixed: 9999;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    
    /* Typography */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --font-semibold: 600;
    --font-family-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: transparent;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ===== SVG Icons ===== */
.icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: all var(--transition-fast);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    width: 100%;
}

/* ===== Music Player Main Bar ===== */
.music-player-bar {
    background: linear-gradient(90deg, 
        rgba(248, 249, 250, 0.95) 0%, 
        rgba(233, 236, 239, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--player-text);
    height: var(--player-height);
    border-top: 1px solid rgba(153, 153, 153, 0.2);
    position: relative;
    width: 100%;
    z-index: var(--z-fixed);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08),
                0 -4px 16px rgba(0, 0, 0, 0.05),
                0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease-in-out;
    transform: translateY(0);
    will-change: transform;
}

/* 스크롤 시 자동 숨김/표시 */
.music-player-bar.auto-hide {
    transform: translateY(100%) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.music-player-bar.auto-show {
    transform: translateY(0) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.music-player-bar:hover {
    background: linear-gradient(90deg, 
        rgba(248, 249, 250, 0.98) 0%, 
        rgba(233, 236, 239, 0.98) 100%);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12),
                0 -4px 20px rgba(0, 0, 0, 0.08),
                0 -2px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Player Content Layout ===== */
.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--space-4);
}

/* ===== Player Info Section ===== */
.player-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 300px;
}

.album-art {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Equalizer Styles ===== */
.equalizer {
    position: absolute;
    bottom: 4px;
    left: 4px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    opacity: 0.8;
}

.equalizer .bar {
    width: 3px;
    background: linear-gradient(to top, #ff6b6b, #4ecdc4);
    border-radius: 1px;
    height: 8px;
    transform-origin: bottom;
}

/* Equalizer Animation Classes */
.equalizer.active .bar:nth-child(1),
.animate-equalizer .bar:nth-child(1) {
    animation: equalizer1 1.5s ease-in-out infinite;
}

.equalizer.active .bar:nth-child(2),
.animate-equalizer .bar:nth-child(2) {
    animation: equalizer2 1.5s ease-in-out infinite 0.2s;
}

.equalizer.active .bar:nth-child(3),
.animate-equalizer .bar:nth-child(3) {
    animation: equalizer3 1.5s ease-in-out infinite 0.4s;
}

.equalizer.active .bar:nth-child(4),
.animate-equalizer .bar:nth-child(4) {
    animation: equalizer4 1.5s ease-in-out infinite 0.6s;
}

/* Equalizer Keyframe Animations */
@keyframes equalizer1 {
    0%, 100% {
        height: 10px;
    }
    50% {
        height: 25px;
    }
}

@keyframes equalizer2 {
    0%, 100% {
        height: 15px;
    }
    25% {
        height: 30px;
    }
    75% {
        height: 8px;
    }
}

@keyframes equalizer3 {
    0%, 100% {
        height: 20px;
    }
    33% {
        height: 12px;
    }
    66% {
        height: 28px;
    }
}

@keyframes equalizer4 {
    0%, 100% {
        height: 8px;
    }
    40% {
        height: 22px;
    }
    80% {
        height: 18px;
    }
}

/* ===== Track Info ===== */
.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--player-text);
    margin: 0 0 var(--space-1) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: var(--text-sm);
    color: rgba(102, 102, 102, 0.8);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Player Controls ===== */
.player-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(102, 102, 102, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: var(--player-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(102, 102, 102, 0.2);
}

.control-btn:hover {
    background: rgba(102, 102, 102, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.1);
}

.control-btn.play-pause-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.8) 100%);
    color: #666666;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.control-btn.play-pause-btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Player Progress ===== */
.player-progress {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    max-width: 400px;
}

.time {
    font-size: var(--text-sm);
    color: rgba(102, 102, 102, 0.8);
    font-family: var(--font-family-mono);
    min-width: 40px;
}

.progress-container {
    flex: 1;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(102, 102, 102, 0.3);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(102, 102, 102, 0.9) 0%, 
        rgba(102, 102, 102, 0.7) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-fast);
    position: relative;
    box-shadow: 0 0 8px rgba(102, 102, 102, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: rgba(102, 102, 102, 0.95);
    border-radius: var(--radius-full);
    transform: translate(50%, -3px);
    opacity: 0;
    transition: opacity var(--transition-fast);
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.4);
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.progress-handle {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: rgba(102, 102, 102, 0.95);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.4);
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* ===== Player Extras (Volume & Other Controls) ===== */
.player-extras {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 200px;
}

.volume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(102, 102, 102, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: var(--player-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(102, 102, 102, 0.2);
}

.volume-btn:hover {
    background: rgba(102, 102, 102, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.15);
}

.volume-slider {
    width: 80px;
    position: relative;
}

.volume-input {
    width: 100%;
    height: 4px;
    background: rgba(102, 102, 102, 0.3);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: rgba(102, 102, 102, 0.9);
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.volume-input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: rgba(102, 102, 102, 0.9);
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.playlist-btn,
.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(102, 102, 102, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: var(--player-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(102, 102, 102, 0.2);
}

.playlist-btn:hover,
.fullscreen-btn:hover {
    background: rgba(102, 102, 102, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.15);
}

/* ===== Hidden Audio Element ===== */
#audio-player {
    display: none;
}

/* ===== Mini Bar (kept for potential future use) ===== */

.music-player-mini {
    position: fixed;
    bottom: 24px;
    right: 32px;
    z-index: 9999;
    background: linear-gradient(90deg, 
        rgba(248, 249, 250, 0.95) 0%, 
        rgba(233, 236, 239, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(153, 153, 153, 0.3);
}

.music-player-mini.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.music-player-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                0 6px 20px rgba(0, 0, 0, 0.12);
}

.music-player-mini .mini-player-expand {
    background: none;
    border: none;
    color: #666666;
    font-size: 1.5rem;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.music-player-mini .mini-player-expand:hover {
    background: rgba(102, 102, 102, 0.15);
}

/* ===== Responsive Design for Music Player ===== */
@media (max-width: 1024px) {
    .player-content {
        gap: var(--space-2);
    }
    
    .player-info {
        min-width: 250px;
    }
    
    .player-progress {
        max-width: 300px;
    }
    
    .player-extras {
        min-width: 150px;
    }
    
    .volume-slider {
        width: 60px;
    }
}

@media (max-width: 768px) {
    .music-player-bar {
        height: 70px;
    }
    
    .player-content {
        flex-wrap: wrap;
        padding: var(--space-2) 0;
        height: auto;
        gap: var(--space-3);
    }
    
    .player-info {
        min-width: 200px;
        order: 1;
    }
    
    .album-art {
        width: 50px;
        height: 50px;
    }
    
    .track-title {
        font-size: var(--text-sm);
    }
    
    .track-artist {
        font-size: var(--text-xs);
    }
    
    .player-controls {
        order: 2;
        gap: var(--space-1);
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    .control-btn.play-pause-btn {
        width: 44px;
        height: 44px;
    }
    
    .player-progress {
        order: 4;
        max-width: none;
        width: 100%;
        margin-top: var(--space-2);
    }
    
    .player-extras {
        order: 3;
        min-width: auto;
        gap: var(--space-2);
    }
    
    .volume-slider {
        display: none;
    }
}

@media (max-width: 480px) {
    .music-player-bar {
        height: 60px;
    }
    
    .player-info {
        min-width: 150px;
    }
    
    .album-art {
        width: 40px;
        height: 40px;
    }
    
    .track-title {
        font-size: var(--text-xs);
    }
    
    .track-artist {
        font-size: var(--text-xs);
        opacity: 0.8;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
    }
    
    .control-btn.play-pause-btn {
        width: 40px;
        height: 40px;
    }
    
    .time {
        font-size: var(--text-xs);
        min-width: 30px;
    }
    
    .progress-bar {
        height: 4px;
    }
    
    .playlist-btn,
    .fullscreen-btn {
        width: 28px;
        height: 28px;
    }
}

/* ===== Dark Mode Adjustments ===== */
[data-theme="dark"] .music-player-bar {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(123, 108, 199, 0.9) 50%, 
        rgba(110, 127, 243, 0.9) 100%);
    border-top-color: rgba(255, 255, 255, 0.15);
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    .music-player-bar {
        border-top-width: 2px;
    }
    
    .control-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .progress-bar {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .control-btn,
    .volume-btn {
        transition: none;
    }
    
    .control-btn:hover,
    .volume-btn:hover {
        transform: none;
    }
    
    .progress-fill {
        transition: none;
    }
    
    .animate-equalizer .bar {
        animation: none !important;
    }
    
    @keyframes blink-toggle-btn {
        0%, 100% { opacity: 1; }
        50% { opacity: 1; }
    }
}