/* 아랍어 학습관 메인 컨테이너 */
.ar-container {
    max-width: 920px;
    margin: 20px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    font-family: 'Malgun Gothic', sans-serif;
}

    .ar-container h1 {
        color: #0e6251;
        font-size: 1.8em;
        margin-bottom: 8px;
    }

.ar-subtitle {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 25px;
}

.ar-mt-40 {
    margin-top: 40px;
}

.ar-rtl {
    direction: rtl;
    unicode-bidi: isolate;
}

/* 섹션 헤더 및 연속 재생 버튼 */
.ar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #e8f8f5;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.ar-section-title {
    color: #0e6251;
    font-size: 1.3em;
    text-align: left;
    margin: 0;
}

.ar-play-all-btn {
    background: #16a085;
    color: #ffffff;
    border: none;
    padding: 7px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(22, 160, 133, 0.25);
    transition: all 0.2s ease;
}

    .ar-play-all-btn:hover {
        background: #117864;
        transform: translateY(-1px);
    }

    .ar-play-all-btn.playing {
        background: #c0392b;
        box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
    }

/* 자동 연속 재생 중 현재 읽고 있는 카드 하이라이트 */
.ar-card-speaking {
    border-color: #d4ac0d !important;
    background-color: #fef9e7 !important;
    transform: translateY(-6px) scale(1.03) !important;
    box-shadow: 0 8px 20px rgba(212, 172, 13, 0.38) !important;
    z-index: 2;
}

/* 상단 네비게이션 탭 */
.ar-nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.ar-tab-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    color: #555;
    padding: 10px 18px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-tab-btn:hover {
        border-color: #0e6251;
        color: #0e6251;
    }

    .ar-tab-btn.active {
        background: #0e6251;
        border-color: #0e6251;
        color: #ffffff;
        box-shadow: 0 4px 10px rgba(14, 98, 81, 0.3);
    }

/* 탭 콘텐츠 전환 효과 */
.ar-tab-content {
    display: none;
    animation: arFadeIn 0.3s ease;
}

    .ar-tab-content.active {
        display: block;
    }

@keyframes arFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. 아랍어 알파벳 플래시 카드 그리드 */
.ar-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 15px;
}

.ar-card {
    background: #fff;
    border: 2px solid #a3e4d7;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .ar-card:hover {
        transform: translateY(-5px);
        border-color: #0e6251;
        box-shadow: 0 5px 15px rgba(14,98,81,0.2);
    }

    .ar-card .letter {
        font-size: 2.3em;
        font-weight: bold;
        color: #0e6251;
        margin: 0;
        line-height: 1.3;
    }

    .ar-card .ro-pron {
        font-size: 0.82em;
        color: #b7950b;
        font-weight: bold;
        margin-top: 2px;
    }

    .ar-card .emoji {
        font-size: 1.9em;
        margin: 6px 0;
    }

    .ar-card .word {
        font-size: 0.9em;
        color: #34495e;
        font-weight: bold;
        line-height: 1.4;
    }

.ar-sound-btn {
    background: #0e6251;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
}

/* 2. 단모음 · 장모음 · 탄윈 카드 */
.ar-pron-desc {
    color: #555;
    margin-bottom: 20px;
    font-size: 0.95em;
    text-align: left;
}

.ar-pron-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 15px;
}

.ar-pron-card {
    background: #fff;
    border: 2px solid #f9e79f;
    border-radius: 12px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-pron-card:hover {
        transform: translateY(-5px);
        border-color: #d4ac0d;
        box-shadow: 0 5px 15px rgba(212,172,13,0.25);
    }

.ar-badge-type {
    display: inline-block;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 6px;
}

.ar-badge-short {
    background: #e8f8f5;
    color: #0e6251;
    border: 1px solid #a3e4d7;
}

.ar-badge-long {
    background: #fef9e7;
    color: #b7950b;
    border: 1px solid #f9e79f;
}

.ar-badge-tan {
    background: #f5eef8;
    color: #8e44ad;
    border: 1px solid #d7bde2;
}

.ar-pron-symbol {
    font-size: 1.65em;
    font-weight: bold;
    color: #2c3e50;
    margin: 4px 0;
    line-height: 1.4;
}

.ar-pron-sound {
    font-size: 0.9em;
    color: #c0392b;
    font-weight: bold;
    margin-bottom: 6px;
}

.ar-pron-emoji {
    font-size: 1.8em;
    margin: 5px 0;
}

.ar-pron-word {
    font-size: 0.95em;
    font-weight: bold;
    color: #34495e;
    line-height: 1.4;
}

.ar-pron-card .ar-sound-btn {
    background: #b7950b;
}

/* 3. 특수 발음 기호 및 정관사 연음 카드 */
.ar-accent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
}

