/* hangle-game style.css - 한글 낱말카드 게임 (Galaxy Theme) */

/* ═══════════ 기본 리셋 ═══════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ═══════════ 화면 전환 ═══════════ */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════ 시작 화면 ═══════════ */
#start-screen h1 {
    font-family: var(--galaxy-font);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-family: var(--galaxy-font);
}

.btn-start {
    padding: 14px 44px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: var(--galaxy-font);
    color: #fff;
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.3);
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
    background: var(--accent-hover);
}

.btn-start:active {
    transform: translateY(0);
}

/* ═══════════ 상단 바 ═══════════ */
.top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.score-display,
.progress-display {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--galaxy-font);
    color: var(--text-color);
    background: var(--panel-color);
    border: 1px solid var(--game-grid-color);
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* ═══════════ 볼륨 조절 ═══════════ */
.volume-control {
    display: flex;
    gap: 4px;
}

.vol-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border: 1px solid var(--game-grid-color);
    border-radius: 10px;
    background: var(--panel-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vol-btn:hover {
    background: var(--game-bg-color);
}

.vol-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: scale(1.08);
}

/* ═══════════ 카드 ═══════════ */
.card-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.card {
    width: 200px;
    height: 200px;
    background: var(--panel-color);
    border: 1px solid var(--game-grid-color);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card.pop {
    animation: cardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
    0% {
        transform: scale(0.5) rotateY(90deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

.card-emoji {
    font-size: 90px;
    line-height: 1;
}

.btn-sound {
    margin-top: 14px;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 1px solid var(--game-grid-color);
    border-radius: 50%;
    background: var(--panel-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.btn-sound:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: scale(1.08);
}

.btn-sound:active {
    transform: scale(0.95);
}

/* ═══════════ 보기 버튼 ═══════════ */
.choices {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--galaxy-font);
    color: var(--text-color);
    background: var(--panel-color);
    border: 2px solid var(--game-grid-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.choice-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    background: #fef9f0;
}

.choice-btn:active {
    transform: translateY(0);
}

.choice-btn.correct {
    background: #d4f5e3;
    border-color: #5cc99b;
    color: #1d6844;
    animation: correctPulse 0.5s ease;
}

.choice-btn.wrong {
    background: #fde0e0;
    border-color: #e07070;
    color: #8b2a2a;
    animation: shake 0.4s ease;
}

.choice-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ═══════════ 피드백 ═══════════ */
.feedback {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--galaxy-font);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    margin-top: 16px;
}

/* ═══════════ 결과 화면 ═══════════ */
#result-screen h1 {
    font-size: 72px;
    margin-bottom: 12px;
}

#result-screen h2 {
    font-family: var(--galaxy-font);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 8px;
}

#result-screen p {
    font-family: var(--galaxy-font);
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

/* ═══════════ 반응형 ═══════════ */
@media (max-width: 500px) {
    .card {
        width: 160px;
        height: 160px;
    }

    .card-emoji {
        font-size: 72px;
    }

    #start-screen h1 {
        font-size: 1.8rem;
    }

    .choice-btn {
        font-size: 1.1rem;
        padding: 12px;
    }

    .vol-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}