/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    /* Brighter, kid-friendly sky gradient */
    background: linear-gradient(135deg, #a1c4fd 0%, #c2ffd8 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* 유틸리티 간격 */
.mb-4 { margin-bottom: 1.25rem; }

/* 시작 화면이 활성화될 때 스크롤 방지 */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 80px; /* 고정 푸터와 겹치지 않도록 하단 여백 */
}

/* 시작 화면 특별 설정 */
#startScreen {
    height: 100vh;
    overflow: hidden;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 공통 중앙 정렬 래퍼 (특정 화면 전용) */
.center-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 공통 푸터 */
.app-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.app-footer .footer-content {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-footer .footer-content .sep {
    opacity: 0.8;
}

.app-footer a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.6);
}

.app-footer a:hover {
    border-bottom-style: solid;
}

/* 시작 화면 */
.golden-bell {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    max-height: 90vh;
    overflow-y: auto;
}

.bell-icon {
    font-size: 80px;
    color: #ffd700;
    margin-bottom: 20px;
    animation: bellRing 2s infinite;
}

@keyframes bellRing {
    0%, 50%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.5rem;
    color: #2a5298;
    margin-bottom: 10px;
    font-weight: 500;
}

.range, .organizer {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 8px;
}

.start-options {
    margin: 40px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.start-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.start-btn.primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.start-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 215, 0, 0.4);
}

.start-btn.secondary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.start-btn.secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.4);
}

.start-btn.study {
    background: linear-gradient(45deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.start-btn.study:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(76, 175, 80, 0.4);
}

.info-box {
    background: rgba(30, 60, 114, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #1e3c72;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: #ffd700;
}

/* 교회 로고 */
.church-logo {
    margin-top: 30px;
    text-align: center;
}

.church-logo img {
    max-height: 60px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.church-logo img:hover {
    opacity: 1;
}

/* 퀴즈 화면 */
#quizScreen {
    /* display는 .screen / .screen.active 규칙에 따름 */
    padding: 0;
}

.quiz-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 90vh;
    margin-top: 5vh;
    margin-bottom: 5vh;
}

.quiz-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 1rem;
    font-weight: 500;
}

.quiz-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.score-info, .timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}

.question-container {
    padding: 40px 30px;
    text-align: center;
}

/* 정/오답 피드백 */
.feedback {
    margin: 0 30px 20px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
}
.feedback.correct {
    background: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.35);
}
.feedback.incorrect {
    background: rgba(244, 67, 54, 0.12);
    color: #c62828;
    border: 2px solid rgba(244, 67, 54, 0.35);
}

.question-number {
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
}

.question-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #1e3c72;
    font-weight: 500;
    margin-bottom: 20px;
}

.options-container {
    padding: 0 30px 30px;
    display: grid;
    gap: 15px;
}

/* 주관식 입력 */
.short-answer-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 0 10px 10px;
}

