/* =========================
   پروفایل هدر داشبورد
   - صرف‌نظر از عرض صفحه، همیشه دایره‌ی کامل بماند (عرض = ارتفاع)
   - چون بعد از dashboard.css لود می‌شود، هر مقدار ناهماهنگ آنجا را override می‌کند
========================= */
.profile-circle {
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-circle img {

    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================
   Large 4K Monitor
========================= */

@media (min-width:2200px) {
    
    .navbar {
        width: min(2560px, 90%);
        padding: 45px 40px;
    }
    .logo {
        display: flex;
        align-items: center;
        gap: 5px;
        color: #20324d;
        font-size: 60px;
        font-weight: 600;
        text-decoration: none;
    }
    /* =========================
    رنگ و آیکون لوگو
    - ایجاد تاکید رنگی روی برند انگلیش اَدونچر
    - مربوط به: index.php و هدر صفحات داخلی
    ========================= */
    .logo strong {
        color: #3478e8;
        font-weight: 600;
    }
    .logo-icon {
        font-size: 60px;
    }
    /* =========================
    منوهای ناوبری
    - چیدمان لینک‌ها و حالت‌های hover/active
    - مربوط به: index.php و صفحات اصلی با هدر ثابت
    ========================= */
    .navbar .nav-links {
        display: flex;
        align-items: center;
        gap: 60px;
    }
    /* =========================
    آیتم‌های منو
    ========================= */
    .navbar .nav-links li {
        list-style: none;
    }
    /* =========================
    لینک‌های منو
    ========================= */
    .navbar .nav-links li a {
        color: #35506f;
        font-size: 40px;
        font-weight: 700;
        transition: 0.3s ease;
        text-decoration: none;
    }

    .home {
        justify-content: space-between;
        width: min(2560px, 90%);
        margin: 0 auto;
        min-height: 100vh;
        padding: clamp(120px, 4vw, 80px) 0 50px !important;
        gap: clamp(25px, 4vw, 80px);
        color: #20324d;
    }
    .home-info h1 {
        font-size: 84px;
    }
    .home-info h2 {
        font-size: 50px;
    }
    .home-info p {
        max-width: 760px;
        font-size: 30px;
    }
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 18px 36px;
        border-radius: 18px;
        font-size: 36px;
        font-weight: 600;
        text-decoration: none;
        transition: 0.35s ease;
        background: linear-gradient(135deg, #9a4dff, #3aa6ff);
        color: #fff;
        box-shadow: 0 10px 28px rgba(50, 130, 255, .28);
    }

    .home-visual {
        max-width: 1000px;
        min-height: 800px;
    }
    .home-visual::before {
        width: 700px;
        height: 700px;
    }
    .ring-primary {
        width: 650px;
        height: 650px;
    }
    .ring-secondary {
        width: 480px;
        height: 480px;
        border: 4px dashed rgba(104,77,255,.55);
        border-radius: 50%;
        animation: spinReverse 40s linear infinite;
    }

    .feature-chip {
        font-size: 35px;
        padding: 35px 30px;
        border-radius: 25px;
    }
    /* آیکون‌ها: font-size مطابق سایز باکس (قبلاً 50px با باکس 40px تعریف شده بود که باعث سرریز می‌شد) */
    .chip-icon {
        display: inline-flex;
        font-size: 40px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        animation: pulseFloat 4s ease-in-out infinite 1.3s;
    }
    .orbit-dot {
        position: absolute;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: linear-gradient(135deg, #ff4dca, #ff9355);
        box-shadow: 0 0 0 6px rgba(255, 61, 213, 0.18);
    }
    /* نقطه اول */
    .dot-a {
        top: 18%;
        left: 50%;
        animation: pulseFloat 3.5s ease-in-out infinite;
    }
    /* نقطه دوم */
    .dot-b {
        top: 50%;
        right: 16%;
        animation: pulseFloat 4.2s ease-in-out infinite 0.5s;
    }
    /* نقطه سوم */
    .dot-c {
        bottom: 16%;
        left: 55%;
        animation: pulseFloat 3.8s ease-in-out infinite 1s;
    }
    /* نقطه چهارم */
    .dot-d {
        top: 50%;
        left: 16%;
        animation: pulseFloat 4s ease-in-out infinite 1.3s;
    }

    /* --- صفحه واژگان (Vocabulary) --- */
    .vocab-header {
        width: min(2000px, 70%);
        padding: 30px 45px;
    }
    .vocab-header .user-welcome h1 {
        font-size: 32px;
    }
    .vocab-header .user-welcome p {
        font-size: 18px;
    }
    .profile-circle {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    .dashboard-actions a {
        padding: 14px 26px;
        font-size: 18px;
    }
    .vocab-section {
        width: min(2000px, 70%);
        min-height: 0;
        padding-bottom: 24px;
    }
    .vocab-grid {
        grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
        gap: 40px;
    }
    .vocab-word {
        font-size: 42px;
    }
    .vocab-value {
        font-size: 22px;
    }

    /* --- صفحه مرور (Spaced Repetition) --- */
    .review-topbar {
        width: min(2000px, 70%);
        padding: 34px 46px;
    }
    .review-welcome h1 {
        font-size: 34px;
    }
    .review-welcome p {
        font-size: 20px;
    }
    .review-section {
        width: min(1100px, 60%);
        padding: 60px 0 100px;
    }
    .review-card,
    .review-empty-state {
        padding: 60px;
        border-radius: 44px;
    }
    .review-word {
        font-size: 4rem;
    }
    .review-pronunciation {
        font-size: 1.4rem;
    }
    .show-answer-btn {
        padding: 20px 48px;
        font-size: 1.3rem;
    }
    .rating-btn {
        padding: 22px 12px;
        border-radius: 24px;
    }
    .rating-label {
        font-size: 1.2rem;
    }
    .rating-interval {
        font-size: 0.95rem;
    }
}


/* =========================
   2K Monitor
   (بازه از 1367px شروع می‌شود تا با بریک‌پوینت لپ‌تاپ همپوشانی/شکاف نداشته باشد)
========================= */

@media (min-width:1367px) and (max-width:2199px) {

    .navbar {
        padding: 30px 40px;
    }

    .home {
        width: min(2199px, 90%);
    }
    .dashboard-section {
        width: min(2200px, 90%);
        margin: 0 auto;
        padding: 150px 0 70px;
    }
    .home-info h1 {
        font-size: 56px;
        color: #0066db;
    }
    .home-info h2 {
        font-size: 28px;
    }
    .home-info p {
        max-width: 820px;
        font-size: 20px;
        line-height: 1.9;
        color: #5f6f86;
        margin-bottom: 32px;
    }
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 26px;
        border-radius: 16px;
        font-size: 24px;
        font-weight: 700;
        text-decoration: none;
        transition: 0.35s ease;
        background: linear-gradient(135deg, #37a5ff, #2897ff);
        color: #fff;
        box-shadow: 0 10px 28px rgba(50, 130, 255, .28);
        animation: float 3.5s ease-in-out infinite;
    }

    .home-visual {
        max-width: 620px;
        min-height: 560px;
    }
    .home-visual::before {
        width: 440px;
        height: 440px;
    }

    .ring-primary {
        width: 440px;
        height: 440px;
    }
    .ring-secondary {
        width: 290px;
        height: 290px;
        border: 4px dashed rgba(77, 124, 255, 0.55);
        border-radius: 50%;
        animation: spinReverse 40s linear infinite;
    }
    .feature-chip {
        font-size: 20px;
        padding: 16px 26px;
        gap: 0px;
        border-radius: 20px;
    }
    .chip-icon {
        display: inline-flex;
        font-size: 30px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
    }
    .orbit-dot {
        width: 24px;
        height: 24px;
    }
    .dot-a {
        top: 20%;
        left: 50%;
    }
    .dot-b {
        top: 50%;
        right: 20%;
    }
    .dot-c {
        bottom: 18%;
        left: 50%;
    }
    .dot-d {
        top: 50%;
        left: 20%;
    }

    /* --- صفحه واژگان (Vocabulary) --- */
    .vocab-header {
        width: min(1700px, 70%);
        padding: 24px 36px;
    }
    .vocab-header .user-welcome h1 {
        font-size: 26px;
    }
    .vocab-header .user-welcome p {
        font-size: 15px;
    }
    .profile-circle {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }
    .vocab-section {
        width: min(1700px, 70%);
    }
    .vocab-grid {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
        gap: 32px;
    }
    .vocab-word {
        font-size: 32px;
    }

    /* --- صفحه مرور (Spaced Repetition) --- */
    .review-topbar {
        width: min(1700px, 70%);
        padding: 26px 36px;
    }
    .review-welcome h1 {
        font-size: 26px;
    }
    .review-welcome p {
        font-size: 15px;
    }
    .review-section {
        width: min(880px, 60%);
        padding: 44px 0 80px;
    }
    .review-card,
    .review-empty-state {
        padding: 42px;
        border-radius: 36px;
    }
    .review-word {
        font-size: 2.8rem;
    }
}

/* =========================
   Laptop
   (سقف به 1366px محدود شده و بلافاصله بریک‌پوینت 2K از 1367px شروع می‌شود -> بدون شکاف)
========================= */

@media (max-width:1366px) {
    .navbar {
        padding: 25px 35px;
    }
    .logo {
        font-size: 36px;
    }
    .logo-icon {
        font-size: 36px;
    }
    .navbar .nav-links {
        gap: 36px;
    }
    .navbar .nav-links li a {
        font-size: 22px;
    }
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 15px 30px;
        border-radius: 16px;
        font-size: 26px;
        font-weight: 700;
        text-decoration: none;
        transition: 0.35s ease;
        background: linear-gradient(135deg, #9a4dff, #3aa6ff);
        color: #fff;
        box-shadow: 0 10px 28px rgba(50, 130, 255, .28);
        animation: float 3.5s ease-in-out infinite;
    }

    .home {
        width: min(1200px, 92%);
        gap: 50px;
    }

    .dashboard-section {
        width: min(1200px, 92%);
        padding: 160px 0 60px;
    }

    .dashboard-summary {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .dashboard-insights-grid {
        grid-template-columns: 1fr;
    }

    .study-chart-panel,
    .leaderboard-panel {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        border-radius: 16px;
        background: rgba(227, 241, 255, 0.5);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.72);
        box-shadow: 0 16px 40px rgba(40, 100, 180, 0.1);
    }

    .home-info h1 {
        font-size: 56px;
    }
    .home-info h2 {
        font-size: 28px;
    }
    .home-visual {
        max-width: 550px;
    }
    .home-visual::before {
        width: 440px;
        height: 440px;
    }
    .ring-primary {
        width: 440px;
        height: 440px;
    }
    .ring-secondary {
        width: 280px;
        height: 280px;
    }
    .feature-chip {
        font-size: 22px;
        padding: 18px 28px;
        gap: 16px;
        border-radius: 20px;
    }
    .chip-icon {
        font-size: 18px;
        width: 30px;
        height: 30px;
    }
    .orbit-dot {
        width: 20px;
        height: 20px;
    }
    .dot-a {
        top: 18%;
        left: 50%;
    }
    .dot-b {
        top: 50%;
        right: 16%;
    }
    .dot-c {
        bottom: 16%;
        left: 55%;
    }
    .dot-d {
        top: 50%;
        left: 16%;
    }

    /* --- صفحه واژگان (Vocabulary) --- */
    .vocab-header {
        width: min(1200px, 70%);
        padding: 20px 28px;
        top: 16px;
    }
    .vocab-header .user-welcome h1 {
        font-size: 22px;
    }
    .vocab-header .user-welcome p {
        font-size: 14px;
    }
    .profile-circle {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    .dashboard-actions a {
        padding: 9px 16px;
        font-size: 13px;
    }
    .vocab-section {
        width: min(1200px, 70%);
    }
    .vocab-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
    }
    .vocab-word {
        font-size: 26px;
    }

    /* --- صفحه مرور (Spaced Repetition) --- */
    .review-topbar {
        width: min(1200px, 92%);
        padding: 18px 22px;
    }
    .review-welcome h1 {
        font-size: 20px;
    }
    .review-welcome p {
        font-size: 13px;
    }
    .review-section {
        width: min(700px, 92%);
        padding: 32px 0 60px;
    }
    .review-card,
    .review-empty-state {
        padding: 28px;
        border-radius: 28px;
    }
    .review-word {
        font-size: 2.1rem;
    }
}


/* =========================
   Small Laptop / Tablet
========================= */

@media (max-width:1024px) {

    .navbar {
        width: 94%;
    }

    .navbar .nav-links {
        gap: 18px;
    }

    .navbar .nav-links li a {
        font-size: 16px;
    }

    .home {
        flex-direction: column;
        text-align: center;
        width: 92%;
        padding-top: 140px;
    }

    .home-info p {
        margin-left: auto;
        margin-right: auto;
    }

    .home-visual {
        width: 100%;
        max-width: 480px;
    }
    .home-visual::before {
        width: 380px;
        height: 380px;
    }
    .ring-primary {
        width: 320px;
        height: 320px;
    }
    .ring-secondary {
        width: 220px;
        height: 220px;
    }
    .btn {
        padding: 13px 26px;
        border-radius: 14px;
        font-size: 20px;
    }
    .feature-chip {
        font-size: 18px;
        padding: 14px 20px;
        gap: 12px;
        border-radius: 20px;
    }
    .chip-icon {
        font-size: 15px;
        width: 26px;
        height: 26px;
    }
    .orbit-dot {
        width: 16px;
        height: 16px;
    }
    .dot-a {
        top: 18%;
        left: 50%;
    }
    .dot-b {
        top: 50%;
        right: 16%;
    }
    .dot-c {
        bottom: 16%;
        left: 55%;
    }
    .dot-d {
        top: 50%;
        left: 16%;
    }

    .dashboard-section {
        padding-top: 200px;
    }

    .dashboard-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .dashboard-menu-toggle {
        display: flex;
    }

    .dashboard-actions {
        display: none;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.7);
    }

    .dashboard-header.menu-open .dashboard-actions {
        display: flex;
    }

    .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* --- صفحه واژگان (Vocabulary): منوی همبرگری به‌صورت overlay شیشه‌ای تیره روی محتوا --- */
    .vocab-header {
        width: 94%;
    }

    .vocab-header .dashboard-menu-toggle {
        display: flex;
    }

    .vocab-header .dashboard-actions {
        display: none;
    }

    /* هدر sticky است، پس همین یک containing-block کافی است تا overlay نسبت به آن جای‌گذاری شود
       و محتوای صفحه (vocab-section) هل داده نشود */
    .vocab-header.menu-open .dashboard-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        width: auto;
        margin-top: 0;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.82);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 18px 42px rgba(10, 20, 40, 0.35);
        z-index: 30;
    }

    .vocab-header.menu-open .dashboard-actions a {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }

    .vocab-header.menu-open .dashboard-actions a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .vocab-section {
        width: 94%;
    }

    .vocab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    /* --- صفحه مرور (Spaced Repetition): همان الگوی منوی همبرگری overlay --- */
    .review-topbar {
        width: 94%;
    }

    .review-topbar .dashboard-menu-toggle {
        display: flex;
    }

    .review-topbar .dashboard-actions {
        display: none;
    }

    .review-topbar.menu-open .dashboard-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        width: auto;
        margin-top: 0;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.82);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 18px 42px rgba(10, 20, 40, 0.35);
        z-index: 30;
    }

    .review-topbar.menu-open .dashboard-actions a {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }

    .review-topbar.menu-open .dashboard-actions a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .review-section {
        width: 94%;
    }

    .review-card,
    .review-empty-state {
        padding: 26px;
    }

}



