/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* 화면 전환 */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* 시작 화면 */
#startScreen {
    text-align: center;
}

.logo-container {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sun-icon {
    font-size: 80px;
    color: #ffd700;
    animation: rotate 20s linear infinite;
    display: block;
    margin-bottom: 20px;
}

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

.game-title {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.info-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-box p {
    margin: 12px 0;
    font-size: 16px;
    color: #555;
}

.info-box i {
    margin-right: 10px;
    color: #667eea;
}

/* 버튼 스타일 */
.btn {
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
}

.btn i {
    margin-right: 8px;
}

/* 퀴즈 화면 */
#quizScreen {
    width: 100%;
}

.quiz-header {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.question-number {
    color: #667eea;
}

.score {
    color: #764ba2;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* 문제 영역 */
.quiz-content {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.question-box {
    margin-bottom: 30px;
}

.question-text {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.question-image {
    margin-top: 20px;
}

.question-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 선택지 */
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    width: 100%;
    padding: 20px 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
}

.answer-btn:hover {
    background: #e8e9ff;
    border-color: #667eea;
    transform: translateX(5px);
}

.answer-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.answer-btn.correct {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.answer-btn.wrong {
    background: #f44336;
    color: white;
    border-color: #f44336;
    animation: shake 0.5s;
}

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

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.5s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 오답 모달 */
.wrong-answer .sunny-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    border: 5px solid #f44336;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.3);
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.wrong-text {
    font-size: 32px;
    font-weight: 900;
    color: #f44336;
    margin-bottom: 30px;
}

/* 정답 모달 */
.success-icon {
    font-size: 80px;
    color: #4caf50;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.correct-text {
    font-size: 32px;
    font-weight: 900;
    color: #4caf50;
    margin-bottom: 20px;
}

.explanation {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* 결과 화면 */
#resultScreen {
    text-align: center;
}

.result-container {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.trophy-icon {
    font-size: 100px;
    color: #ffd700;
    margin-bottom: 20px;
    animation: bounceIn 1s ease;
}

.result-title {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.result-box {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.result-value {
    font-size: 24px;
    font-weight: 900;
    color: #667eea;
}

.result-message {
    font-size: 20px;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 30px;
    padding: 20px;
    background: #f0e6ff;
    border-radius: 15px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 200px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .game-title {
        font-size: 36px;
    }

    .game-subtitle {
        font-size: 16px;
    }

    .logo-container {
        padding: 40px 25px;
    }

    .sun-icon {
        font-size: 60px;
    }

    .quiz-content {
        padding: 25px 20px;
    }

    .question-text {
        font-size: 18px;
    }

    .answer-btn {
        padding: 16px 20px;
        font-size: 15px;
    }

    .modal-content {
        padding: 35px 25px;
    }

    .wrong-text,
    .correct-text {
        font-size: 26px;
    }

    .wrong-answer .sunny-image {
        width: 160px;
        height: 160px;
    }

    .result-title {
        font-size: 32px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
        min-width: auto;
    }

    .btn {
        padding: 15px 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .game-title {
        font-size: 28px;
    }

    .info-box p {
        font-size: 14px;
    }

    .quiz-header {
        padding: 20px;
    }

    .progress-info {
        font-size: 14px;
    }

    .quiz-content {
        padding: 20px 15px;
    }

    .question-text {
        font-size: 16px;
    }

    .answer-btn {
        padding: 14px 18px;
        font-size: 14px;
    }

    .result-container {
        padding: 35px 25px;
    }

    .trophy-icon {
        font-size: 70px;
    }

    .result-value {
        font-size: 20px;
    }

    .result-label {
        font-size: 16px;
    }
}
