/* 비기너 레벨 전용 CSS - intermediate 스타일 적용 */

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

/* 기본 컨테이너 스타일 */
.learning-container {
    padding: 20px;
    padding-bottom: 120px;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Noto Sans KR', sans-serif;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.theory-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.practice-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    padding-bottom: 100px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

/* ========== 백 헤더 스타일 (intermediate 스타일) ========== */
.back-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.back-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.back-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 1;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 2;
    position: relative;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-button i {
    font-size: 18px;
}

.back-header h1 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    flex: 1;
    text-align: center;
}

.level-indicator {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
    position: relative;
}

.level-indicator i {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ========== 토픽 토글 버튼 스타일 (intermediate 스타일) ========== */
.topic-toggle-container {
    margin-bottom: 25px;
}

.topic-toggle-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.topic-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.topic-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.topic-toggle-btn:hover::before {
    left: 100%;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.btn-text {
    font-size: 16px;
    font-weight: 600;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

/* ========== 주제 선택기 스타일 (intermediate 스타일) ========== */
.topic-selector {
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.topic-selector.visible {
    opacity: 1;
    transform: translateY(0);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.topic-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.topic-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic-card.current {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.topic-card.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
}

.topic-card.unavailable .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
    color: #6c757d;
}

.topic-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.topic-info {
    flex: 1;
}

.topic-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.topic-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.current-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
    letter-spacing: 0.5px;
}

/* ========== 이론 패널 스타일 (intermediate 스타일) ========== */
.lesson-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.lesson-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.lesson-header::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 1;
}

.lesson-header h2 {
    color: white;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    letter-spacing: -0.5px;
}

/* 문법 개요 스타일 */
.grammar-overview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.grammar-overview h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grammar-overview h3 i {
    color: #667eea;
}

/* --- 타임라인 스타일 개선 --- */
.grammar-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    gap: 24px;
    position: relative;
    padding: 30px 0 20px 0;
}

.timeline-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.10);
    padding: 24px 18px 18px 18px;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #f3f3fa;
}

.timeline-item:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.18);
    border-color: #764ba2;
}

.timeline-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #764ba2 0%, #4CAF50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.12);
    font-size: 28px;
    color: #fff;
    border: 3px solid #fff;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.2s;
}

.timeline-item:hover .timeline-icon {
    box-shadow: 0 4px 24px #764ba244;
    background: linear-gradient(135deg, #4CAF50 0%, #764ba2 100%);
}

.timeline-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #764ba2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timeline-content p {
    font-size: 15px;
    color: #555;
    margin: 0;
}

@media (max-width: 900px) {
    .grammar-timeline {
        flex-direction: column;
        gap: 32px;
        padding: 0 0 0 0;
    }
    .timeline-item {
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
    }
}

.grammar-item {
    text-align: center;
    padding: 25px 20px;
    border-radius: 16px;
    flex: 1;
    color: #2c3e50;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.grammar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.grammar-item:hover::before {
    transform: scaleX(1);
}

/* 명사 스타일 */
.grammar-item.nouns {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.15);
}

.grammar-item.nouns:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.25);
    border-color: #45a049;
}

.grammar-item.nouns .grammar-icon {
    color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* 대명사 스타일 */
.grammar-item.pronouns {
    border-color: #2196F3;
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.15);
}

.grammar-item.pronouns:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.25);
    border-color: #1976d2;
}

.grammar-item.pronouns .grammar-icon {
    color: #2196F3;
    background: linear-gradient(135deg, #2196F3, #1976d2);
}

/* 관사 스타일 */
.grammar-item.articles {
    border-color: #FF9800;
    background: linear-gradient(135deg, #fffbf8 0%, #fff3e0 100%);
    box-shadow: 0 6px 25px rgba(255, 152, 0, 0.15);
}

.grammar-item.articles:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 152, 0, 0.25);
    border-color: #f57c00;
}