.ar-accent-card {
    background: #fff;
    border: 2px solid #d6eaf8;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-accent-card:hover {
        transform: translateY(-5px);
        border-color: #2980b9;
        box-shadow: 0 5px 15px rgba(41,128,185,0.18);
    }

.ar-acc-name {
    font-size: 0.78em;
    color: #7f8c8d;
    font-weight: bold;
    margin-bottom: 4px;
}

.ar-acc-symbol {
    font-size: 1.6em;
    font-weight: bold;
    color: #2980b9;
    margin: 4px 0;
    line-height: 1.4;
}

.ar-acc-sound {
    font-size: 0.82em;
    color: #2c3e50;
    background: #ebf5fb;
    padding: 4px 6px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.ar-acc-emoji {
    font-size: 1.8em;
    margin: 4px 0;
}

.ar-acc-word {
    font-size: 0.95em;
    font-weight: bold;
    color: #34495e;
    line-height: 1.4;
}

.ar-accent-card .ar-sound-btn {
    background: #2980b9;
}

.ar-liaison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 15px;
}

.ar-liaison-card {
    background: #e8f8f5;
    border: 2px solid #76d7c4;
    border-radius: 12px;
    padding: 18px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-liaison-card:hover {
        transform: translateY(-5px);
        border-color: #0e6251;
        background: #ffffff;
        box-shadow: 0 5px 15px rgba(14,98,81,0.18);
    }

.ar-lia-rule {
    display: inline-block;
    background: #0e6251;
    color: white;
    font-size: 0.75em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.ar-lia-phrase {
    font-size: 1.4em;
    font-weight: bold;
    color: #2c3e50;
    margin: 4px 0;
    line-height: 1.4;
}

.ar-lia-pron {
    font-size: 1em;
    font-weight: bold;
    color: #c0392b;
    margin-bottom: 6px;
}

.ar-lia-meaning {
    font-size: 0.88em;
    color: #555;
    margin-bottom: 6px;
}

/* 4. 기초 인사말 · 숫자 · 요일 · 월 단어장 */
.ar-greet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 15px;
}

.ar-greet-card {
    background: #fff;
    border: 2px solid #a3e4d7;
    border-radius: 12px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-greet-card:hover {
        transform: translateY(-5px);
        border-color: #16a085;
        box-shadow: 0 5px 15px rgba(22,160,133,0.18);
    }

.ar-grt-emoji {
    font-size: 2em;
    margin-bottom: 6px;
}

.ar-grt-ar {
    font-size: 1.45em;
    font-weight: bold;
    color: #0e6251;
    margin-bottom: 4px;
    line-height: 1.4;
}

.ar-grt-pron {
    font-size: 0.85em;
    color: #c0392b;
    font-weight: bold;
    margin-bottom: 6px;
}

.ar-grt-ko {
    font-size: 0.9em;
    color: #34495e;
    font-weight: bold;
}

.ar-greet-card .ar-sound-btn {
    background: #16a085;
}

.ar-num-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.ar-num-card {
    background: #fef9e7;
    border: 2px solid #f9e79f;
    border-radius: 12px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-num-card:hover {
        transform: translateY(-5px);
        border-color: #b7950b;
        background: #fff;
        box-shadow: 0 5px 15px rgba(183,149,11,0.18);
    }

.ar-num-digit {
    font-size: 1.55em;
    font-weight: bold;
    color: #b7950b;
    line-height: 1.2;
}

.ar-num-ar {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    margin: 4px 0 2px 0;
    line-height: 1.4;
}

.ar-num-pron {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: bold;
}

.ar-num-card .ar-sound-btn {
    background: #d4ac0d;
}

.ar-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
}

.ar-day-card {
    background: #fff;
    border: 2px solid #d4efdf;
    border-radius: 12px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-day-card:hover {
        transform: translateY(-5px);
        border-color: #27ae60;
        box-shadow: 0 5px 15px rgba(39,174,96,0.18);
    }

.ar-day-ko {
    font-size: 0.85em;
    font-weight: bold;
    color: #27ae60;
    background: #eafaf1;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 6px;
}

.ar-day-ar {
    font-size: 1.45em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
    line-height: 1.4;
}

.ar-day-pron {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: bold;
}

.ar-day-card .ar-sound-btn {
    background: #27ae60;
}

.ar-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.ar-month-card {
    background: #fff;
    border: 2px solid #ebdef0;
    border-radius: 12px;
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .ar-month-card:hover {
        transform: translateY(-5px);
        border-color: #8e44ad;
        box-shadow: 0 5px 15px rgba(142,68,173,0.18);
    }

.ar-mon-badge {
    font-size: 0.8em;
    font-weight: bold;
    color: #8e44ad;
    background: #f5eef8;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 6px;
}

.ar-mon-ar {
    font-size: 1.45em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
    line-height: 1.4;
}

.ar-mon-pron {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: bold;
}

.ar-month-card .ar-sound-btn {
    background: #8e44ad;
}
/* 5. 듣고 맞추기 퀴즈 */
.ar-listen-box {
    background: #e8f8f5;
    border: 2px solid #76d7c4;
    border-radius: 15px;
    padding: 25px 20px;
    max-width: 680px;
    margin: 0 auto;
}

.ar-quiz-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ar-filter-btn {
    background: #ffffff;
    border: 1px solid #0e6251;
    color: #0e6251;
    padding: 6px 14px;
    font-size: 0.88em;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

    .ar-filter-btn:hover {
        background: #d1f2eb;
    }

    .ar-filter-btn.active {
        background: #0e6251;
        border-color: #0e6251;
        color: #ffffff;
    }

.ar-score-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #76d7c4;
    font-weight: bold;
    color: #0e6251;
}

.ar-score-num {
    font-size: 1.2em;
    color: #27ae60;
}

.ar-big-speaker-btn {
    background: #0e6251;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 98, 81, 0.3);
    transition: transform 0.15s;
    margin: 10px 0 25px 0;
}

    .ar-big-speaker-btn:hover {
        background: #0b5345;
        transform: scale(1.05);
    }

    .ar-big-speaker-btn:active {
        transform: scale(0.98);
    }

.ar-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 550px) {
    .ar-options-grid {
        grid-template-columns: 1fr;
    }
}

.ar-option-card {
    background: white;
    border: 2px solid #a3e4d7;
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: bold;
    color: #2c3e50;
}

    .ar-option-card:hover {
        border-color: #0e6251;
        background: #e8f8f5;
    }

    .ar-option-card.correct {
        background: #d4edda;
        border-color: #28a745;
        color: #155724;
    }

    .ar-option-card.wrong {
        background: #f8d7da;
        border-color: #dc3545;
        color: #721c24;
        opacity: 0.7;
    }

.ar-opt-tag {
    font-size: 0.72em;
    color: #7f8c8d;
    background: #f1f2f6;
    padding: 2px 8px;
    border-radius: 10px;
}

.ar-opt-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.08em;
    line-height: 1.4;
}

.ar-opt-emoji {
    font-size: 1.6em;
}

.ar-feedback-msg {
    font-size: 1.15em;
    font-weight: bold;
    min-height: 28px;
    margin-bottom: 15px;
}

.ar-next-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1.05em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: none;
}

    .ar-next-btn:hover {
        background: #219150;
    }
