/* Background Music Player Styles */

/* 플레이어 컨테이너 - 화면 하단 고정 */
#bmp-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 12px 20px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: transform 0.3s ease;
}

#bmp-player-container.hidden {
    transform: translateY(100%);
}

/* 플레이어 왼쪽 섹션 */
.bmp-player-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 재생/일시정지 버튼 */
.bmp-play-button {
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.bmp-play-button:hover {
    background: #e0e0e0;
    border-color: #ccc;
    transform: scale(1.05);
}

.bmp-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.3s ease;
}

/* 재생 아이콘 */
.bmp-play-button.paused::before {
    border-left: 12px solid #666;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 2px;
}

/* 일시정지 아이콘 */
.bmp-play-button.playing::before {
    width: 12px;
    height: 16px;
    background: linear-gradient(to right, #666 0%, #666 30%, transparent 30%, transparent 70%, #666 70%, #666 100%);
    border: none;
    margin-left: 0;
}

/* 음악 정보 */
.bmp-music-info {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    justify-content: center;
}

.bmp-music-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    margin-bottom: 2px;
}

.bmp-music-artist {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* 플레이어 오른쪽 섹션 */
.bmp-player-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 볼륨 컨트롤 */
.bmp-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmp-volume-icon {
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 2px;
    border-radius: 3px;
}

.bmp-volume-icon:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.bmp-volume-icon svg {
    transition: all 0.2s ease;
}

/* 볼륨 슬라이더 */
.bmp-volume-slider {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
}

.bmp-volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bmp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

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

/* 진행 바 */
.bmp-progress-bar {
    width: 150px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.bmp-progress-fill {
    height: 100%;
    background: #666;
    border-radius: 2px;
    transition: width 0.1s ease;
    width: 0%;
    pointer-events: none;
}

/* 닫기 버튼 */
.bmp-close-button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 14px;
}

.bmp-close-button:hover {
    background: #e0e0e0;
}

/* 모달 스타일 */
.bmp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bmp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bmp-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
}

.bmp-modal-overlay.active .bmp-modal {
    transform: scale(1) translateY(0);
}

.bmp-modal h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.bmp-modal p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.bmp-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.bmp-modal-button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.bmp-modal-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bmp-modal-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.bmp-modal-button.secondary {
    background: #f0f0f0;
    color: #666;
}

.bmp-modal-button.secondary:hover {
    background: #e0e0e0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    #bmp-player-container {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .bmp-player-left,
    .bmp-player-right {
        gap: 10px;
    }
    
    .bmp-music-info {
        min-width: 150px;
    }
    
    .bmp-volume-slider,
    .bmp-progress-bar {
        width: 80px;
    }
    
    .bmp-modal {
        padding: 20px;
        margin: 20px;
    }
    
    .bmp-modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    #bmp-player-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .bmp-player-left,
    .bmp-player-right {
        width: 100%;
        justify-content: center;
    }
    
    .bmp-music-info {
        text-align: center;
        min-width: auto;
    }
}

/* 플로팅 플레이 버튼 */
.bmp-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.bmp-floating-button.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.bmp-floating-button:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #bbb;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.bmp-floating-button::before {
    content: '';
    border-left: 14px solid #666;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px;
}

.bmp-floating-button.playing::before {
    border: none;
    width: 14px;
    height: 18px;
    background: linear-gradient(to right, #666 0%, #666 30%, transparent 30%, transparent 70%, #666 70%, #666 100%);
    margin-left: 0;
}

/* 숨김 클래스 */
.bmp-hidden {
    display: none !important;
}

/* 로딩 애니메이션 */
.bmp-loading {
    animation: bmp-spin 1s linear infinite;
}

@keyframes bmp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