.grammar-item.articles .grammar-icon {
    color: #FF9800;
    background: linear-gradient(135deg, #FF9800, #f57c00);
}

/* be동사 스타일 */
.grammar-item.be-verbs {
    border-color: #9C27B0;
    background: linear-gradient(135deg, #fdf8ff 0%, #f3e5f5 100%);
    box-shadow: 0 6px 25px rgba(156, 39, 176, 0.15);
}

.grammar-item.be-verbs:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(156, 39, 176, 0.25);
    border-color: #7b1fa2;
}

.grammar-item.be-verbs .grammar-icon {
    color: #9C27B0;
    background: linear-gradient(135deg, #9C27B0, #7b1fa2);
}

/* 일반동사 스타일 */
.grammar-item.simple-verbs {
    border-color: #E91E63;
    background: linear-gradient(135deg, #fff8fa 0%, #fce4ec 100%);
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.15);
}

.grammar-item.simple-verbs:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(233, 30, 99, 0.25);
    border-color: #c2185b;
}

.grammar-item.simple-verbs .grammar-icon {
    color: #E91E63;
    background: linear-gradient(135deg, #E91E63, #c2185b);
}

/* 형용사 스타일 */
.grammar-item.adjectives {
    border-color: #00BCD4;
    background: linear-gradient(135deg, #f8feff 0%, #e0f7fa 100%);
    box-shadow: 0 6px 25px rgba(0, 188, 212, 0.15);
}

.grammar-item.adjectives:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 188, 212, 0.25);
    border-color: #0097a7;
}

.grammar-item.adjectives .grammar-icon {
    color: #00BCD4;
    background: linear-gradient(135deg, #00BCD4, #0097a7);
}

.grammar-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 26px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grammar-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.grammar-item:hover .grammar-icon::before {
    left: 100%;
}

.grammar-item:hover .grammar-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.grammar-item h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.grammar-item:hover h4 {
    transform: translateY(-2px);
}

.grammar-item p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.grammar-item:hover p {
    color: #495057;
}

/* 문법 섹션 스타일 */
.grammar-section {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.grammar-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grammar-formula, .grammar-usage {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.example-box {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.example-box h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.example-box ul {
    margin: 0;
    padding-left: 20px;
}

.example-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.usage-tip {
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 3px solid #ffc107;
}

.quick-reference {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.quick-reference h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.ref-item {
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

/* ========== 실습 패널 스타일 (intermediate 스타일) ========== */
.progress-indicator {
    margin-bottom: 25px;
    text-align: center;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #F7931E);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* 세트 헤더 스타일 */
.set-header {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.set-header h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
}

.set-header p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
}

/* 문제 카드 스타일 */
.question-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #F7931E, #667eea, #764ba2);
}

.question-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.question-text {
    margin-bottom: 25px;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fdfdfd;
    position: relative;
    overflow: hidden;
}

.option-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s;
}

.option-label:hover {
    border-color: #FF6B35;
    background: #fff8f6;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.option-label:hover::before {
    left: 100%;
}

.option-label input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #FF6B35;
}

.option-text {
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.4;
}

.check-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.check-btn:hover::before {
    left: 100%;
}

/* ========== 최종 결과 화면 스타일 ========== */
.final-score {
    text-align: center;
    padding: 40px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.score-number {
    font-size: 36px;
    font-weight: bold;
}

.score-text {
    font-size: 14px;
    opacity: 0.9;
}

.score-message {
    font-size: 18px;
    margin: 20px 0;
    color: #2c3e50;
}

.detailed-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.detailed-results h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.set-scores {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.set-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.set-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.set-score {
    font-weight: bold;
    color: #667eea;
    margin-right: 15px;
}

.set-progress {
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.set-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    margin: 0 5px;
}

.btn.primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.result-buttons {
    margin-top: 20px;
}

/* 설명 박스 스타일 */
.explanation {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.explanation.correct {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.explanation.incorrect {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result-icon {
    font-size: 24px;
    margin-top: 2px;
}

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

/* ========== Tip 버튼 스타일 ========== */
.tip-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
    position: relative;
    animation: glow 2s infinite alternate;
}

.tip-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.tip-btn i {
    font-size: 10px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

@keyframes glow {
    from { box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3); }
    to { box-shadow: 0 2px 6px rgba(255, 215, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.3); }
}

/* ========== Tip 모달 스타일 ========== */
.tip-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.tip-modal.visible {
    opacity: 1;
}

.tip-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}

.tip-modal.visible .tip-modal-content {
    transform: scale(1);
}

.tip-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.tip-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.tip-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.tip-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tip-modal-body {
    padding: 25px;
}

.tip-section {
    margin-bottom: 20px;
}

.tip-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-section h4 i {
    color: #667eea;
}

.tip-content {
    line-height: 1.6;
    color: #495057;
    margin-bottom: 15px;
}

.tip-examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.tip-examples h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.tip-examples ul {
    margin: 0;
    padding-left: 20px;
}

.tip-examples li {
    margin-bottom: 5px;
    color: #495057;
}

.tip-highlight {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    margin: 15px 0;
}

.tip-highlight strong {
    color: #856404;
}

.memory-tip {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #17a2b8;
    margin-top: 15px;
}

.memory-tip h5 {
    color: #0c5460;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.memory-tip p {
    color: #0c5460;
    margin: 0;
    font-size: 14px;
}

/* 반응형 - 모바일용 back-header */
@media (max-width: 768px) {
    .learning-container {
        padding: 15px;
        padding-bottom: 150px;
    }
    
    .split-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .theory-panel {
        position: static;
        order: 1;
        padding: 20px;
    }
    
    .practice-panel {
        order: 2;
        padding: 20px;
        padding-bottom: 120px;
    }
    
    .back-header {
        padding: 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .back-header h1 {
        font-size: 20px;
        flex: 1;
        text-align: center;
    }
    
    .level-indicator {
        align-self: center;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .lesson-header {
        padding: 20px;
    }
    
    .lesson-header h2 {
        font-size: 24px;
    }
    
    .grammar-timeline {
        flex-direction: column;
        gap: 12px;
        padding: 10px 0;
    }
    .grammar-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
        min-height: 64px;
        gap: 16px;
    }
    .grammar-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .grammar-item-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        min-width: 0;
    }
    .grammar-item h4, .grammar-item p {
        margin-bottom: 0;
        text-align: left;
    }
    .grammar-item h4 {
        font-size: 16px;
        margin-bottom: 2px;
    }
    .grammar-item p {
        font-size: 13px;
    }
    .grammar-item .tip-btn {
        margin-left: 6px;
    }
    .topic-grid {
        grid-template-columns: 1fr;
    }
    .reference-grid {
        grid-template-columns: 1fr;
    }
    .question-card {
        padding: 20px;
    }
    .question-text {
        font-size: 16px;
    }
    .option-label:hover {
        transform: none;
    }
    .option-label {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .back-header h1 {
        font-size: 22px;
    }
    
    .level-indicator {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* 한국어 폰트 */
.korean-text {
    font-family: 'Noto Sans KR', sans-serif;
}

.grammar-icon i {
    color: #fff !important;
}

/* beginner02.html 전용 아이콘 색상 */
.grammar-timeline .subject .grammar-icon { background: #4A90E2; }
.grammar-timeline .possessive .grammar-icon { background: #F5A623; }
.grammar-timeline .object .grammar-icon { background: #7ED321; }

/* beginner03.html 전용 아이콘 색상 */
.grammar-timeline .indefinite-a .grammar-icon { background: #FF7043; }
.grammar-timeline .indefinite-an .grammar-icon { background: #FFD600; }
.grammar-timeline .definite .grammar-icon { background: #42A5F5; }

.info-section {
  background: #f5f7fa;
  border: 2px solid #e0e4ea;
  border-radius: 14px;
  padding: 18px 20px 12px 20px;
  margin: 18px 0 28px 0;
  box-shadow: 0 2px 10px rgba(80,120,200,0.06);
}
.info-section .goal-block {
  font-size: 16px;
  margin-bottom: 8px;
  color: #333;
}
.info-section .topic-summary {
  font-size: 15px;
  color: #555;
}

.question-block:not(:first-child) .question-number {
    margin-top: 24px;
}

/* ========== 퀴즈 관련 스타일 ========== */

/* 퀴즈 컨테이너 */
.quiz-container {
    margin-top: 20px;
}

/* 세트 헤더 */
.set-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.set-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.set-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* 질문 컨테이너 */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 질문 블록 */
.question-block {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.question-block:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

/* 질문 헤더 */
.question-header {
    margin-bottom: 20px;
}

.question-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

/* 질문 내용 */
.question-content {
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 옵션 컨테이너 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 옵션 아이템 */
.option-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.option-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(5px);
}

.option-item:hover::before {
    left: 100%;
}

.option-item input[type="radio"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.option-item input[type="radio"]:checked + .option-text {
    color: #667eea;
    font-weight: 600;
}

.option-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 퀴즈 컨트롤 */
.quiz-controls {
    margin-top: 30px;
    text-align: center;
}

.check-answer-btn, .next-set-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.check-answer-btn:hover, .next-set-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 질문 결과 */
.question-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.question-result.correct {
    background: #d4edda;
    border: 2px solid #c3e6cb;
}

.question-result.incorrect {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
}

.result-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.result-icon.correct {
    background: #28a745;
    color: white;
}

.result-icon.incorrect {
    background: #dc3545;
    color: white;
}

.explanation-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.explanation-text strong {
    color: #333;
    font-weight: 600;
}

/* 세트 결과 */
.set-result {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.set-result-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
}

.set-score {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.encouragement {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* 최종 결과 */
.final-result {
    text-align: center;
    padding: 30px;
}

.final-result h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.score-display {
    margin-bottom: 30px;
}

.total-score {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.percentage {
    font-size: 24px;
    color: #666;
    font-weight: 600;
}

.set-results {
    margin-bottom: 30px;
}

.set-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.set-title {
    font-weight: 600;
    color: #333;
}

.set-score {
    font-weight: 700;
    color: #667eea;
}

.final-encouragement {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.final-encouragement p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 비활성화된 옵션 */
.option-item input[type="radio"]:disabled + .option-text {
    opacity: 0.6;
}

.option-item input[type="radio"]:disabled {
    opacity: 0.6;
}

/* 스피커 아이콘 스타일 */
.speaker-icon {
    color: #4CAF50;
    cursor: pointer;
    margin-right: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.speaker-icon:hover {
    color: #45a049;
    transform: scale(1.1);
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.speaker-icon:active {
    transform: scale(0.95);
}

/* 팁 모달 내 스피커 아이콘 특별 스타일 */
.tip-modal-body .speaker-icon {
    color: #2196F3;
    font-size: 14px;
    margin-right: 6px;
}

.tip-modal-body .speaker-icon:hover {
    color: #1976D2;
    text-shadow: 0 0 6px rgba(33, 150, 243, 0.4);
}

/* 리스트 아이템 내 스피커 아이콘 정렬 */
.tip-modal-body ul li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.tip-modal-body ul li strong {
    min-width: 60px;
    margin-right: 8px;
}

.tip-modal-body ul li .speaker-icon {
    flex-shrink: 0;
}
