/* ===== Connect English — App ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazirmatn", Tahoma, sans-serif;
}

body {
    background: #f5f7fb;
    min-height: 100vh;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 30px 16px 120px;
}

h1 {
    color: #4f46e5;
    text-align: center;
    margin-bottom: 10px;
}

.welcome {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* ---- cards ---- */

.lesson-card {
    background: white;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

.lesson-card h2 {
    color: #333;
    margin-bottom: 10px;
}

.lesson-card p {
    color: #666;
    margin-bottom: 18px;
}

.lesson-card a {
    display: block;
    text-align: center;
    text-decoration: none;
    background: #4f46e5;
    color: white;
    padding: 14px;
    border-radius: 12px;
    transition: .3s;
}

.lesson-card a:hover {
    background: #4338ca;
}

/* ---- general english ---- */

.badge {
    display: inline-block;
    color: white;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.a1 {
    background: #22c55e;
}

.a2 {
    background: #3b82f6;
}

.b1 {
    background: #f59e0b;
}

.b2 {
    background: #8b5cf6;
}

.placement-card {
    border: 2px dashed #4f46e5;
}

/* ---- profile ---- */

.profile-card {
    background: white;
    border-radius: 22px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    margin-bottom: 25px;
}

.avatar {
    width: 80px;
    height: 80px;
    margin: auto;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.profile-card h2 {
    color: #333;
    margin-bottom: 10px;
}

.profile-card p {
    color: #666;
    margin-bottom: 20px;
}

.complete-profile {
    display: block;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
}

.menu-item {
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 18px 20px;
    border-radius: 18px;
    margin-bottom: 14px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
    transition: .25s;
}

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

.logout {
    background: #fff1f2;
    color: #dc2626;
}

/* ---- bottom nav ---- */

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 600px;
    height: 75px;
    background: white;
    border-radius: 28px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
    z-index: 999;
}

.bottom-nav a {
    text-decoration: none;
    color: #777;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    transition: .3s;
}

.bottom-nav .icon {
    font-size: 20px;
}

.bottom-nav a:hover {
    color: #4f46e5;
}

.bottom-nav a.active {
    color: #4f46e5;
    transform: translateY(-5px);
}

.bottom-nav a.active .icon {
    font-size: 26px;
}

/* ---- mobile ---- */

@media(max-width:400px) {
    .container {
        padding: 25px 12px 110px;
    }

    h1 {
        font-size: 24px;
    }

    .welcome {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .lesson-card {
        padding: 18px;
        border-radius: 16px;
    }

    .profile-card {
        padding: 22px 16px;
    }

    .menu-item {
        padding: 16px;
    }

    .bottom-nav {
        height: 65px;
        border-radius: 22px;
    }

    .bottom-nav a {
        font-size: 10px;
    }
}

/* ---- spacer برای جلوگیری از پوشیده‌شدن محتوا زیر منو ---- */

.nav-spacer {
    height: 110px;
}

/* ---- section head: عنوان و دکمه صدا در یک ردیف ---- */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* ---- دکمه صدا: خنثی، دایره‌ای، لمسی ---- */

.audio-btn {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f2f6;
    color: #565b6b;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    margin: 0;
    box-shadow: none;
    padding: 0;
}

.audio-btn:hover {
    background: #e6e8ef;
    transform: scale(1.06);
}

.audio-btn:active {
    transform: scale(.94);
}

/* ---- ردیف مثال: دکمه چپ، هم‌تراز جمله انگلیسی ---- */

.example-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    direction: ltr;
}

.example-row .audio-btn {
    margin-top: 2px;
}

.example-row .content-auto {
    flex: 1;
    min-width: 0;
}

/* ---- جهت خودکار: انگلیسی چپ، فارسی راست ---- */

body .content-auto,
body .content-auto p,
body .content-auto li {
    direction: ltr !important;
    unicode-bidi: plaintext !important;
    text-align: start !important;
}

/* ---- موبایل: اسکرول نرم و قابل لمس ---- */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100dvh;
    overscroll-behavior-y: none;
}

.bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===== موتور تمرین: استیکر، شنیداری، تطبیق ===== */

.q-emoji {
    font-size: 56px;
    text-align: center;
    margin: 6px 0 10px;
}

.listen-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
}

