@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Noto+Sans+JP:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap');

:root {
    --primary-color: #4A90E2;
    --success-color: #2ECC71;
    --error-color: #E74C3C;
    --bg-color: #F5F7FA;
    --text-color: #333;
    --card-bg: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* 앱 컨테이너 (모바일 뷰 중앙 정렬) */
#app-container {
    width: 100%;
    max-width: 480px;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 네비게이션 & 헤더 */
header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

/* 메인 콘텐츠 영역 */
main {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 공통 버튼 스타일 */
.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    text-decoration: none;
    margin-bottom: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

/* 국적/코스 카드 그리드 */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.country-card, .course-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-card:hover, .course-card:hover {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.flag {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* 퀴즈 페이지 스타일 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.quiz-word {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.option-btn {
    padding: 1.5rem;
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background-color: #f8f9fa;
    border-color: #ddd;
}

/* 피드백 모달 (Bottom Sheet) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: flex-end;
    z-index: 100;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    padding: 2rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.correct { color: var(--success-color); }
.wrong { color: var(--error-color); }

.word-detail p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.detail-label {
    font-weight: 600;
    color: #888;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.action-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-btn {
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 유틸리티 */
.hidden { display: none; }
.text-center { text-align: center; }
footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}