.short-answer-input {
    flex: 1;
    max-width: 520px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.short-answer-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.submit-answer-btn {
    white-space: nowrap;
}

.option-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    border-color: #2a5298;
    background: rgba(42, 82, 152, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.option-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

.option-btn.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.option-btn.correct {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.option-btn.incorrect {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.option-btn.correct .option-number {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.option-btn.incorrect .option-number {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.quiz-actions {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #e0e0e0;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn.primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.action-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.action-btn.secondary:hover {
    background: #e0e0e0;
}

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

.answer-explanation {
    background: rgba(255, 215, 0, 0.1);
    border-top: 3px solid #ffd700;
    margin: 20px 30px;
    border-radius: 10px;
    animation: fadeIn 0.5s ease;
}

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

.explanation-content {
    padding: 20px;
}

.explanation-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 10px;
}

.explanation-title i {
    color: #ffd700;
}

.explanation-text {
    color: #666;
    line-height: 1.5;
}

/* 결과 화면 */
.result-container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.result-header {
    margin-bottom: 40px;
}

.result-icon {
    font-size: 80px;
    color: #ffd700;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2.5rem;
    color: #1e3c72;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: rgba(30, 60, 114, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.result-message {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #1e3c72;
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 답안 리뷰 화면 */
.review-container {
    max-width: 800px;
    width: 100%;
    height: 90vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.review-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.review-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.review-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #e0e0e0;
}

.review-item.correct {
    border-left-color: #4caf50;
}

.review-item.incorrect {
    border-left-color: #f44336;
}

.review-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 15px;
}

.review-options {
    margin-bottom: 15px;
}

.review-option {
    padding: 8px 0;
    font-size: 1rem;
}

.review-option.user-answer {
    color: #f44336;
    font-weight: 500;
}

.review-option.correct-answer {
    color: #4caf50;
    font-weight: 500;
}

.review-explanation {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* 범위 선택 화면 */
.section-select-container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    margin: 5vh auto;
}

.section-select-header h2 {
    color: #1e3c72;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-select-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.section-options {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.section-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.section-btn.all-sections {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.section-btn.all-sections:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3c72;
}

.section-count {
    font-size: 1rem;
    color: #666;
    background: rgba(102, 126, 234, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.section-btn.all-sections .section-count {
    background: rgba(255, 215, 0, 0.3);
    color: #b8860b;
}

.section-actions {
    text-align: center;
}

/* 공부하기 화면 - 한 장 스타일 */
.study-sheet-container {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin: 3vh auto 5vh;
    overflow: hidden;
}

.study-sheet-header {
    background: linear-gradient(135deg, var(--theme-start, #4caf50), var(--theme-end, #45a049));
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.study-sheet-header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.study-sheet-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.study-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.study-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.study-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.study-sheet-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.study-section {
    margin-bottom: 40px;
}

.study-section:last-child {
    margin-bottom: 0;
}

.study-section-title {
    background: linear-gradient(135deg, var(--theme-start, #4caf50), var(--theme-end, #45a049));
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.study-question-item {
    background: white;
    border: 2px solid #e8f5e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.study-question-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.study-question-num {
    background: linear-gradient(135deg, var(--theme-start, #4caf50), var(--theme-end, #45a049));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.study-question-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e3c72;
    line-height: 1.5;
}

.study-options-list {
    margin: 20px 0;
    padding-left: 20px;
}

.study-option-item {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.study-option-number {
    font-weight: 600;
    color: #667eea;
    min-width: 20px;
}

.study-answer-section {
    background: rgba(76, 175, 80, 0.08);
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.study-answer-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.study-answer-line:last-child {
    margin-bottom: 0;
}

.study-answer-label {
    font-weight: 600;
    color: #4caf50;
    min-width: 50px;
}

.study-answer-text {
    color: #2e7d32;
    font-weight: 500;
}

.study-explanation-text {
    color: #666;
    line-height: 1.5;
}

/* 공부하기 섹션 선택 화면 */
.study-section-select-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.study-section-select-header {
    text-align: center;
    margin-bottom: 30px;
}

.study-section-select-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.study-section-select-header p {
    font-size: 1.1rem;
    color: #666;
}

.study-section-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.study-section-btn {
    background: linear-gradient(135deg, var(--theme-start, #4caf50) 0%, var(--theme-end, #45a049) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.study-section-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.study-section-btn.all-sections {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 테마 클래스: 각 섹션/전체용 색상 변수 */
.theme-ezra { --theme-start: #667eea; --theme-end: #764ba2; --theme-accent: #667eea; }
.theme-nehemiah { --theme-start: #4caf50; --theme-end: #45a049; --theme-accent: #4caf50; }
.theme-esther { --theme-start: #ff7e5f; --theme-end: #feb47b; --theme-accent: #ff7e5f; }
.theme-all { --theme-start: #00bcd4; --theme-end: #2196f3; --theme-accent: #0d47a1; }

/* 예비 테마 (필요시 확장) */
.theme-alt1 { --theme-start: #00bcd4; --theme-end: #2196f3; --theme-accent: #2196f3; }
.theme-alt2 { --theme-start: #ff6a88; --theme-end: #ff99ac; --theme-accent: #ff6a88; }

.study-section-btn.all-sections:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.study-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.study-section-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.study-section-actions {
    text-align: center;
}

/* 문제 수 선택 화면 */
.question-count-select-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.question-count-select-header {
    text-align: center;
    margin-bottom: 30px;
}

.question-count-select-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.question-count-select-header p {
    font-size: 1.1rem;
    color: #666;
}

.question-count-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.count-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.count-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.count-btn.all-count {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1e3c72;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.count-btn.all-count:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.count-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.count-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.question-count-actions {
    text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .screen {
        padding: 10px;
        padding-bottom: 70px; /* 모바일에서도 푸터와 간섭 방지 */
    }
    
    .golden-bell {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .bell-icon {
        font-size: 60px;
        margin-bottom: 15px;
    }
    
    .start-options {
        flex-direction: column;
        align-items: center;
        margin: 30px 0;
    }
    
    .info-box {
        margin-top: 20px;
    }
    
    .church-logo img {
        max-height: 50px;
    }
    
    .study-section-select-container,
    .question-count-select-container {
        padding: 30px 20px;
    }
    
    .question-count-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .count-number {
        font-size: 1.3rem;
    }
    
    .quiz-header {
        flex-direction: column;
        text-align: center;
    }
    
    .quiz-info {
        gap: 20px;
    }
    
    .question-container {
        padding: 30px 20px;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .options-container {
        padding: 0 20px 20px;
    }
    
    .quiz-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    /* 공부하기 모드 반응형 */
    .study-sheet-container {
        margin: 2vh auto 3vh;
        max-height: 96vh;
    }
    
    .study-sheet-header {
        padding: 20px;
    }
    
    .study-title h2 {
        font-size: 1.5rem;
    }
    
    .study-sheet-content {
        padding: 20px;
        max-height: 75vh;
    }
    
    .study-question-item {
        padding: 20px;
    }
    
    .study-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .study-question-text {
        font-size: 1rem;
    }
    
    .study-answer-section {
        padding: 15px;
    }
}

/* === Kids Theme Enhancements (Overrides and Additions) === */
:root {
    --kids-sky-start: #a1c4fd;
    --kids-sky-end:   #c2ffd8;
    --kids-primary:   #ffd000;  /* bright yellow */
    --kids-blue:      #4facfe;  /* sky blue */
    --kids-cyan:      #00f2fe;  /* cyan */
    --kids-green:     #7bed9f;  /* light green */
    --kids-pink:      #ff9ff3;  /* playful pink */
    --kids-purple:    #a29bfe;  /* soft purple */
    --kids-orange:    #ffb86c;  /* peach/orange */
}

/* Subtle animated background doodles */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: -10% -10% auto -10%;
    height: 140vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
    filter: blur(0.5px) saturate(1.05);
}

/* Bubbles/Stars layer */
body::before {
    background:
      radial-gradient(12px 12px at 10% 20%, rgba(255,255,255,0.9) 0 50%, transparent 51%) no-repeat,
      radial-gradient(10px 10px at 80% 30%, rgba(255,255,255,0.9) 0 50%, transparent 51%) no-repeat,
      radial-gradient(8px  8px  at 50% 70%, rgba(255,255,255,0.9) 0 50%, transparent 51%) no-repeat,
      radial-gradient(6px  6px  at 25% 85%, rgba(255,255,255,0.9) 0 50%, transparent 51%) no-repeat,
      radial-gradient(14px 14px at 65% 60%, rgba(255,255,255,0.9) 0 50%, transparent 51%) no-repeat;
    animation: kidsFloat 28s linear infinite;
}

/* Soft color blobs layer */
body::after {
    background:
      radial-gradient(180px 120px at 15% 10%, rgba(255,208,0,0.16) 0, transparent 60%),
      radial-gradient(220px 140px at 80% 20%, rgba(79,172,254,0.18) 0, transparent 60%),
      radial-gradient(200px 160px at 30% 80%, rgba(0,242,254,0.16) 0, transparent 60%),
      radial-gradient(220px 140px at 70% 70%, rgba(255,159,243,0.16) 0, transparent 60%);
    animation: kidsDrift 36s ease-in-out infinite;
}

@keyframes kidsFloat {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-20px) translateX(10px); }
  100% { transform: translateY(0) translateX(0); }
}

@keyframes kidsDrift {
  0% { transform: translateY(0) }
  50% { transform: translateY(-25px) }
  100% { transform: translateY(0) }
}

/* Start screen card: add playful vibe */
.golden-bell {
    position: relative;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}

.bell-icon {
    text-shadow: 0 6px 16px rgba(255,208,0,0.35);
}

.main-title {
    color: #0b5fff;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #0b5fff, #00d2ff, #0b5fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: kidsShimmer 3.5s linear infinite;
}

@keyframes kidsShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Fun floating icons around the title */
.fun-decor {
    position: absolute;
    inset: 10px 10px auto 10px;
    height: 0;
    pointer-events: none;
}
.fun-decor .decor {
    position: absolute;
    font-size: 22px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
    animation: floatY 4s ease-in-out infinite;
}
.fun-decor .decor i { color: #ffb703; }
.fun-decor .decor-star { left: 6%;  top: -6px;  animation-duration: 5.2s; }
.fun-decor .decor-rocket { right: 8%; top: -8px; color: #0ea5e9; animation-duration: 4.4s; }
.fun-decor .decor-gamepad { left: 8%; top: 38px; color: #7c3aed; animation-duration: 3.8s; }
.fun-decor .decor-football { right: 12%; top: 40px; color: #10b981; animation-duration: 5.8s; }
.fun-decor .decor-bolt { left: 50%; top: -2px; transform: translateX(-50%); color: #f59e0b; animation-duration: 4.9s; }

@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Buttons: bouncy hover */
.start-btn,
.action-btn,
.count-btn,
.study-section-btn,
.section-btn {
    transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.start-btn:hover,
.action-btn:hover:not(:disabled),
.count-btn:hover,
.study-section-btn:hover,
.section-btn:hover {
    transform: translateY(-4px) scale(1.02);
}

.start-btn:active,
.action-btn:active,
.count-btn:active,
.study-section-btn:active,
.section-btn:active {
    transform: translateY(0) scale(0.99);
}

/* Brighter button themes */
.start-btn.secondary {
    background: linear-gradient(45deg, var(--kids-blue), var(--kids-cyan));
    box-shadow: 0 10px 24px rgba(79,172,254,0.35);
}
.start-btn.study {
    background: linear-gradient(45deg, #34d399, #10b981);
    box-shadow: 0 10px 24px rgba(16,185,129,0.35);
}
.action-btn.secondary {
    background: #fff;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}
.action-btn.secondary:hover {
    background: #f9fafb;
}

/* Quiz headers: sky/cyan gradient */
.quiz-header,
.review-header {
    background: linear-gradient(135deg, var(--kids-blue), var(--kids-cyan));
}

.question-number {
    background: linear-gradient(135deg, var(--kids-blue), var(--kids-cyan));
}

.option-number {
    background: linear-gradient(135deg, #ff6a88, #ff99ac);
}

.option-btn:hover {
    border-color: #0ea5e9;
    background: rgba(14,165,233,0.06);
}

/* Feedback animations */
@keyframes kidsPop {
  0% { transform: scale(1); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes kidsShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
.option-btn.correct { animation: kidsPop 420ms ease; }
.option-btn.incorrect { animation: kidsShake 320ms ease; }

/* Result screen: confetti celebration */
.result-container {
    position: relative;
    overflow: hidden;
}
.result-container::before,
.result-container::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -20%; height: 140%;
    pointer-events: none;
    background-image:
      linear-gradient(transparent 0 96%, rgba(255,208,0,0.9) 98%, transparent 100%),
      linear-gradient(transparent 0 96%, rgba(79,172,254,0.9) 98%, transparent 100%),
      linear-gradient(transparent 0 96%, rgba(16,185,129,0.9) 98%, transparent 100%),
      linear-gradient(transparent 0 96%, rgba(255,159,243,0.9) 98%, transparent 100%);
    background-size: 6px 24px, 8px 28px, 6px 22px, 8px 30px;
    background-repeat: repeat;
    background-position:
      10% -40px,
      35% -20px,
      65% -60px,
      90% -10px;
    animation: confettiFall 2.4s linear infinite;
    opacity: 0.35;
}
.result-container::after {
    background-position:
      20% -20px,
      50% -50px,
      75% -30px,
      5%  -60px;
    animation-duration: 2.9s;
    opacity: 0.28;
}
@keyframes confettiFall {
  0% { transform: translateY(-10%); }
  100% { transform: translateY(25%); }
}

/* Info boxes brighter tint */
.info-box { background: rgba(14,165,233,0.08); }
.info-item { color: #0b5fff; }

/* Study header theme brighter when not overridden */
.study-sheet-header {
    background: linear-gradient(135deg, #34d399, #10b981);
}
.study-section-title,
.study-question-num {
    background: linear-gradient(135deg, #34d399, #10b981);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