.listen-btn {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: none;
    background: #4f46e5;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(79, 70, 229, .35);
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listen-btn:active {
    transform: scale(.94);
}

.match-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.match-btn {
    padding: 14px 10px;
    font-size: 15px;
    border: 2px solid #dfe6f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: .2s;
    font-family: inherit;
}

.match-btn.selected {
    border-color: #2c6be6;
    background: #eef4ff;
    transform: scale(1.02);
}

.match-btn.matched {
    border-color: #28a745;
    background: #e8f8ec;
    opacity: .55;
    pointer-events: none;
}

.match-btn.mismatch {
    border-color: #dc3545;
    background: #fdeaea;
    animation: shake .3s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ---- دکمه‌های فرم داخل منوی پروفایل ---- */

.menu-form {
    margin: 0;
    width: 100%;
}

.menu-form button.menu-item {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-align: right;
}

/* ---- پروفایل: شماره و فرم نام ---- */

.profile-phone {
    color: #9aa0ae;
    font-size: 13px;
    direction: ltr;
    margin: -6px 0 10px;
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 6px;
    width: 100%;
}

.profile-edit-form input {
    width: 100%;
    height: 46px;
    border: 1px solid #e2e5ec;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    background: #f7f8fa;
    transition: .2s;
    text-align: right;
}

.profile-edit-form input:focus {
    border-color: #4f46e5;
    background: #ffffff;
}

.profile-save-btn {
    border: none;
    border-radius: 12px;
    background: #4f46e5;
    color: #ffffff;
    height: 46px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: .2s;
}

.profile-save-btn:hover {
    background: #4338ca;
}

/* ---- GE سطوح + دسته‌بندی گرامر ---- */

.ge-head {
    text-align: center;
    margin: 24px 0 26px;
}

.ge-head h1 {
    font-size: 22px;
    font-weight: 900;
}

.ge-head p {
    color: #9aa0ae;
    font-size: 13.5px;
    margin-top: 6px;
}

.ge-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.ge-level-card {
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 20px;
    padding: 24px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: .2s;
}

.ge-level-card:hover {
    transform: translateY(-4px);
    border-color: #4f46e5;
    box-shadow: 0 14px 30px rgba(31, 36, 48, .1);
}

.ge-emoji {
    font-size: 34px;
}

.ge-badge {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 900;
    font-size: 13px;
    border-radius: 10px;
    padding: 4px 12px;
}

.ge-level-card h2 {
    font-size: 16px;
}

.ge-level-card p {
    color: #6b7280;
    font-size: 12.5px;
    line-height: 1.9;
}

.ge-count {
    color: #9aa0ae;
    font-size: 12px;
    font-weight: 700;
    margin-top: auto;
}

.ge-back {
    display: inline-block;
    margin: 18px 0 4px;
    color: #4f46e5;
    font-size: 13.5px;
    font-weight: 700;
}

.ge-level-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
}

.ge-level-head h1 {
    font-size: 20px;
    font-weight: 900;
}

.ge-lessons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.ge-lesson-row {
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: .2s;
    color: inherit;
}

.ge-lesson-row:hover {
    border-color: #4f46e5;
    transform: translateX(-3px);
}

.ge-lesson-row.locked {
    opacity: .55;
    background: #f7f8fa;
}

.ge-lesson-row.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ge-lesson-icon {
    font-size: 24px;
    flex: none;
}

.ge-lesson-info {
    flex: 1;
}

.ge-lesson-info h3 {
    font-size: 14.5px;
}

.ge-lesson-info p {
    color: #9aa0ae;
    font-size: 12px;
    margin-top: 2px;
}

.ge-arrow {
    color: #c3c8d4;
    font-size: 20px;
}

/* ---- صفحه‌ی خانه ---- */

.home-hero h1 {
    font-size: 26px;
    font-weight: 900;
}

.home-hero p {
    color: #9aa0ae;
    font-size: 14px;
    margin-top: 6px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.home-card {
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 20px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: .2s;
}

.home-card:hover {
    transform: translateY(-4px);
    border-color: #4f46e5;
    box-shadow: 0 14px 30px rgba(31, 36, 48, .1);
}

.hc-icon {
    font-size: 30px;
}

.home-card h2 {
    font-size: 15.5px;
}

.home-card p {
    color: #6b7280;
    font-size: 12.5px;
    line-height: 1.8;
    flex: 1;
}

.hc-go {
    color: #4f46e5;
    font-size: 13px;
    font-weight: 800;
    align-self: flex-start;
}

.home-continue {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    transition: .2s;
}

.home-continue:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(79, 70, 229, .35);
}

.home-continue b {
    font-size: 15px;
}

.home-continue p {
    font-size: 12.5px;
    opacity: .85;
    margin-top: 2px;
}

.home-continue .hc-go {
    color: #ffffff;
    margin-inline-start: auto;
    font-size: 20px;
}

@media (max-width: 420px) {
    .home-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-card {
        padding: 16px 12px;
    }
}

/* ---- ردیف گرامر: دو دکمه ---- */

.ge-lesson-actions {
    cursor: default;
}

.ge-two-btns {
    display: flex;
    gap: 8px;
    flex: none;
}

.ge-btn-a,
.ge-btn-e {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    transition: .2s;
}

.ge-btn-a {
    background: #eef2ff;
    color: #4f46e5;
}

.ge-btn-a:hover {
    background: #e0e7ff;
}

.ge-btn-e {
    background: #4f46e5;
    color: #ffffff;
}

.ge-btn-e:hover {
    background: #4338ca;
}

/* ===== Home & hubs — رفرش ۲۰۲۶ ===== */

.home-hero {
    margin: 18px 0 20px;
    border-radius: 26px;
    padding: 26px 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #6d5cf0 50%, #0ea5e9 130%);
    position: relative;
    overflow: hidden;
}

.hh-greet {
    font-size: 13px;
    font-weight: 700;
    opacity: .92;
    position: relative;
}

.hh-title {
    font-size: 23px;
    font-weight: 900;
    line-height: 1.55;
    margin-top: 6px;
    position: relative;
}

.hh-stats {
    display: flex;
    gap: 28px;
    margin-top: 18px;
    position: relative;
}

.hh-stat b {
    display: block;
    font-size: 22px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.hh-stat span {
    font-size: 11.5px;
    opacity: .88;
    font-weight: 700;
}

.hh-cta {
    display: inline-block;
    margin-top: 18px;
    background: #ffffff;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 900;
    border-radius: 14px;
    padding: 11px 22px;
    transition: .2s;
    position: relative;
}

.hh-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.hs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 12px;
}

.hs-head h2 {
    font-size: 16px;
    font-weight: 900;
}

.hub-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 22px;
    padding: 18px 16px;
    margin-bottom: 12px;
    transition: .2s;
}