/* =========================
   Tablet
========================= */

@media (max-width:768px) {

    .navbar {
        top: 12px;
        width: min(100%, 94%);
        padding: 12px 14px;
        border-radius: 18px;
    }

    .navbar .nav-links {
        display: none;
    }

    .navbar .nav-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.75);
        background: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 10px 24px rgba(40, 100, 180, 0.14);
    }

    .navbar .nav-toggle span {
        background: #284b77;
    }

    .navbar.nav-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 14px);
        right: 0;
        left: 0;
        padding: 14px;
        gap: 10px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.78);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 18px 42px rgba(40, 100, 180, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.9);
        align-items: flex-start;
        z-index: 1001;
    }

    .navbar.nav-open .nav-links li a.headerlogin {
        display: inline-block;
        width: 100%;
        text-align: left;
        background: linear-gradient(135deg, rgba(52, 120, 232, 0.95), rgba(90, 168, 255, 0.95));
        color: #fff;
        box-shadow: 0 8px 20px rgba(52, 120, 232, 0.18);
    }

    .navbar.nav-open .nav-links li a {
        display: block;
        font-size: 15px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.753);
        border: 1px solid rgba(255, 255, 255, 0.6);
        width: 100%;
        color: #35506f;
    }

    .logo {
        font-size: 20px;
        gap: 8px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .home {
        width: 94%;
        padding-top: 120px;
    }

    .dashboard-section {
        width: min(100%, 94%);
        padding: 140px 0 60px;
        overflow-x: hidden;
    }

    .study-chart-panel {
        min-width: 0;
        overflow: hidden;
    }

    .study-chart {
        display: flex;
        width: 100%;
        min-width: 0;
        gap: 8px;
        height: 230px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* وقتی تعداد روزها کم است (هفته=7) هر آیتم فضای مساوی می‌گیرد،
       وقتی زیاد است (ماه=30) به‌جای سرریز به کل صفحه، فقط خودِ چارت
       اسکرول افقی می‌گیرد (خط overflow-x بالا) */
    .study-chart-day {
        flex: 1 1 0;
        min-width: 28px;
    }

    .home-info h1 {
        font-size: 38px;
    }

    .home-info h2 {
        font-size: 22px;
    }

    .home-info p {
        font-size: 15px;
    }

    .home-visual {
        width: 100%;
        max-width: 380px;
    }

    .home-visual::before {
        width: 270px;
        height: 270px;
    }

    .ring-primary {
        width: 220px;
        height: 220px;
    }

    .ring-secondary {
        width: 150px;
        height: 150px;
    }

    .btn {
        padding: 12px 22px;
        border-radius: 12px;
        font-size: 16px;
    }

    .feature-chip {
        font-size: 12px;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 20px;
    }

    .chip-icon {
        font-size: 11px;
        width: 20px;
        height: 20px;
    }

    .orbit-dot {
        width: 12px;
        height: 12px;
    }

    .dot-a {
        top: 18%;
        left: 50%;
    }

    .dot-b {
        top: 50%;
        right: 16%;
    }

    .dot-c {
        bottom: 16%;
        left: 55%;
    }

    .dot-d {
        top: 50%;
        left: 16%;
    }

    /* --- صفحه واژگان (Vocabulary) --- */
    .vocab-header {
        top: 12px;
        padding: 14px 16px;
        border-radius: 18px;
    }

    .vocab-header .user-welcome h1 {
        font-size: 18px;
    }

    .vocab-header .user-welcome p {
        font-size: 13px;
    }

    .profile-circle {
        width: 44px;
        height: 44px;
        font-size: 2.5rem;
    }

    .vocab-section {
        width: 94%;
    }

    .vocab-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .vocab-card {
        padding: 18px;
        border-radius: 18px;
    }

    .vocab-word {
        font-size: 24px;
    }

    .vocab-value {
        font-size: 14px;
    }

    /* --- صفحه مرور (Spaced Repetition) --- */
    .review-topbar {
        width: min(100%, 94%);
        padding: 16px 16px 18px;
        margin-top: 14px;
        flex-wrap: wrap;
    }

    .review-topbar-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-header-stats {
        margin-left: 0;
        width: 100%;
    }

    .review-section {
        width: min(100%, 94%);
        padding: 24px 0 60px;
    }

    .review-card,
    .review-empty-state {
        padding: 20px;
        border-radius: 22px;
    }

    .review-word {
        font-size: 1.9rem;
    }

    .review-word-block {
        padding: 22px 14px;
    }

    .rating-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   iPad (portrait 768px تا landscape 1024px)
   - همان استایل کارتی خوبِ موبایل کوچک
   - با این تفاوت که Rank به‌جای بالای کارت، سمت چپ ردیف قرار می‌گیرد
========================= */

@media (min-width:768px) and (max-width:1024px) {

    .leaderboard-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .leaderboard-section {
        margin-top: 20px;
        padding: 18px 14px 14px;
        border-radius: 18px;
        position: relative;
    }

    .leaderboard-section-title {
        font-size: 0.85rem;
        margin-bottom: 14px;
    }

    .leaderboard-row {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 14px;
        border-radius: 16px;
        position: relative;
        overflow: visible;
    }

    /* Rank سمت چپ ردیف (نه بالای کارت) */
    .leaderboard-rank {
        position: static;
        transform: none;
        background: linear-gradient(135deg, #4d91ff, #55cfff);
        color: #fff;
        font-size: 0.8rem;
        padding: 6px 14px;
        border-radius: 10px;
        flex-shrink: 0;
    }
    .leaderboard-rank {
    position: absolute;
    background: linear-gradient(135deg, #fffc4d, #55bbff);
    color: #0060a0;
    top: -16px;
    left: 60%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 10px;
    z-index: 2;
}

    .leaderboard-avatar {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        font-size: 1rem;
        border-radius: 12px;
    }

    .leaderboard-name-line {
        display: flex;
        align-items: flex-start;
        font-size: 0.8rem;
    }

    .leaderboard-name-line strong {
        font-size: 0.95rem;
    }

    .leaderboard-badge {
        padding: 3px 10px;
        font-size: 0.7rem;
    }

    .leaderboard-xp {
        display: flex;
        margin-left: auto;
        align-items: flex-end;
        font-size: 0.9rem;
    }

    .leaderboard-xp strong {
        font-size: 1.50rem;
    }

    /* --- صفحه واژگان (Vocabulary): تمام عرض، تک‌ستونه و خوانا مثل موبایل --- */
    .vocab-header {
        width: 92%;
    }

    .vocab-section {
        width: 92%;
        top: 150px;
    }

    .vocab-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .vocab-card {
        padding: 24px;
        border-radius: 20px;
    }

    .vocab-word {
        font-size: 30px;
    }

    .vocab-ipa-box {
        font-size: 15px;
    }

    .vocab-value {
        font-size: 17px;
    }

    .vocab-pill {
        font-size: 13px;
    }

    /* --- صفحه مرور (Spaced Repetition): تمام عرض مثل موبایل --- */
    .review-topbar {
        width: 92%;
    }

    .review-section {
        width: 92%;
    }

    .review-card,
    .review-empty-state {
        padding: 30px;
        border-radius: 26px;
    }

    .review-word {
        font-size: 2.6rem;
    }

    .rating-buttons {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width:480px) {
    .navbar {
        width: min(100%, 94%);
        padding: 10px 12px;
    }

    .logo {
        font-size: 16px;
    }

    .home {
        width: 90%;
        padding-top: 100px;
        gap: 24px;
    }

    .home-info h1 {
        font-size: 32px;
    }

    .home-info h2 {
        font-size: 20px;
    }

    .home-info p {
        font-size: 14px;
    }

    .home-visual {
        min-height: 260px;
        max-width: 320px;
        top: -80px;
    }

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        transition: 0.35s ease;
        background: linear-gradient(135deg, #9a4dff, #3aa6ff);
        color: #fff;
        box-shadow: 0 10px 28px rgba(50, 130, 255, .28);
    }

    .home-visual::before {
        width: 230px;
        height: 230px;
    }

    .ring-primary {
        width: 190px;
        height: 190px;
    }

    .ring-secondary {
        width: 130px;
        height: 130px;
    }

    .feature-chip {
        font-size: 11px;
        padding: 10px 10px;
        border-radius: 10px;
    }

    .chip-icon {
        font-size: 16px;
        width: 18px;
        height: 18px;
    }

    .orbit-dot {
        width: 10px;
        height: 10px;
    }

    .dot-a {
        top: 18%;
        left: 50%;
    }

    .dot-b {
        top: 50%;
        right: 16%;
    }

    .dot-c {
        bottom: 16%;
        left: 55%;
    }

    .dot-d {
        top: 50%;
        left: 16%;
    }

    .dashboard-section {
        padding-top: 140px;
    }

    /* =========================
       موارد ادغام‌شده از بریک‌پوینت قدیمیِ max-width:320px
       (عملاً هیچ موبایل امروزی عرضی کمتر از 320px ندارد،
       این بلوک با max-width:480px یکی شد تا واقعاً اجرا شود)
    ========================= */
    .headerlogin {
        padding: 10px 18px;
        font-size: 14px;
    }

    .study-chart-panel,
    .leaderboard-panel {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        border-radius: 16px;
        background: rgba(227, 241, 255, 0.5);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.72);
        box-shadow: 0 16px 40px rgba(40, 100, 180, 0.1);
    }

    .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .summary-box {
        padding: 10px;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .metric-emoji {
        font-size: 2.0rem;
        margin-top: -35px;
    }

    .summary-box h3 {
        font-size: 1.5rem;
    }

    .summary-box span:last-child {
        font-size: 0.60rem;
    }

    .dashboard-insights-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .leaderboard-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .leaderboard-section {
        margin-top: 20px;
        padding: 18px 10px 10px;
        border-radius: 18px;
        position: relative;
    }

    .leaderboard-section-title {
        font-size: 0.75rem;
        margin-bottom: 14px;
    }

    .leaderboard-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 8px;
        border-radius: 16px;
        position: relative;
        overflow: visible;
    }

    /* Rank بالای باکس */
    .leaderboard-rank {
        position: absolute;
        background: linear-gradient(135deg, #4d91ff, #55cfff);
        color: #fff;
        top: -15px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        padding: 4px 14px;
        border-radius: 10px;
        z-index: 2;
    }

    /* عکس پروفایل */
    .leaderboard-avatar {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        font-size: 1rem;
        border-radius: 12px;
    }

    /* بخش نام */
    .leaderboard-name-line {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.75rem;
    }

    .leaderboard-name-line strong {
        font-size: 0.85rem;
    }

    /* Badge کنار نام */
    .leaderboard-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    /* XP زیر نام */
    .leaderboard-xp {
        display: flex;
        margin-left: auto;
        align-items: flex-end;
        font-size: 0.75rem;
    }

    .leaderboard-xp strong {
        font-size: 0.85rem;
    }

    .leaderboard-xp span {
        display: none;
    }

    /* مخفی کردن موارد اضافی */
    .leaderboard-meta {
        display: none;
    }

    /* --- صفحه واژگان (Vocabulary) --- */
    .vocab-header {
        top: 8px;
        width: min(100%, 96%);
        padding: 12px 14px;
        border-radius: 16px;
        gap: 12px;
    }

    .vocab-header .user-welcome {
        gap: 10px;
    }

    .vocab-header .user-welcome h1 {
        font-size: 16px;
    }

    .vocab-header .user-welcome p {
        display: none;
    }

    .profile-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .dashboard-actions a {
        text-align: center;
        padding: 10px 14px;
        font-size: 13px;
    }

    .vocab-section {
        width: 96%;
        padding: 16px 0 60px;
    }

    .vocab-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .vocab-card {
        padding: 16px;
        border-radius: 16px;
        gap: 14px;
    }

    .vocab-word {
        font-size: 20px;
    }

    .vocab-ipa-box {
        font-size: 13px;
    }

    .vocab-value {
        font-size: 13px;
    }

    .vocab-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    .example-list li {
        font-size: 13px;
        padding: 8px 10px;
    }

    .vocab-action-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .page-nav a {
        padding: 10px 18px;
        font-size: 13px;
    }

    /* --- صفحه مرور (Spaced Repetition) --- */
    .review-topbar {
        width: min(100%, 96%);
        padding: 14px 14px 16px;
        margin-top: 10px;
        border-radius: 18px;
    }

    .review-welcome h1 {
        font-size: 1.05rem;
    }

    .review-welcome p {
        font-size: 0.8rem;
    }

    .review-header-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .header-stat {
        flex: unset;
        justify-content: center;
    }

    .review-section {
        width: 96%;
        padding: 16px 0 60px;
    }

    .review-card,
    .review-empty-state {
        padding: 16px;
        border-radius: 20px;
        gap: 16px;
    }

    .review-word {
        font-size: 1.6rem;
    }

    .review-word-block {
        padding: 18px 12px;
        border-radius: 18px;
    }

    .show-answer-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .review-meaning,
    .review-example {
        padding: 12px 14px;
    }

    .rating-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .rating-btn {
        padding: 12px 6px;
        border-radius: 14px;
    }

    .rating-label {
        font-size: 0.82rem;
    }

    .rating-interval {
        font-size: 0.68rem;
    }

    .review-empty-emoji {
        font-size: 2.4rem;
    }

    .review-empty-state h2 {
        font-size: 1.3rem;
    }

    .review-empty-stats {
        gap: 12px;
    }

    .review-empty-stat {
        padding: 10px 16px;
    }
}

@media (max-width: 768px) {
    .dashboard-header .profile-circle {
        font-size: 135px;
        line-height: 1;
    }
}

@media (max-width: 480px) {
    .dashboard-header .profile-circle {
        font-size: 135px;
    }
}