/* TTS 설정 모달 스타일 */
.tts-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.tts-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.tts-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    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);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tts-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.tts-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.tts-modal-header h3 i {
    margin-right: 8px;
}

.tts-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.tts-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.tts-modal-body {
    padding: 25px;
}

.tts-setting-group {
    margin-bottom: 20px;
}

.tts-setting-group:last-child {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tts-setting-group:last-child .practice-btn {
    flex: 1;
    min-width: 140px;
}

.tts-setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.tts-setting-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

.tts-setting-group select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.tts-setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.tts-setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8B4513;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.tts-setting-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.tts-setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8B4513;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 기본 버튼 스타일 */
.practice-btn {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.practice-btn:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.practice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.practice-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.practice-btn.primary:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.practice-btn.secondary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.practice-btn.secondary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.practice-btn.settings {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.practice-btn.settings:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.practice-btn.settings i {
    font-size: 0.85rem;
}

.practice-btn i {
    font-size: 0.9rem;
}

.practice-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .tts-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .tts-modal-header {
        padding: 15px 20px;
    }
    
    .tts-modal-body {
        padding: 20px;
    }
    
    .tts-setting-group {
        margin-bottom: 18px;
    }
    
    .practice-buttons {
        flex-direction: column;
    }
    
    .practice-btn {
        width: 100%;
        justify-content: center;
    }
}