/* 단어 퍼즐 스타일 */
.word-puzzle-container {
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hint-display {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.hint-display h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.hint-display p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.word-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.letter-box {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s;
}

.letter-box.filled {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.letter-box.revealed {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.letter-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.letter-category {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: white;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234285f4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.letter-category:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
    border-color: #3367d6;
}

.letter-category:hover {
    border-color: #3367d6;
}

.letter-category option {
    padding: 10px;
    font-size: 1.1rem;
}

.alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.alphabet-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alphabet-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.alphabet-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.alphabet-btn.correct {
    background-color: #27ae60;
}

.alphabet-btn.wrong {
    background-color: #e74c3c;
}

.progress-display {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-weight: bold;
    color: var(--text-color);
}

.wrong-letters {
    color: #e74c3c;
}

.attempts-display {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 추가 힌트 버튼 스타일 */
#hintBtn {
    background-color: #f39c12;
    color: white;
}

#hintBtn:hover {
    background-color: #e67e22;
}

/* 모달 스타일 추가 */
#modalAnswer {
    font-size: 1.5rem;
    margin: 15px 0;
    font-weight: bold;
    color: var(--primary-color);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .letter-box {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .alphabet-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .hint-display {
        padding: 12px;
    }
    
    .exercise-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .letter-box {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        border-width: 1px;
    }
    
    .alphabet-buttons {
        gap: 5px;
    }
    
    .alphabet-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .word-puzzle-container {
        padding: 15px;
    }
    
    .hint-display h3 {
        font-size: 1rem;
    }
    
    .hint-display p {
        font-size: 0.9rem;
    }
}

/* 난이도 선택기 스타일 개선 */
.level-selector {
    margin-bottom: 15px;
}

.level-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.level-selector select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: white;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234285f4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.level-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
    border-color: #3367d6;
}

.level-selector select:hover {
    border-color: #3367d6;
}

.level-selector select option {
    padding: 10px;
    font-size: 1rem;
}