.hub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(31, 36, 48, .1);
}

.hub-ge {
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    border: 1px solid #dfe4ff;
}

.hub-gr {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border: 1px solid #d3f1f7;
}

.hub-note {
    background: #fffbeb;
    border: 1px solid #fdeeb8;
}

.hub-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex: none;
    box-shadow: 0 4px 12px rgba(31, 36, 48, .06);
}

.hub-body {
    flex: 1;
    min-width: 0;
}

.hub-body h3 {
    font-size: 15.5px;
    font-weight: 900;
}

.hub-body p {
    color: #6b7280;
    font-size: 12.5px;
    margin-top: 2px;
}

.hub-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.hub-pill {
    background: #ffffff;
    border: 1px solid rgba(79, 70, 229, .16);
    color: #4f46e5;
    font-size: 11px;
    font-weight: 800;
    border-radius: 9px;
    padding: 3px 10px;
}

.hub-arrow {
    color: #c3c8d4;
    font-size: 22px;
    flex: none;
}

/* ---- صفحات انتخاب سطح / دسته ---- */

.hub-head {
    text-align: center;
    margin: 18px 0 22px;
}

.hub-overline {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #4f46e5;
}

.hub-head h1 {
    font-size: 21px;
    font-weight: 900;
    margin-top: 4px;
}

