* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.dark-mode {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1a2e 100%);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px;
    /* dvh = 브라우저 주소창 포함한 실제 가시 영역 사용 (vh 폴백) */
    height: calc(100vh - 120px);
    height: calc(100dvh - 120px);
    display: flex;
    flex-direction: column;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 16px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    color: #1e293b;
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
    }

    .game-container {
        padding: 12px;
        border-radius: 16px;
    }
}

/* 인트로 화면 */
.intro-area {
    text-align: center;
    padding: 20px 16px;
    overflow-y: auto;
    max-height: 100%;
}

.intro-area::-webkit-scrollbar,
.reveal-area::-webkit-scrollbar,
.result-area::-webkit-scrollbar {
    width: 6px;
}

.intro-area::-webkit-scrollbar-track,
.reveal-area::-webkit-scrollbar-track,
.result-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.intro-area::-webkit-scrollbar-thumb,
.reveal-area::-webkit-scrollbar-thumb,
.result-area::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.intro-area::-webkit-scrollbar-thumb:hover,
.reveal-area::-webkit-scrollbar-thumb:hover,
.result-area::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.intro-content {
    max-width: 500px;
    margin: 0 auto;
}

.intro-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-subtitle {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.game-rules {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.rules-title {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 12px;
    text-align: center;
}

.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5e1;
    padding: 6px 0 6px 24px;
    position: relative;
}

.rules-list li::before {
    content: "⚽";
    position: absolute;
    left: 0;
    top: 8px;
}

.rules-list .highlight {
    color: #fbbf24;
    font-weight: 600;
}

.difficulty-selection {
    margin-bottom: 20px;
}

.difficulty-title {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 12px;
}

.difficulty-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.difficulty-card {
    flex: 1;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.difficulty-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.difficulty-card.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-color: #3b82f6;
}

.difficulty-name {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.difficulty-desc {
    font-size: 12px;
    color: #94a3b8;
}

.start-game-btn {
    width: 100%;
    max-width: 300px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.intro-area.hidden {
    display: none;
}

/* 상단 정보 바 */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.info-bar.hidden {
    display: none;
}

.progress-info, .score-info {
    font-size: 18px;
    font-weight: 700;
}

.progress-info {
    color: #60a5fa;
}

.score-info {
    color: #4ade80;
}

.home-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.home-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}


/* 점수 카드 */
.score-card {
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    animation: scoreCardIn 0.5s ease;
    flex-shrink: 0;
}

@keyframes scoreCardIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-card.score-high {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.score-card.score-medium {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
}

.score-card.score-low {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.score-card.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.score-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.score-status {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* 커리어 카드 */
.career-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.card-title {
    font-size: 18px;
    text-align: center;
    margin-bottom: 12px;
    color: #e2e8f0;
    font-weight: 700;
    flex-shrink: 0;
}

/* 타임라인 */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
}

/* 타임라인 스크롤바 스타일 */
.timeline::-webkit-scrollbar {
    width: 6px;
}

.timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    animation: slideIn 0.3s ease;
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-years {
    font-size: 14px;
    color: #94a3b8;
    min-width: 80px;
    font-weight: 600;
}

.timeline-team {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
}

.timeline-item.hidden-hint {
    background: rgba(255, 255, 255, 0.02);
    border-left-color: #475569;
}

.timeline-item.hidden-hint .timeline-team {
    color: #64748b;
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-shrink: 0;
}

.hint-btn, .giveup-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.hint-btn {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.hint-btn:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.hint-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.giveup-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.giveup-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-icon {
    font-size: 18px;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hint-cost {
    font-size: 12px;
    opacity: 0.9;
}

/* 입력 영역 */
.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.autocomplete-wrapper {
    flex: 1;
    position: relative;
}

#answerInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: all 0.2s;
    font-weight: 500;
}

#answerInput:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#answerInput::placeholder {
    color: #64748b;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 16px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
    font-weight: 500;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(59, 130, 246, 0.2);
}

.submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 토스트 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    z-index: 1000;
    animation: toastIn 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.hidden {
    display: none;
}

.toast.correct {
    background: linear-gradient(135deg, #166534, #15803d);
    color: #4ade80;
}

.toast.wrong {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: #fca5a5;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* 정답 공개 */
.reveal-area {
    text-align: center;
    padding: 20px 16px;
    overflow-y: auto;
    max-height: 100%;
}

.reveal-area.hidden {
    display: none;
}

.reveal-result {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.reveal-result.correct {
    color: #4ade80;
}

.reveal-result.wrong {
    color: #f87171;
}

.player-profile {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 10px;
}

.profile-info {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
}

.profile-highlight {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.5;
}

.next-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}

/* 결과 화면 */
.result-area {
    text-align: center;
    padding: 20px 16px;
    overflow-y: auto;
    max-height: 100%;
}

.result-area.hidden {
    display: none;
}

.result-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
}

.result-grade {
    font-size: 16px;
    color: #fbbf24;
    margin-bottom: 24px;
}

.result-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn, .home-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}

.retry-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
}

.home-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 로딩/에러 */
.loading-area, .error-area {
    text-align: center;
    padding: 60px 20px;
}

.loading-area.hidden, .error-area.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.game-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.game-area.hidden {
    display: none;
}

/* 높이 기반 반응형 (작은 화면) */
@media (max-height: 700px) {
    .score-value {
        font-size: 36px;
    }

    .score-card {
        padding: 10px;
        margin-bottom: 10px;
    }

    .score-label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .score-status {
        font-size: 14px;
    }

    .info-bar {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .progress-info, .score-info {
        font-size: 16px;
    }

    .career-card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .timeline-item {
        padding: 10px;
        gap: 10px;
    }

    .timeline-years {
        font-size: 13px;
        min-width: 75px;
    }

    .timeline-team {
        font-size: 15px;
    }

    .timeline {
        gap: 8px;
    }

    #answerInput {
        padding: 10px 14px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 10px 20px;
        font-size: 15px;
        min-height: 44px;
    }

    .hint-btn, .giveup-btn {
        padding: 10px;
        font-size: 13px;
    }

    .action-buttons {
        margin-top: 8px;
        gap: 8px;
    }

    .input-area {
        margin-bottom: 8px;
        gap: 8px;
    }

    .intro-title {
        font-size: 24px;
    }

    .intro-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .game-rules {
        padding: 14px;
        margin-bottom: 16px;
    }

    .difficulty-selection {
        margin-bottom: 16px;
    }

    .difficulty-card {
        padding: 12px 10px;
    }

    .start-game-btn {
        padding: 12px 28px;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 8px;
    }

    .game-container {
        padding: 12px;
    }

    .score-value {
        font-size: 32px;
    }

    .score-card {
        padding: 8px;
        margin-bottom: 8px;
    }

    .score-label {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .score-status {
        font-size: 13px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .timeline-item {
        padding: 8px;
        gap: 8px;
    }

    .timeline {
        gap: 6px;
    }

    .timeline-years {
        font-size: 12px;
        min-width: 70px;
    }

    .timeline-team {
        font-size: 14px;
    }

    #answerInput {
        padding: 8px 12px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 8px 18px;
        font-size: 14px;
        min-height: 40px;
    }

    .hint-btn, .giveup-btn {
        padding: 8px;
        font-size: 12px;
    }

    .btn-icon {
        font-size: 16px;
    }
}

/* 너비 기반 반응형 */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .game-container {
        padding: 16px;
    }

    .intro-area {
        padding: 24px 16px;
    }

    .intro-title {
        font-size: 26px;
    }

    .intro-subtitle {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .game-rules {
        padding: 20px 16px;
        margin-bottom: 28px;
    }

    .rules-title {
        font-size: 16px;
    }

    .rules-list li {
        font-size: 13px;
        padding: 6px 0 6px 22px;
    }

    .difficulty-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .difficulty-card {
        padding: 16px;
    }

    .start-game-btn {
        font-size: 16px;
        padding: 14px 28px;
    }

    .info-bar {
        gap: 8px;
    }

    .score-value {
        font-size: 36px;
    }

    .score-card {
        padding: 10px;
    }

    .career-card {
        padding: 14px 16px;
    }

    .timeline-item {
        padding: 10px;
    }

    .timeline-years {
        font-size: 13px;
        min-width: 70px;
    }

    .timeline-team {
        font-size: 15px;
    }

    #answerInput {
        font-size: 15px;
        padding: 10px 14px;
    }

    .submit-btn {
        font-size: 15px;
        padding: 10px 24px;
        min-height: 44px;
    }

    .hint-btn, .giveup-btn {
        font-size: 13px;
        padding: 10px;
    }

    .btn-icon {
        font-size: 16px;
    }

    .toast {
        font-size: 16px;
        padding: 16px 32px;
    }

    .result-stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 28px;
    }

    .result-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .result-grade {
        font-size: 15px;
        margin-bottom: 20px;
    }
}

/* 작은 모바일 (너비와 높이 모두 작음) */
@media (max-width: 480px) and (max-height: 700px) {
    .container {
        padding: 8px;
    }

    .game-container {
        padding: 12px;
        border-radius: 16px;
    }

    .score-card {
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 12px;
    }

    .score-label {
        font-size: 11px;
    }

    .score-value {
        font-size: 30px;
    }

    .score-status {
        font-size: 13px;
    }

    .info-bar {
        gap: 8px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .progress-info, .score-info {
        font-size: 15px;
    }

    .career-card {
        padding: 10px;
        margin-bottom: 8px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .timeline {
        gap: 6px;
    }

    .timeline-item {
        padding: 8px;
        gap: 8px;
    }

    .timeline-years {
        font-size: 12px;
        min-width: 65px;
    }

    .timeline-team {
        font-size: 14px;
    }

    .input-area {
        gap: 8px;
        margin-bottom: 8px;
    }

    #answerInput {
        padding: 8px 12px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 40px;
    }

    .action-buttons {
        gap: 8px;
        margin-top: 8px;
    }

    .hint-btn, .giveup-btn {
        padding: 8px;
        font-size: 12px;
    }

    .btn-icon {
        font-size: 15px;
    }

    .hint-cost {
        font-size: 11px;
    }

    .intro-area {
        padding: 16px 12px;
    }

    .intro-title {
        font-size: 22px;
    }

    .intro-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .game-rules {
        padding: 12px;
        margin-bottom: 14px;
    }

    .rules-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .rules-list li {
        font-size: 12px;
        padding: 5px 0 5px 20px;
    }

    .difficulty-selection {
        margin-bottom: 14px;
    }

    .difficulty-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .difficulty-card {
        padding: 10px 8px;
    }

    .difficulty-name {
        font-size: 14px;
    }

    .difficulty-desc {
        font-size: 11px;
    }

    .start-game-btn {
        padding: 10px 24px;
        font-size: 15px;
    }

    .reveal-area, .result-area {
        padding: 16px 12px;
    }

    .reveal-result {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .player-profile {
        padding: 12px;
        margin-bottom: 12px;
    }

    .profile-name {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .profile-info {
        font-size: 12px;
    }

    .profile-highlight {
        font-size: 11px;
        margin-top: 8px;
        padding-top: 8px;
    }

    .next-btn {
        padding: 10px 28px;
        font-size: 14px;
        min-height: 44px;
    }

    .result-title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .result-stats {
        gap: 16px;
        margin-bottom: 16px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 26px;
    }

    .result-grade {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .retry-btn, .home-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }
}

/* 포커스 스타일 */
.submit-btn:focus, .hint-btn:focus, .diff-btn:focus, .giveup-btn:focus, .retry-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   라이트 테마 오버라이드 (흰 게임 컨테이너 기준)
   ============================================ */

/* 상단 정보 바 */
.info-bar {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.progress-info {
    color: #3b82f6;
}

.score-info {
    color: #16a34a;
}

.home-icon-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.home-icon-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* 커리어 카드 */
.career-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.card-title {
    color: #1e293b;
}

/* 타임라인 */
.timeline-item {
    background: #f1f5f9;
    border-left-color: #667eea;
}

.timeline-item.hidden-hint {
    background: #f8fafc;
    border-left-color: #cbd5e1;
}

.timeline-team {
    color: #1e293b;
}

.timeline-item.hidden-hint .timeline-team {
    color: #94a3b8;
}

.timeline-years {
    color: #64748b;
}

/* 입력 필드 */
#answerInput {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

#answerInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

#answerInput::placeholder {
    color: #94a3b8;
}

/* 자동완성 */
.autocomplete-list {
    background: #fff;
    border-color: #e2e8f0;
}

.autocomplete-item {
    color: #1e293b;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(102, 126, 234, 0.1);
}

/* 힌트/포기 버튼 */
.hint-btn {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.4);
    color: #b45309;
}

.giveup-btn {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* 정답 공개 화면 */
.reveal-result.correct {
    color: #16a34a;
}

.reveal-result.wrong {
    color: #dc2626;
}

.player-profile {
    background: #f1f5f9;
}

.profile-name {
    color: #1e293b;
}

.profile-info {
    color: #64748b;
}

.profile-highlight {
    border-top-color: #e2e8f0;
    color: #475569;
}

/* 결과 화면 */
.result-title {
    color: #1e293b;
}

.result-grade {
    color: #d97706;
}

.stat-label {
    color: #64748b;
}

.stat-value {
    color: #667eea;
}

/* 인트로 화면 */
.intro-subtitle {
    color: #64748b;
}

.game-rules {
    background: #f1f5f9;
}

.rules-title {
    color: #1e293b;
}

.rules-list li {
    color: #475569;
}

.difficulty-card {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.difficulty-card:hover {
    background: #e2e8f0;
    border-color: #667eea;
}

.difficulty-name {
    color: #1e293b;
}

.difficulty-desc {
    color: #64748b;
}

/* 다크모드에서 원래 스타일 복원 */
body.dark-mode .game-container {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

body.dark-mode .info-bar { border-bottom-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .home-icon-btn { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: #fff; }
body.dark-mode .career-card { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-color: rgba(255,255,255,0.1); }
body.dark-mode .card-title { color: #e2e8f0; }
body.dark-mode .timeline-item { background: rgba(255,255,255,0.05); border-left-color: #3b82f6; }
body.dark-mode .timeline-item.hidden-hint { background: rgba(255,255,255,0.02); border-left-color: #475569; }
body.dark-mode .timeline-team { color: #f1f5f9; }
body.dark-mode .timeline-item.hidden-hint .timeline-team { color: #64748b; }
body.dark-mode .timeline-years { color: #94a3b8; }
body.dark-mode #answerInput { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: #fff; }
body.dark-mode #answerInput::placeholder { color: #64748b; }
body.dark-mode .autocomplete-list { background: #1e293b; border-color: rgba(255,255,255,0.1); }
body.dark-mode .autocomplete-item { color: #f1f5f9; }
body.dark-mode .hint-btn { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.4); color: #fbbf24; }
body.dark-mode .giveup-btn { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #f87171; }
body.dark-mode .reveal-result.correct { color: #4ade80; }
body.dark-mode .reveal-result.wrong { color: #f87171; }
body.dark-mode .player-profile { background: rgba(255,255,255,0.05); }
body.dark-mode .profile-name { color: #f1f5f9; }
body.dark-mode .profile-info { color: #94a3b8; }
body.dark-mode .profile-highlight { border-top-color: rgba(255,255,255,0.1); color: #cbd5e1; }
body.dark-mode .result-title { color: #f1f5f9; }
body.dark-mode .result-grade { color: #fbbf24; }
body.dark-mode .stat-label { color: #94a3b8; }
body.dark-mode .game-rules { background: rgba(255,255,255,0.05); }
body.dark-mode .rules-title { color: #e2e8f0; }
body.dark-mode .rules-list li { color: #cbd5e1; }
body.dark-mode .difficulty-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
body.dark-mode .difficulty-name { color: #f1f5f9; }
body.dark-mode .difficulty-desc { color: #94a3b8; }
body.dark-mode .intro-subtitle { color: #94a3b8; }
