﻿/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    padding: 14px 20px;
    box-shadow: 0 4px 18px rgba(212,96,141,0.35);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.header-home-btn {
    position: absolute;
    left: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.22);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.15s ease, transform 0.15s ease;
}

.header-home-btn:hover {
    background: rgba(255,255,255,0.38);
    transform: scale(1.08);
}

/* === Start Screen === */
#start-screen {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 67px);
}

.start-card {
    background: var(--color-white);
    border-radius: 28px;
    padding: 48px 32px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.start-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.start-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.start-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.start-info {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.start-info span {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}

.btn-start {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    padding: 16px 52px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(212,96,141,0.38);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212,96,141,0.48);
}

/* === Quiz Layout === */
.quiz-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 14px 16px 28px;
}

/* === Progress === */
.progress-display {
    text-align: center;
    margin-bottom: 8px;
    line-height: 1;
}

.progress-current {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-primary-light);
}

.progress-sep {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-border);
    margin: 0 3px;
}

.progress-total {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

/* === Score === */
.score-display {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-correct);
    background: var(--color-white);
    padding: 9px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

/* === Timer === */
.timer-wrap {
    background: #FFD6E8;
    border-radius: 50px;
    height: 20px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(212,96,141,0.12);
}

.timer-bar {
    height: 100%;
    border-radius: 50px;
    width: 100%;
    background: linear-gradient(90deg, #FFCCE6, #FF85B3, var(--color-primary-light), var(--color-primary));
}

@keyframes countdown {
    from { width: 100%; }
    to   { width: 0%; }
}

.timer-bar.running {
    animation: countdown 10s linear forwards;
}

/* === Photo === */
.photo-wrap {
    text-align: center;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--color-accent);
}

.photo-wrap img {
    max-height: 33vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
}

/* === Explain === */
.explain-wrap {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 13px 18px;
    margin-bottom: 13px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--color-accent);
}

.explain-wrap p {
    font-size: 20px;
    line-height: 1.2;
    word-break: keep-all;
    color: #555;
    padding-left: 14px;
    position: relative;
}

.explain-wrap p::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 900;
}

.explain-wrap p + p {
    margin-top: 5px;
}

/* === Choices === */
.choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-btn {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    padding: 20px 10px;
    background: var(--color-white);
    border: 3px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    line-height: 1.3;
}

.choice-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 8px 22px rgba(212,96,141,0.2);
}

.choice-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.choice-btn:disabled {
    cursor: default;
}

.choice-btn.correct {
    background: var(--color-correct);
    border-color: var(--color-correct);
    color: var(--color-white);
    box-shadow: 0 4px 18px rgba(0,137,123,0.4);
}

.choice-btn.wrong {
    background: var(--color-wrong);
    border-color: var(--color-wrong);
    color: var(--color-white);
    box-shadow: 0 4px 18px rgba(239,83,80,0.4);
}

/* === Results Screen === */
#results-screen {
    display: none;
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

#results-screen.show {
    display: block;
}

.result-card {
    background: var(--color-white);
    border-radius: 28px;
    padding: 48px 32px;
    box-shadow: var(--shadow-lg);
}

.result-emoji {
    font-size: 5rem;
    display: block;
    line-height: 1;
    margin-bottom: 14px;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 24px;
}

.result-score-wrap {
    margin-bottom: 10px;
}

.result-score {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--color-primary-light);
    line-height: 1;
}

.result-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.result-message {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-purple);
    margin-bottom: 34px;
    line-height: 1.6;
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-retry {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(212,96,141,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-retry:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212,96,141,0.45);
}

.btn-home {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 28px;
    background: var(--color-white);
    color: var(--color-text-muted);
    border: 3px solid var(--color-border);
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-home:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}
