/* 오디오 플레이어 전용 CSS */

/* 하단 고정 플레이어 */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 300px;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    height: 80px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: block;
}

.bottom-player.show {
    transform: translateY(0);
}

.player-content {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.actor-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
}

.actor-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

.player-details p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.player-controls {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 웨이브폼 컨테이너 */
.waveform-container {
    flex: 1;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waveform-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 오디오 컨트롤 */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 18px;
}

.control-btn:hover {
    background: #2563eb;
}

.time-display {
    font-size: 14px;
    color: #6b7280;
    font-family: monospace;
    min-width: 100px;
    text-align: center;
}

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

.volume-control i {
    color: #6b7280;
    font-size: 16px;
}

.volume-control input[type="range"] {
    width: 100px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 오디오 모달 */
.audio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.audio-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* 오디오바 푸터 (팝업 모달 스타일) */
.footer {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(calc(-50% + 200px));
    z-index: 10000000;
    display: none;
    max-width: 800px;
    width: 800px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .bottom-player {
        left: 0;
    }
    
    .player-content {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .player-info {
        min-width: 150px;
    }
    
    .waveform-container {
        min-width: 150px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .footer {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        width: 90% !important;
        max-width: 800px !important;
        bottom: 20px !important;
    }
}

/* 애니메이션 */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 오디오바 닫기 버튼 스타일 */
#close-audio-player {
    width: 28px !important;
    height: 28px !important;
    background: #6b7280 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    overflow: hidden !important;
}

#close-audio-player:hover {
    background: #4b5563 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

#close-audio-player:active {
    transform: scale(0.95) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* CSS X 아이콘 */
#close-audio-player::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 2px !important;
    height: 10px !important;
    background: white !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
    border-radius: 1px !important;
}

#close-audio-player::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 2px !important;
    height: 10px !important;
    background: white !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
    border-radius: 1px !important;
}

/* FontAwesome 아이콘 숨기기 */
#close-audio-player i {
    display: none !important;
}

/* 오디오바 헤더 스타일 */
.audio-player-header {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding: 6px 12px !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* 768px 이하에서 current-track 숨기기 */
@media (max-width: 768px) {
    #current-track {
        display: none !important;
    }
}
