/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #2a1a2e;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    flex: 1;
    text-align: center;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
}

/* Content Modal */
.content-modal {
    width: 90%;
    max-width: 800px;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.content-modal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.content-image-section {
    height: 250px;
    background: #f5f5f5;
    overflow: hidden;
}

.content-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-text-section {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.content-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.content-text p {
    margin-bottom: 15px;
}

.content-audio-section {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.audio-controls audio {
    width: 100%;
    max-width: 500px;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

.audio-controls audio::-webkit-media-controls-panel {
    background-color: #492e57;
    border-radius: 8px;
}

.audio-controls audio::-webkit-media-controls-play-button,
.audio-controls audio::-webkit-media-controls-pause-button {
    background-color: white;
    border-radius: 50%;
}

.audio-extra-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.audio-control-btn {
    background: #492e57;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    min-width: 70px;
    justify-content: center;
}

.audio-control-btn:hover {
    background: #5a3668;
    transform: translateY(-2px);
}

.audio-control-btn i {
    font-size: 12px;
}

.audio-control-btn span {
    font-size: 12px;
    font-weight: 500;
}

/* Login Modal */
.login-modal {
    width: 400px;
    max-width: 90%;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #492e57;
    box-shadow: 0 0 0 2px rgba(73, 46, 87, 0.1);
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.modal-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button {
    background: #f0f0f0;
    color: #666;
}

.cancel-button:hover {
    background: #e0e0e0;
}

.confirm-button {
    background: #492e57;
    color: white;
}

.confirm-button:hover {
    background: #5a3668;
}

/* Register Modal */
.register-modal {
    width: 400px;
    max-width: 90%;
}

/* Language Modal */
.language-modal {
    width: 400px;
    max-width: 90%;
}

.language-options {
    padding: 20px;
}

.language-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.language-option:hover {
    background: #f8f9fa;
    border-color: #492e57;
    transform: translateY(-2px);
}

.language-option.active {
    background: #492e57;
    border-color: #492e57;
    color: white;
}

.language-option.active span {
    color: white;
}

.language-option img {
    width: 30px;
    height: 20px;
    border-radius: 3px;
}

.language-option span {
    font-size: 16px;
    color: #333;
}

/* User Modal */
.user-modal {
    width: 350px;
    max-width: 90%;
}

.user-options {
    padding: 20px;
}

.user-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.user-option:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.user-option.danger {
    border-color: #dc3545;
    color: #dc3545;
}

.user-option.danger:hover {
    background: #fff5f5;
    border-color: #c82333;
}

.user-option i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.user-option span {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .content-image-section {
        height: 200px;
    }
    
    .content-text-section {
        padding: 15px;
    }
    
    .content-text {
        font-size: 14px;
    }
    
    .content-audio-section {
        padding: 15px;
    }
    
    .audio-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .language-modal,
    .user-modal {
        width: 95%;
    }
    
    .language-options,
    .user-options {
        padding: 15px;
    }
    
    .language-option,
    .user-option {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 12px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .content-image-section {
        height: 150px;
    }
    
    .content-text-section {
        padding: 12px;
    }
    
    .content-text {
        font-size: 13px;
    }
    
    .content-audio-section {
        padding: 12px;
    }
    
    .audio-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .language-option,
    .user-option {
        padding: 10px;
        gap: 10px;
    }
    
    .language-option img {
        width: 25px;
        height: 17px;
    }
    
    .language-option span,
    .user-option span {
        font-size: 14px;
    }
}