:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #fffbeb;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    margin: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 기본(모바일 기준) 컨테이너 크기 */
.container {
    width: 100%;
    max-width: 650px;
    background: var(--card-bg);
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 상단 브라우저 타이틀바 스타일 */
.browser-header {
    background: #f1f5f9;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-title {
    font-weight: bold;
    color: #2563eb;
    font-size: 0.95rem;
}

/* 콘텐츠 영역 공통 (기본 모바일 패딩) */
.content {
    padding: 24px 20px;
    text-align: center;
}

/* 반응형 이미지 컨테이너 */
.quiz-image-container {
    margin: 16px 0;
    max-height: 200px;
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.quiz-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* 시작 화면 스타일 (기본) */
#start-screen h1 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin: 10px 0;
}

.start-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

#start-screen p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 20px;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
    width: 100%;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

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

/* 퀴즈 화면 스타일 */
#quiz-screen {
    text-align: left;
}

.quiz-progress {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 12px;
    line-height: 1.4;
}

.quiz-input-group {
    margin-bottom: 20px;
}

.quiz-input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.quiz-input-group input:focus {
    border-color: var(--primary-color);
}

.quiz-footer {
    display: flex;
    justify-content: flex-end;
}

/* 결과 화면 스타일 */
#result-screen {
    text-align: center;
}

#result-screen h2 {
    font-size: 1.6rem;
    color: #1e3a8a;
    margin-bottom: 15px;
}

.score-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.result-list {
    text-align: left;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 220px;
    overflow-y: auto;
}

.result-item {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

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

.correct { color: #16a34a; font-weight: bold; }
.incorrect { color: #dc2626; font-weight: bold; }

.hidden { display: none !important; }


/* ==========================================================
   🖥️ PC 화면 전용 스타일 확대 설정 (너비 768px 이상일 때 적용)
   ========================================================== */
@media (min-width: 768px) {
    /* 전체 카드 컨테이너 크기 키우기 */
    .container {
        max-width: 900px;
        border-radius: 20px;
        border-width: 3px;
    }

    /* 상단 브라우저 타이틀바 */
    .browser-header {
        padding: 14px 24px;
    }
    .browser-title {
        font-size: 1.15rem;
    }
    .dot {
        width: 14px;
        height: 14px;
    }

    /* 내부 콘텐츠 여백 대폭 확대 */
    .content {
        padding: 50px 60px;
    }

    /* 시작 화면 폰트 및 요소 확대 */
    #start-screen h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    .start-badge {
        font-size: 1.1rem;
        padding: 6px 20px;
        margin-bottom: 12px;
    }
    #start-screen p {
        font-size: 1.35rem;
        margin-bottom: 35px;
    }

    /* 메인 및 문제 이미지 크기 확대 */
    .quiz-image-container {
        max-height: 340px;
        margin: 25px 0;
    }
    .quiz-image {
        max-height: 340px;
    }

    /* 퀴즈 진행도 및 문제 폰트 크기 확대 */
    .quiz-progress {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    .quiz-question {
        font-size: 1.6rem;
        margin-bottom: 25px;
        line-height: 1.5;
    }

    /* 입력창 크기 및 폰트 키우기 */
    .quiz-input-group {
        margin-bottom: 35px;
    }
    .quiz-input-group input {
        padding: 18px 20px;
        font-size: 1.3rem;
        border-width: 3px;
    }

    /* 버튼 크기 및 폰트 확대 */
    .btn {
        width: auto;
        padding: 16px 40px;
        font-size: 1.25rem;
        border-radius: 12px;
    }

    /* 결과 화면 폰트 크기 및 채점표 확대 */
    #result-screen h2 {
        font-size: 2.3rem;
        margin-bottom: 25px;
    }
    .score-display {
        font-size: 4rem;
        margin-bottom: 25px;
    }
    .result-list {
        padding: 25px;
        max-height: 350px;
        margin-bottom: 35px;
    }
    .result-item {
        font-size: 1.15rem;
        padding: 12px 0;
    }
}