.hub-head p {
    color: #9aa0ae;
    font-size: 13px;
    margin-top: 4px;
}

.level-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.level-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 22px;
    padding: 18px 16px;
    transition: .2s;
}

.level-card:hover {
    transform: translateY(-3px);
    border-color: #4f46e5;
    box-shadow: 0 14px 30px rgba(31, 36, 48, .1);
}

.level-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.lb-1 {
    background: linear-gradient(135deg, #4f46e5, #7c74f2);
}

.lb-2 {
    background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.lb-3 {
    background: linear-gradient(135deg, #d97706, #fbbf24);
}

.lb-4 {
    background: linear-gradient(135deg, #059669, #34d399);
}

.lb-5 {
    background: linear-gradient(135deg, #dc2626, #f87171);
}

.cat-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    background: #eef2ff;
}

.level-info {
    flex: 1;
    min-width: 0;
}

.level-info h2 {
    font-size: 15.5px;
    font-weight: 900;
}

.level-info p {
    color: #6b7280;
    font-size: 12.5px;
    margin-top: 2px;
}

.level-count {
    display: inline-block;
    margin-top: 8px;
    background: #f3f4f9;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    border-radius: 9px;
    padding: 3px 10px;
}

/* ---- لینک‌های اپ: بدون زیرخط ---- */

a {
    text-decoration: none;
}

/* ---- هیرو v2: بنفش عمیق، متن خوانا ---- */

.home-hero {
    background: linear-gradient(140deg, #372aac 0%, #4f46e5 55%, #5b3fd6 100%);
}

/* ---- نوار پایین: آیکون‌های SVG + هاله‌ی انتخاب ---- */

.bottom-nav .icon {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav .icon svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav a {
    color: #9aa0ae;
    transition: color .2s, transform .2s;
}

.bottom-nav a.active {
    color: #4f46e5;
}

.bottom-nav a:hover {
    transform: translateY(-2px);
}

/* ---- GE متنی + هاله‌ی دور آیکون (نه روی متن) ---- */

.ge-txt {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .5px;
    line-height: 23px;
}

.bottom-nav a.active .icon {
    position: relative;
}

.bottom-nav a.active .icon::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 12px;
    background: radial-gradient(circle, rgba(56, 189, 248, .45), transparent 70%);
    z-index: -1;
    animation: navGlow 2.4s ease-in-out infinite;
}

@keyframes navGlow {

    0%,
    100% {
        opacity: .75;
    }

    50% {
        opacity: 1;
    }
}

.bottom-nav a.active {
    color: #4f46e5;
    text-shadow: none;
}

/* ---- هیرو v3: هم‌جنس نوار پایین ---- */

.home-hero {
    margin: 18px 0 20px;
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 26px;
    padding: 24px 22px;
    box-shadow: 0 8px 26px rgba(31, 36, 48, .06);
}

.hh-greet {
    color: #9aa0ae;
    font-size: 13.5px;
    font-weight: 700;
}

.hh-title {
    color: #14192b;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.55;
    margin-top: 6px;
}

.hh-stats {
    display: flex;
    gap: 30px;
    margin-top: 16px;
}

.hh-stat b {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #4f46e5;
    font-variant-numeric: tabular-nums;
}

.hh-stat span {
    font-size: 11.5px;
    color: #9aa0ae;
    font-weight: 700;
}

.hh-cta {
    display: inline-block;
    margin-top: 16px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    border-radius: 14px;
    padding: 11px 24px;
    transition: .2s;
}

.hh-cta:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, .3);
}

/* ---- چیپ مهمان: دعوت نرم، نه فرمان ---- */

.hh-guest-note {
    display: inline-block;
    margin-top: 12px;
    background: #fffbeb;
    border: 1px solid #fdeeb8;
    color: #92700c;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 12px;
    padding: 8px 14px;
    transition: .2s;
}

.hh-guest-note:hover {
    border-color: #f0d789;
    transform: translateY(-1px);
}

/* ---- هیرو v4: یاسی برند، گرم و نرم ---- */

.home-hero {
    background: linear-gradient(150deg, #eef0ff 0%, #e6e9ff 45%, #f3efff 100%);
    border: 1px solid #dfe3fc;
    box-shadow: none;
}

.hh-greet {
    color: #6f6a94;
}

.hh-title {
    color: #23204a;
}

.hh-stat b {
    color: #4f46e5;
}

.hh-stat span {
    color: #7d78a3;
}

/* جعبه مرور: ستاره‌ی صفحه فعلاً */

.hub-note-hero {
    border: 1.5px solid #f0d789;
    background: #fffdf5;
}

.hub-note-hero .hub-icon {
    box-shadow: 0 4px 14px rgba(217, 119, 6, .18);
}

/* ---- بج سطح + picker + faq ---- */

.tier-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    border-radius: 10px;
    padding: 5px 14px;
    margin-top: 2px;
}

.theme-picker {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.theme-opt {
    flex: 1;
    background: #ffffff;
    border: 2px solid #e7e9f0;
    border-radius: 20px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: .2s;
    position: relative;
}

.theme-opt .to-icon {
    font-size: 30px;
}

.theme-opt .to-label {
    font-size: 14px;
    font-weight: 800;
    color: #14192b;
}

.theme-opt .to-check {
    position: absolute;
    top: 10px;
    inset-inline-end: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
}

.theme-opt.selected {
    border-color: #4f46e5;
    box-shadow: 0 8px 22px rgba(79, 70, 229, .15);
}

.theme-opt.selected .to-check {
    display: flex;
}

.app-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.app-faq details {
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 16px;
    padding: 16px 18px;
}

.app-faq summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
}

.app-faq p {
    margin-top: 10px;
    color: #6b7280;
    font-size: 13.5px;
    line-height: 2;
}

/* ===== دارک مود اپ ===== */

html[data-theme="dark"] {
    color-scheme: dark;
    background: #0f1222;
}

html[data-theme="dark"] body {
    background: #0f1222;
    color: #e9ecf6;
}

html[data-theme="dark"] .home-hero {
    background: linear-gradient(150deg, #1b1f3d 0%, #232754 55%, #1a1b38 100%);
    border-color: #2c3160;
}

html[data-theme="dark"] .hh-greet {
    color: #a3abc4;
}

html[data-theme="dark"] .hh-title {
    color: #ffffff;
}

html[data-theme="dark"] .hh-stat b {
    color: #8b93ff;
}

html[data-theme="dark"] .hh-stat span {
    color: #a3abc4;
}

html[data-theme="dark"] .hh-guest-note {
    background: rgba(217, 119, 6, .12);
    border-color: rgba(251, 191, 36, .3);
    color: #fbbf24;
}

html[data-theme="dark"] .hs-head h2 {
    color: #e9ecf6;
}

html[data-theme="dark"] .hub-card {
    background: #171a2e;
    border: 1px solid #262b47;
}

html[data-theme="dark"] .hub-icon {
    background: #1e2340;
}

html[data-theme="dark"] .hub-body h3 {
    color: #e9ecf6;
}

html[data-theme="dark"] .hub-body p {
    color: #a3abc4;
}

html[data-theme="dark"] .hub-pill {
    background: #1e2340;
    border-color: #2c3160;
    color: #8b93ff;
}

html[data-theme="dark"] .hub-arrow {
    color: #3f4569;
}

html[data-theme="dark"] .hub-note-hero {
    border-color: rgba(251, 191, 36, .35);
    background: #1d1a2a;
}

html[data-theme="dark"] .ge-back {
    color: #8b93ff;
}

html[data-theme="dark"] .hub-overline {
    color: #8b93ff;
}

html[data-theme="dark"] .hub-head h1 {
    color: #e9ecf6;
}

html[data-theme="dark"] .hub-head p {
    color: #a3abc4;
}

html[data-theme="dark"] .level-card {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .level-info h2 {
    color: #e9ecf6;
}

html[data-theme="dark"] .level-info p {
    color: #a3abc4;
}

html[data-theme="dark"] .level-count {
    background: #1e2340;
    color: #a3abc4;
}

html[data-theme="dark"] .cat-badge {
    background: #1e2340;
}

html[data-theme="dark"] .ge-lesson-row {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .ge-lesson-row.locked {
    background: #14172a;
    border-color: #20254a;
}

html[data-theme="dark"] .ge-lesson-row.done {
    border-color: rgba(52, 211, 153, .35);
    background: rgba(16, 185, 129, .07);
}

html[data-theme="dark"] .ge-lesson-info h3 {
    color: #e9ecf6;
}

html[data-theme="dark"] .ge-lesson-info p {
    color: #a3abc4;
}

html[data-theme="dark"] .ge-arrow {
    color: #3f4569;
}

html[data-theme="dark"] .ge-badge {
    background: rgba(99, 102, 241, .18);
    color: #8b93ff;
}

html[data-theme="dark"] .bottom-nav {
    background: #14172a;
    border-top-color: #262b47;
}

html[data-theme="dark"] .bottom-nav a {
    color: #6b7280;
}

html[data-theme="dark"] .bottom-nav a.active {
    color: #8b93ff;
}

html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .menu-item {
    background: #171a2e;
    border-color: #262b47;
    color: #e9ecf6;
}

html[data-theme="dark"] .profile-phone {
    color: #a3abc4;
}

html[data-theme="dark"] .tier-badge {
    background: rgba(99, 102, 241, .18);
    color: #8b93ff;
}

html[data-theme="dark"] .profile-edit-form input {
    background: #14172a;
    border-color: #262b47;
    color: #e9ecf6;
}

html[data-theme="dark"] .profile-edit-form input:focus {
    background: #1a1e38;
}

html[data-theme="dark"] .profile-save-btn {
    background: #4f46e5;
    color: #fff;
}

html[data-theme="dark"] .complete-profile {
    color: #8b93ff;
}

html[data-theme="dark"] .theme-opt {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .theme-opt .to-label {
    color: #e9ecf6;
}

html[data-theme="dark"] .theme-opt.selected {
    border-color: #6366f1;
}

html[data-theme="dark"] .app-faq details {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .app-faq summary {
    color: #e9ecf6;
}

html[data-theme="dark"] .app-faq p {
    color: #a3abc4;
}

html[data-theme="dark"] .login-box {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .auth-question {
    color: #e9ecf6;
}

html[data-theme="dark"] #id_phone,
html[data-theme="dark"] #id_code {
    background: #14172a;
    border-color: #262b47;
    color: #e9ecf6;
}

html[data-theme="dark"] .audio-clickable {
    text-decoration-color: #8b93ff;
}

html[data-theme="dark"] .audio-clickable:hover {
    background: rgba(139, 147, 255, .1);
}

html[data-theme="dark"] .audio-clickable.audio-playing {
    background: rgba(139, 147, 255, .16);
}

html[data-theme="dark"] .guest-banner {
    background: #1d1a2a;
}

/* ---- toggle حالت نمایش ---- */

.theme-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 10px 0 30px;
}

.tt-label {
    font-size: 13px;
    font-weight: 800;
    color: #9aa0ae;
    transition: .2s;
}

.tt-label.on {
    color: #4f46e5;
}

.theme-toggle {
    width: 76px;
    height: 38px;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    background: #14192b;
    position: relative;
    padding: 0;
    transition: background .25s;
}

.tt-knob {
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform .25s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}

.tt-knob .tt-sun,
.tt-knob .tt-moon {
    display: none;
}

.theme-toggle[data-current="light"] .tt-knob .tt-sun {
    display: block;
}

.theme-toggle[data-current="dark"] .tt-knob .tt-moon {
    display: block;
}

.theme-toggle[aria-checked="true"] {
    background: #4f46e5;
}

.theme-toggle[aria-checked="true"] .tt-knob {
    transform: translateX(-38px);
}

/* ---- فیکس‌های دارک مود ---- */

/* بنر مهمان */
html[data-theme="dark"] .guest-banner {
    background: #1d1a2a;
    border-color: rgba(251, 191, 36, .3);
}

html[data-theme="dark"] .guest-banner p,
html[data-theme="dark"] .guest-banner span,
html[data-theme="dark"] .guest-banner a {
    color: #fde68a;
}

/* پروفایل: نام و کارت */
html[data-theme="dark"] .profile-card h2 {
    color: #ffffff;
}

html[data-theme="dark"] .profile-card p {
    color: #a3abc4;
}

html[data-theme="dark"] .complete-profile {
    color: #fbbf24;
}

/* تمرین‌ها و درس‌ها */
html[data-theme="dark"] .lesson-box {
    background: #171a2e;
    border-color: #262b47;
    color: #e9ecf6;
}

html[data-theme="dark"] .main-title {
    color: #ffffff;
}

html[data-theme="dark"] .q-fa,
html[data-theme="dark"] .q-prompt {
    color: #e9ecf6;
}

html[data-theme="dark"] .option-btn,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .match-btn {
    background: #1e2340;
    border-color: #2c3160;
    color: #e9ecf6;
}

html[data-theme="dark"] .option-btn.selected,
html[data-theme="dark"] .chip-built {
    border-color: #6366f1;
    background: rgba(99, 102, 241, .15);
}

html[data-theme="dark"] .option-btn.correct {
    border-color: #34d399;
    background: rgba(16, 185, 129, .15);
}

html[data-theme="dark"] .option-btn.wrong {
    border-color: #f87171;
    background: rgba(239, 68, 68, .15);
}

html[data-theme="dark"] .check-btn {
    background: #4f46e5;
    color: #ffffff;
}

html[data-theme="dark"] .short-input {
    background: #14172a;
    border-color: #2c3160;
    color: #e9ecf6;
}

html[data-theme="dark"] .listen-box {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .listen-btn {
    background: #1e2340;
    border-color: #2c3160;
}

html[data-theme="dark"] .progress-bar {
    background: #262b47;
}

html[data-theme="dark"] #progress-fill {
    background: #4f46e5;
}

html[data-theme="dark"] .progress-text {
    color: #a3abc4;
}

html[data-theme="dark"] .result-screen {
    background: #171a2e;
    border-color: #262b47;
    color: #e9ecf6;
}

html[data-theme="dark"] .next-btn {
    background: #4f46e5;
    color: #fff;
}

html[data-theme="dark"] .back-btn {
    background: #1e2340;
    border-color: #2c3160;
    color: #e9ecf6;
}

html[data-theme="dark"] .section-title {
    color: #ffffff;
}

html[data-theme="dark"] .content-auto {
    color: #d5daea;
}

html[data-theme="dark"] .feedback.fb-correct {
    color: #34d399;
}

html[data-theme="dark"] .feedback.fb-wrong {
    color: #f87171;
}

html[data-theme="dark"] .feedback.fb-warn {
    color: #fbbf24;
}

html[data-theme="dark"] .fb-extra {
    color: #a3abc4;
}

/* لاگین در دارک: گرادیان برند روی زمینه‌ی تیره */
html[data-theme="dark"] .login-box {
    background: transparent;
    border: none;
    box-shadow: none;
}

html[data-theme="dark"] .auth-hero h1 {
    color: #ffffff;
}

html[data-theme="dark"] .auth-hero .auth-sub {
    color: #a3abc4;
}

html[data-theme="dark"] .auth-question {
    color: #e9ecf6;
}

html[data-theme="dark"] #id_phone,
html[data-theme="dark"] #id_code {
    background: #14172a;
    border-color: #2c3160;
    color: #ffffff;
}

html[data-theme="dark"] .auth-btn {
    background: #4f46e5;
    color: #ffffff;
}

html[data-theme="dark"] .auth-link {
    color: #8b93ff;
}

html[data-theme="dark"] .auth-error {
    color: #f87171;
}

/* قوانین داخل اپ */
html[data-theme="dark"] .terms-body {
    background: #171a2e;
    border-color: #262b47;
}

html[data-theme="dark"] .terms-body p,
html[data-theme="dark"] .terms-body li {
    color: #d5daea;
}

html[data-theme="dark"] .terms-body h2 {
    color: #ffffff;
}

html[data-theme="dark"] .terms-back-btn {
    background: #4f46e5;
    color: #ffffff;
}

/* لوگوی دارک/لایت */
.auth-logo-light {
    display: block;
}

.auth-logo-dark {
    display: none;
}

html[data-theme="dark"] .auth-logo-light {
    display: none;
}

html[data-theme="dark"] .auth-logo-dark {
    display: block;
}

/* ---- قوانین (اپ) ---- */

.terms-body {
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 20px;
    padding: 20px 18px;
    margin-bottom: 18px;
}

.terms-body h2 {
    font-size: 15px;
    font-weight: 900;
    color: #14192b;
    margin: 18px 0 8px;
}

.terms-body h2:first-child {
    margin-top: 0;
}

.terms-body p,
.terms-body li {
    font-size: 13.5px;
    line-height: 2.1;
    color: #3c4254;
}

.terms-body ul {
    padding-inline-start: 20px;
}

.terms-back-btn {
    display: block;
    text-align: center;
    background: #4f46e5;
    color: #ffffff;
    font-weight: 900;
    font-size: 14px;
    border-radius: 14px;
    padding: 13px;
    margin-bottom: 30px;
    transition: .2s;
}

.terms-back-btn:hover {
    background: #4338ca;
}

/* ---- درس و تمرین: فیکس قطعی دارک ---- */

html[data-theme="dark"] .section-title,
html[data-theme="dark"] .main-title,
html[data-theme="dark"] .lesson-box h2,
html[data-theme="dark"] .lesson-box h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .section-head {
    color: #e9ecf6;
}

html[data-theme="dark"] .content-auto,
html[data-theme="dark"] .lesson-box p,
html[data-theme="dark"] .lesson-box li {
    color: #d5daea !important;
}

html[data-theme="dark"] .audio-btn {
    background: #1e2340 !important;
    border: 1px solid #2c3160 !important;
    color: #8b93ff !important;
}

html[data-theme="dark"] .lesson-box a {
    color: #8b93ff !important;
}

html[data-theme="dark"] .lesson-box .back-btn,
html[data-theme="dark"] .lesson-box .next-btn,
html[data-theme="dark"] .lesson-box .start-btn {
    color: #ffffff !important;
}