/* 
 * فایل CSS اصلی سایت فیلمینجو
 * نویسنده: تیم توسعه فیلمینجو
 * ریسپانسیو حرفه‌ای - تمام سایزها
 */

/* متغیرهای رنگی سایت */
:root {
    --primary-color: #008CFF;
    --secondary-color: #0070CC;
    --dark-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --text-color: #f8fafc;
    --accent-color: #f97316;
    --gap-xs: 8px;
    --gap-sm: 12px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* تنظیمات پایه */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #222222;
    color: #f5f5f5;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    /* overflow-x فقط روی main اعمال می‌شه تا drawer موبایل درست کار کنه */
}

main {
    overflow-x: hidden;
}

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #181818; border-radius: 4px; }
::-webkit-scrollbar-thumb {
    background-color: #4a4a4a;
    border-radius: 20px;
    border: 2px solid #181818;
    transition: background-color 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background-color: #666666; }

/* دکمه‌های بالا/پایین اسکرول‌بار */
::-webkit-scrollbar-button {
    background-color: #333333;
    border: 1px solid #181818;
    width: 12px;
    height: 12px;
    display: block;
}
::-webkit-scrollbar-button:hover { background-color: #4b5563; }

::-webkit-scrollbar-button:vertical:start:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
::-webkit-scrollbar-button:vertical:end:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement { display: none; }
::-webkit-scrollbar-button:horizontal:start:decrement { display: none; }
::-webkit-scrollbar-button:horizontal:end:increment { display: none; }

/* مخفی کردن اسکرول‌بار */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: auto;
    overflow-y: hidden;
}
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ===========================
   اسکرولر افقی
   =========================== */
.horizontal-scroller {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
    width: 100%;
    gap: var(--gap-sm);
}

/* دسکتاپ بزرگ: ۷ کارت */
.horizontal-scroller > .movie-card {
    flex-shrink: 0;
    flex-grow: 0;
    width: calc((100% - 6 * 12px) / 7);
    scroll-snap-align: start;
    min-width: 140px;
}

/* لپ‌تاپ: ۶ کارت */
@media (max-width: 1280px) {
    .horizontal-scroller > .movie-card {
        width: calc((100% - 5 * 12px) / 6);
    }
}

/* تبلت بزرگ: ۵ کارت */
@media (max-width: 1024px) {
    .horizontal-scroller > .movie-card {
        width: calc((100% - 4 * 12px) / 5);
    }
}

/* تبلت: ۴ کارت */
@media (max-width: 768px) {
    .horizontal-scroller > .movie-card {
        width: calc((100% - 3 * 10px) / 4);
    }
    .horizontal-scroller { gap: 10px; }
}

/* موبایل: ۲.۵ کارت در دید */
@media (max-width: 600px) {
    .horizontal-scroller > .movie-card {
        width: calc((100% - 8px) / 2.5);
        min-width: 110px;
    }
    .horizontal-scroller { gap: 8px; }
}

/* موبایل خیلی کوچک */
@media (max-width: 380px) {
    .horizontal-scroller > .movie-card {
        width: calc((100% - 6px) / 2.4);
        min-width: 100px;
    }
    .horizontal-scroller { gap: 6px; }
}

/* ===========================
   کارت فیلم - ارتفاع پوستر
   =========================== */
.movie-card .relative img {
    height: 16rem !important; /* دسکتاپ */
    object-fit: cover !important;
}

@media (max-width: 1280px) {
    .movie-card .relative img { height: 15rem !important; }
}

@media (max-width: 1024px) {
    .movie-card .relative img { height: 14rem !important; }
}

@media (max-width: 768px) {
    .movie-card .relative img { height: 13rem !important; }
}

/* موبایل */
@media (max-width: 600px) {
    .movie-card .relative { aspect-ratio: unset; }
    .movie-card .relative img {
        height: 13rem !important;
        width: 100% !important;
        position: static !important;
        inset: unset !important;
        object-fit: cover !important;
    }
    .movie-card h3 { font-size: 0.75rem; }
}

@media (max-width: 380px) {
    .movie-card .relative img { height: 11.5rem !important; }
    .movie-card h3 { font-size: 0.72rem; }
}

/* ===========================
   انیمیشن‌های ظاهر شدن
   =========================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Hero Section
   =========================== */
.hero-gradient {
    background: linear-gradient(
        to top,
        #222222 15%,
        rgba(34,34,34,0.7) 55%,
        rgba(34,34,34,0.1) 100%
    );
    pointer-events: none;
}

.hero-section-container {
    position: relative;
    z-index: 10;
    height: 65vh !important;
}

@media (min-width: 480px)  { .hero-section-container { height: 70vh !important; } }
@media (min-width: 640px)  { .hero-section-container { height: 75vh !important; } }
@media (min-width: 768px)  { .hero-section-container { height: 82vh !important; } }
@media (min-width: 1024px) { .hero-section-container { height: 88vh !important; } }
@media (min-width: 1280px) { .hero-section-container { height: 92vh !important; } }

.hero-slide {
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero content متن */
#hero-content .fade-in-up {
    padding: 0 1rem;
}

/* موبایل: بخش پایین hero — بالای dots */
.hero-mobile-bottom {
    display: none;
}

@media (max-width: 640px) {
    /* نسخه دسکتاپ مخفی روی موبایل */
    .hero-text-desktop { display: none !important; }

    /* دکمه تماشا — پایین اسلایدر */
    .hero-mobile-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        bottom: 14px;
        left: 0;
        right: 0;
        padding: 0 1rem;
        gap: 6px;
        z-index: 25;
        pointer-events: none;
    }
    .hero-mobile-bottom > * {
        pointer-events: auto;
    }

    .hero-mobile-title {
        font-size: 1rem;
        font-weight: 800;
        color: white;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8);
        text-align: right;
        margin: 0;
    }

    .play-btn-mobile {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

/* container فلش‌های ناوبری hero — گوشه پایین چپ */
.hero-nav-arrows {
    position: absolute;
    bottom: 72px;
    left: 24px;
    z-index: 40;
    display: flex;
    gap: 8px;
    align-items: center;
    pointer-events: auto;
}

/* دکمه‌های ناوبری hero */
#prev-slide, #next-slide {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.18);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}
#prev-slide:hover, #next-slide:hover {
    background: #0070CC;
    border-color: #008CFF;
}
@media (max-width: 640px) {
    .hero-nav-arrows { bottom: 130px; left: 16px; gap: 6px; }
    #prev-slide, #next-slide { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
    .hero-nav-arrows { bottom: 118px; }
}

/* Dots اسلایدر */
.hero-dot {
    width: 24px;
    height: 6px;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}
.hero-dot.active {
    background-color: #008CFF;
    width: 36px;
}
#hero-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 32;
    pointer-events: none;
}
#hero-dots .hero-dot {
    pointer-events: auto;
}

/* dots داخل section — دسکتاپ */
.hero-dots-inside {
    bottom: 72px;
}
@media (max-width: 1024px) { .hero-dots-inside { bottom: 62px; } }
@media (max-width: 768px)  { .hero-dots-inside { bottom: 52px; } }

/* dots بیرون section — فقط موبایل */
.hero-dots-outside {
    display: none !important;
    padding: 10px 0 6px;
}

@media (max-width: 600px) {
    /* dots داخل مخفی */
    .hero-dots-inside { display: none !important; }
    /* dots بیرون نمایش */
    .hero-dots-outside { display: flex !important; }
}

@media (max-width: 480px) {
    .hero-dot { width: 18px; height: 5px; }
    .hero-dot.active { width: 28px; }
}

/* ===========================
   دکمه پلی
   =========================== */
.play-btn {
    border-radius: 8px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #0070CC, #008CFF);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0,140,255,0.4);
}
.play-btn:hover {
    background: linear-gradient(135deg, #067890, #0495b3);
    box-shadow: 0 6px 20px rgba(0,140,255,0.5);
}

/* ===========================
   Header
   =========================== */
#main-header {
    backdrop-filter: blur(12px);
    background-color: rgba(26,26,26,0.6);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
#main-header.scrolled {
    background-color: rgba(26,26,26,0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Mega Menu */
.mega-menu {
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.group:hover .mega-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.nav-item-with-dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
}
.chevron-transition { transition: transform 0.3s ease; }
.group:hover .chevron-transition { transform: rotate(180deg); }

/* ===========================
   پربازدیدترین‌ها
   =========================== */
/* ===========================
   پربازدیدترین‌ها - طراحی جدید
   =========================== */
.most-viewed-container {
    position: relative;
    margin-top: -60px;
    z-index: 25;
    padding: 0;
}

.most-viewed-grid-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.most-viewed-grid-scroller {
    position: relative;
    overflow: visible;
}

/* فلش‌های اختصاصی most-viewed */
.mv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(26,26,26,0.88);
    border: 1px solid rgba(0,140,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 40;
    transition: opacity 0.25s ease, background 0.25s ease;
    padding: 0;
}
.mv-nav-btn:hover {
    background: rgba(0,140,255,0.75);
    border-color: #008CFF;
}
.mv-nav-left  { left: -14px; }
.mv-nav-right { right: -14px; }

/* گرید اصلی */
.most-viewed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

/* آیتم پربازدید */
.most-viewed-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    background: #1e1e1e;
    cursor: pointer;
    /* انتقال خیلی آهسته و نرم */
    transition: transform 1s ease-in-out,
                box-shadow 1s ease-in-out,
                filter 0.5s ease;
    z-index: 1;
    transform-origin: center center;
    will-change: transform;
}

/* کارت‌هایی که در hover نیستند بیشتر کمرنگ می‌شوند */
.most-viewed-grid:has(.most-viewed-item:hover) .most-viewed-item:not(:hover) {
    filter: brightness(0.62) saturate(0.7);
}

/* کارت hover — نرم به جلو می‌آید */
.most-viewed-item:hover,
.most-viewed-item.mv-trailer-open {
    transform: scale(1.07);
    box-shadow: 0 24px 48px rgba(0,0,0,0.7), 0 0 0 2px rgba(0,140,255,0.35);
    z-index: 10;
}

/* بعد از بستن تریلر: override hover تا کارت برگرده به عقب (حتی اگه موس روشه) */
.most-viewed-item.mv-trailer-closing {
    transform: scale(1) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    z-index: 1 !important;
}

/* ===========================
   بخش رسانه (تصویر + ویدئو)
   =========================== */
.mv-media-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* در حالت عادی همه گوشه‌ها گرد — وقتی info-bar باز است پایین صاف */
    border-radius: var(--radius-md);
    transition: border-radius 0.15s ease;
}

.most-viewed-item:hover .mv-media-wrap,
.most-viewed-item.mv-trailer-open .mv-media-wrap {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.most-viewed-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease;
}

/* ویدئوی تریلر */
.mv-trailer-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* وقتی تریلر فعال است تصویر مخفی می‌شود */
.most-viewed-item.mv-trailer-active .most-viewed-image {
    opacity: 0;
}
.most-viewed-item.mv-trailer-active .mv-trailer-video {
    opacity: 1;
}

/* badge کیفیت */
.most-viewed-item .movie-quality-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 3;
}

/* کنترل‌های تریلر — پایین سمت چپ media-wrap */
.mv-trailer-controls {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.most-viewed-item.mv-trailer-active .mv-trailer-controls {
    opacity: 1;
}

.mv-mute-btn,
.mv-fullscreen-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.mv-mute-btn:hover,
.mv-fullscreen-btn:hover {
    background: rgba(0,140,255,0.7);
    border-color: #008CFF;
}

/* ===========================
   کادر اطلاعات — absolute زیر تصویر، از flow خارج است
   =========================== */
.mv-info-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 10px 10px;
    background: #1a1a1a;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
    /* موس روی info-bar نباید دست باشه */
    cursor: default;
}

.most-viewed-item:hover .mv-info-bar,
.most-viewed-item.mv-trailer-open .mv-info-bar {
    opacity: 1;
    pointer-events: auto;
}

.mv-info-title {
    font-weight: 800;
    font-size: 0.82rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    cursor: pointer;
}

.mv-info-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #d1d5db;
    flex-wrap: wrap;
    direction: rtl;
}

/* خط جداکننده عمودی بین آیتم‌های meta */
.mv-sep {
    display: inline-block;
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    border-radius: 1px;
}

.mv-imdb-label {
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.68rem;
}

.mv-info-actions {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

/* دکمه پلی — رنگ cyan مطابق دکمه تماشا در صفحه جزئیات */
.mv-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0070CC, #008CFF);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.mv-play-btn:hover {
    background: linear-gradient(135deg, #067890, #0495b3);
}

/* ریسپانسیو دسکتاپ */
@media (max-width: 1024px) {
    .most-viewed-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .most-viewed-container { margin-top: -50px; }
}

/* تبلت و موبایل: بدون hover effect، info-bar روی تصویر به عنوان overlay ثابت */
@media (max-width: 768px) {
    .most-viewed-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .most-viewed-container { margin-top: -40px; }

    /* بدون scale و shadow تغییر */
    .most-viewed-item { transition: none; }
    .most-viewed-item:hover { transform: none; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
    .most-viewed-grid:has(.most-viewed-item:hover) .most-viewed-item:not(:hover) { filter: none; }

    /* info-bar روی تصویر — داخل media-wrap، overlay از پایین، پنهان تا touch */
    .mv-info-bar {
        position: absolute;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 70%, transparent 100%);
        opacity: 0;
        pointer-events: none;
        padding: 22px 7px 6px;
        gap: 3px;
        z-index: 4;
        transition: opacity 0.25s ease;
    }
    .mv-info-bar.mv-touch-show {
        opacity: 1;
        pointer-events: auto;
    }
    /* media-wrap ارتفاع ثابت داره و info-bar داخلشه */
    .mv-media-wrap { border-radius: var(--radius-md) !important; }

    .mv-info-title { font-size: 0.72rem; }
    .mv-info-meta { font-size: 0.6rem; }
    .mv-play-btn { width: 26px; height: 26px; }
    .mv-info-actions { margin-top: 2px; }

    /* کنترل‌های تریلر در موبایل پنهان */
    .mv-trailer-controls { display: none !important; }
}

/* موبایل: تبدیل grid به horizontal scroller */
@media (max-width: 600px) {
    .most-viewed-container { margin-top: 1rem; }
    .most-viewed-grid-wrapper { padding: 0 1.5rem; }
    .most-viewed-grid-scroller { overflow: visible; }

    .most-viewed-grid {
        display: flex !important;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .most-viewed-grid::-webkit-scrollbar { display: none; }

    .most-viewed-grid .most-viewed-item {
        flex-shrink: 0;
        width: calc(100% - 55px);
        scroll-snap-align: start;
    }
}

@media (max-width: 380px) {
    .most-viewed-grid .most-viewed-item { width: calc(100% - 45px); }
}

/* ===========================
   کارت شیشه‌ای — مشترک بین صفحات (movies/series/iranian/animations)
   =========================== */
.glass-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    padding: 8px 10px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    opacity: 0;
    z-index: 15;
}
.most-viewed-item:hover .glass-card {
    transform: translateY(0);
    opacity: 1;
}
.glass-card-title {
    font-weight: bold;
    font-size: 0.75rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================
   دکمه‌های ناوبری اسکرولر
   =========================== */
.glass-nav-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(26,26,26,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,140,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 30;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
    /* همیشه نمایش داده می‌شه — JS وقتی به ابتدا/انتها رسید مخفی می‌کنه */
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.glass-nav-btn:hover {
    opacity: 1 !important;
    background: rgba(0,140,255,0.75);
    transform: translateY(-50%);
    border-color: #008CFF;
}
.glass-nav-btn.left  { left: -18px; }
.glass-nav-btn.right { right: -18px; display: none; }
.scroller-container  { position: relative; overflow: visible; }

/* روی موبایل: کمی بیشتر به داخل */
@media (max-width: 768px) {
    .glass-nav-btn {
        width: 32px;
        height: 32px;
    }
    .glass-nav-btn.left  { left: -8px; }
    .glass-nav-btn.right { right: -8px; }
    .scroller-container  { overflow: visible; }
}

/* ===========================
   فیلتر اصلی
   =========================== */
.filter-container {
    background: rgba(42,42,42,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1 1 140px;
    min-width: 130px;
    position: relative;
}

.filter-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #cbd5e1;
}

.filter-select {
    width: 100%;
    background-color: #2a2a2a;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.6rem 0.55rem 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
    appearance: none;
    -webkit-appearance: none;
}
.filter-select:focus {
    outline: none;
    border-color: #008CFF;
    box-shadow: 0 0 0 2px rgba(0,140,255,0.2);
}
.filter-select.active {
    border-color: #008CFF;
    box-shadow: 0 0 0 2px rgba(0,140,255,0.2);
}

.filter-button {
    background: linear-gradient(135deg, #0070CC, #008CFF);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.575rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 110px;
    height: 40px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.875rem;
}
.filter-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #067890, #0495b3);
    box-shadow: 0 4px 12px rgba(0,140,255,0.35);
    transform: translateY(-1px);
}
.filter-button:disabled {
    background: #3a3a3a;
    color: #6b7280;
    cursor: not-allowed;
}

/* فیلتر ریسپانسیو */
@media (max-width: 1024px) {
    .filter-row { gap: 0.6rem; }
    .filter-group { flex: 1 1 120px; }
}

@media (max-width: 767px) {
    .filter-container {
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .filter-container { padding: 0.875rem; }
    .filter-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .filter-group { min-width: auto; }
    /* دکمه اعمال فیلتر: تمام عرض */
    .filter-group:last-child {
        grid-column: 1 / -1;
    }
    .filter-button { width: 100%; }
}

@media (max-width: 480px) {
    .filter-row { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .filter-label { font-size: 0.75rem; }
    .filter-select { font-size: 0.8rem; padding: 0.5rem 0.5rem 0.5rem 1.75rem; }
}

/* گوشی‌های خیلی کوچک: هر فیلد جداگانه */
@media (max-width: 360px) {
    .filter-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .filter-group:last-child { grid-column: auto; }
}

/* ===========================
   Select wrapper با chevron
   =========================== */
.select-wrapper { position: relative; display: block; }
.select-wrapper .select-chevron {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    transition: transform 0.25s ease, color 0.2s;
    width: 0.9rem;
    height: 0.9rem;
}
.select-wrapper.select-open .select-chevron {
    transform: translateY(-50%) rotate(180deg);
    color: #008CFF;
}
.sort-wrapper { position: relative; display: inline-flex; align-items: center; }
.sort-wrapper #sort-filter { appearance: none; -webkit-appearance: none; padding-left: 2rem; }
.sort-wrapper .select-chevron {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    transition: transform 0.25s ease, color 0.2s;
}
.sort-wrapper.select-open .select-chevron {
    transform: translateY(-50%) rotate(180deg);
    color: #008CFF;
}

/* ===========================
   مودال جستجو
   =========================== */
.search-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(26,26,26,0.97);
    z-index: 100;
    padding: 20px;
    overflow-y: auto;
}
.search-modal.active { display: block; }

/* ===========================
   نشان‌های دوبله / زیرنویس
   =========================== */

/* wrapper که badge‌ها را از پایین به بالا stack می‌کند */
.badge-stack {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    z-index: 2;
}

.dubbed-badge {
    background-color: #fbbf24;
    color: #000;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.subtitled-badge {
    background-color: #7c3aed;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

/* ===========================
   Content sections spacing
   =========================== */
.content-section { padding: 0; }

main.pt-16 { padding-top: 4rem; }

@media (max-width: 768px) {
    main.pt-16 { padding-top: 3.5rem; }
    .container.mx-auto { padding-left: 0.75rem; padding-right: 0.75rem; }
    .space-y-12 > * + * { margin-top: 2rem !important; }
    .space-y-16 > * + * { margin-top: 2.5rem !important; }
}

@media (max-width: 480px) {
    main.pt-16 { padding-top: 3.25rem; }
    .container.mx-auto { padding-left: 0.6rem; padding-right: 0.6rem; }
    .space-y-12 > * + * { margin-top: 1.5rem !important; }
}

/* عنوان بخش‌ها */
.content-section .flex.justify-between h2 {
    font-size: 1.1rem;
}
@media (min-width: 640px) {
    .content-section .flex.justify-between h2 { font-size: 1.25rem; }
}
@media (min-width: 768px) {
    .content-section .flex.justify-between h2 { font-size: 1.4rem; }
}

/* لینک "مشاهده همه" */
.content-section .flex.justify-between a {
    font-size: 0.8rem;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .content-section .flex.justify-between a { font-size: 0.875rem; }
}

/* ===========================
   مدال تایید حذف
   =========================== */
.delete-confirm-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,26,26,0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.delete-confirm-modal.active { display: flex; }
.delete-confirm-modal-content {
    background: #2a2a2a;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}
.delete-confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(239,68,68,0.15);
    border-radius: 50%;
    margin: 0 auto 18px;
    color: #ef4444;
}
.delete-confirm-title { font-size: 1.25rem; font-weight: bold; color: white; margin: 0 0 10px; }
.delete-confirm-message { font-size: 0.95rem; color: #94a3b8; margin: 0 0 22px; line-height: 1.6; }
.delete-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.delete-confirm-btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
}
.delete-confirm-btn.cancel { background: #3a3a3a; color: white; }
.delete-confirm-btn.cancel:hover { background: #4b5563; }
.delete-confirm-btn.confirm { background: #ef4444; color: white; }
.delete-confirm-btn.confirm:hover { background: #dc2626; }

@media (max-width: 480px) {
    .delete-confirm-modal-content { padding: 20px; }
    .delete-confirm-title { font-size: 1.1rem; }
    .delete-confirm-message { font-size: 0.875rem; }
    .delete-confirm-actions { flex-direction: column-reverse; }
    .delete-confirm-btn { width: 100%; }
}

/* ===========================
   انیمیشن‌های مودال
   =========================== */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes modalFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(-16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.delete-confirm-modal { animation: modalFadeIn 0.25s ease-out; }
.delete-confirm-modal-content { animation: modalSlideIn 0.25s ease-out; }
.delete-confirm-modal.closing { animation: modalFadeOut 0.25s ease-in forwards; }

/* ===========================
   کارت — overlay اطلاعات هنگام hover
   =========================== */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 55%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 14px;
}
.movie-card:hover .card-hover-overlay,
.movie-card.is-touch-active .card-hover-overlay,
.sr-card:hover .card-hover-overlay,
.sr-card.is-touch-active .card-hover-overlay {
    opacity: 1;
}
.card-hover-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    width: 100%;
    padding: 0 8px;
}
.card-hover-imdb {
    font-size: 0.78rem;
    font-weight: 700;
    color: #facc15;
    line-height: 1.3;
}
.card-hover-genre {
    font-size: 0.75rem;
    color: #e5e7eb;
    line-height: 1.3;
}
.card-hover-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.3;
}

/* ===========================
   دکمه قلب علاقه‌مندی — حالت active
   =========================== */
.add-to-list-btn.wl-active {
    background: #ef4444 !important;
    color: #fff !important;
    opacity: 1 !important;
}
.add-to-list-btn.wl-active:hover {
    background: #dc2626 !important;
}

/* ===========================
   ادامه تماشا - ریسپانسیو
   =========================== */

/* badge فصل/قسمت — مشترک بین صفحه اصلی و صفحه ادامه تماشا */
.cw-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
    line-height: 1.5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* دکمه‌های پلی و حذف — مشترک بین صفحه اصلی و صفحه ادامه تماشا */
.cw-play-btn,
.cw-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
}
.cw-play-btn  { background: linear-gradient(135deg, #0070CC, #008CFF); color: #fff; }
.cw-play-btn:hover  { background: linear-gradient(135deg, #067890, #0495b3); box-shadow: 0 4px 12px rgba(0,140,255,0.4); }
.cw-delete-btn { background: #ef4444; color: #fff; }
.cw-delete-btn:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239,68,68,0.4); }
.cw-play-btn::after, .cw-delete-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%,-50%);
    transition: width 0.3s, height 0.3s;
}
.cw-play-btn:active::after, .cw-delete-btn:active::after { width: 200px; height: 200px; }

/* ارتفاع تصویر کارت ادامه تماشا */
.continue-watching-img {
    height: 11rem;
}

@media (max-width: 768px) {
    .continue-watching-img { height: 10rem; }
}

@media (max-width: 600px) {
    .continue-watching-img { height: 9rem; }
}

/* override ارتفاع پوستر عمومی برای ادامه تماشا */
#continue-watching .movie-card .relative img {
    height: 11rem !important;
}

@media (max-width: 768px) {
    #continue-watching .movie-card .relative img { height: 10rem !important; }
}

@media (max-width: 600px) {
    #continue-watching .movie-card .relative img { height: 9rem !important; }
}

.continue-watching-card {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* عرض کارت‌های ادامه تماشا — 5تا کل عرض رو بگیرن */
#continue-watching .movie-card {
    width: calc((100% - 4 * 12px) / 5) !important;
    min-width: 180px;
}

@media (max-width: 1024px) {
    #continue-watching .movie-card {
        width: calc((100% - 3 * 10px) / 4) !important;
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    #continue-watching .movie-card {
        width: calc((100% - 2 * 10px) / 3) !important;
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    #continue-watching .movie-card {
        width: calc((100% - 8px) / 2) !important;
        min-width: 120px;
    }
}

/* ===========================
   منوی موبایل حرفه‌ای
   =========================== */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: #1a1a1a;
    border-left: 1px solid rgba(0,140,255,0.18);
    z-index: 99;
    transform: translateX(105%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
}

.mobile-menu-panel.open {
    transform: translateX(0);
    box-shadow: -12px 0 40px rgba(0,0,0,0.6);
}

/* لایه تاریک پشت منو */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 98;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.mobile-menu-overlay.open { display: block; }

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0 0 1.5rem;
}

/* هدر drawer */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* جستجوی داخل منو */
.mobile-search-bar {
    position: relative;
    margin: 0.875rem 1rem 0.5rem;
}

.mobile-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    width: 1rem;
    height: 1rem;
}
.mobile-search-input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 0.65rem 2.25rem 0.65rem 1rem;
    color: #f1f5f9;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}
.mobile-search-input:focus {
    border-color: #008CFF;
    box-shadow: 0 0 0 2px rgba(0,140,255,0.15);
}
.mobile-search-input::placeholder { color: #64748b; }

/* ناوبری موبایل */
.mobile-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0.75rem 0;
}

/* لینک ساده */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 2px;
}
.mobile-nav-link:hover {
    color: #66BBFF;
    background: rgba(0,140,255,0.08);
    padding-right: 1rem;
}

/* accordion */
.mobile-nav-accordion {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 2px;
}

.mobile-nav-acc-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0.75rem;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    text-align: right;
}
.mobile-nav-acc-btn:hover {
    color: #66BBFF;
    background: rgba(0,140,255,0.08);
}
.mobile-nav-acc-btn.active {
    color: #008CFF;
    background: rgba(0,140,255,0.1);
}

.acc-chevron {
    transition: transform 0.3s ease, color 0.2s;
    flex-shrink: 0;
}
.mobile-nav-acc-btn.active .acc-chevron {
    transform: rotate(180deg);
    color: #008CFF;
}

/* محتوای accordion */
.mobile-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    padding: 0 0.5rem;
}
.mobile-acc-body.open {
    max-height: 400px;
}

.mobile-acc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0.75rem 0 0.5rem;
}
.mobile-acc-grid a {
    display: block;
    text-align: center;
    padding: 0.45rem 0.25rem;
    background: rgba(42,42,42,0.8);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-acc-grid a:hover {
    background: rgba(0,140,255,0.15);
    color: #66BBFF;
    border-color: rgba(0,140,255,0.3);
}

.mobile-acc-all {
    display: block;
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    color: #008CFF;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.mobile-acc-all:hover { color: #66BBFF; }

/* فوتر منوی موبایل */
.mobile-menu-footer {
    padding: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #0070CC, #008CFF);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,140,255,0.3);
}
.mobile-login-btn:hover {
    background: linear-gradient(135deg, #008CFF, #33A8FF);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,140,255,0.4);
}

/* آیکون همبرگر انیمیشن */
#menu-icon-open, #menu-icon-close {
    transition: all 0.2s ease;
}

/* ===========================
   دکمه toggle فیلتر — فقط موبایل
   =========================== */
.index-filter-toggle-btn {
    display: none; /* دسکتاپ: مخفی */
}

@media (max-width: 768px) {
    /* دکمه toggle نمایش */
    .index-filter-toggle-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.75rem 1rem;
        background: rgba(42,42,42,0.9);
        color: #f1f5f9;
        border: 1px solid #3a3a3a;
        border-radius: var(--radius-sm);
        font-family: 'Vazirmatn', sans-serif;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 0;
        transition: border-color 0.2s, background 0.2s;
    }
    .index-filter-toggle-btn:hover {
        border-color: var(--primary-color);
        background: rgba(0,140,255,0.08);
    }
    .index-filter-toggle-btn.open {
        border-color: var(--primary-color);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        background: rgba(0,140,255,0.1);
    }

    /* chevron انیمیشن */
    .index-filter-chevron {
        transition: transform 0.3s ease;
        color: #6b7280;
    }
    .index-filter-toggle-btn.open .index-filter-chevron {
        transform: rotate(180deg);
        color: var(--primary-color);
    }

    /* فیلدهای فیلتر — پیش‌فرض مخفی */
    #index-filter-body {
        display: none;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
        margin-top: 0;
    }
    #index-filter-body.open {
        display: block;
    }
}

/* =============================================
   Bottom Navigation Bar — فقط موبایل
   ============================================= */

/* فقط زیر lg (1024px) نمایش داده می‌شه */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1023px) {
    .mobile-bottom-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        height: 64px;
        background: #1a1a1a;
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 9000;
        padding: 0 8px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    }

    /* فضای پایین صفحه تا content زیر nav پنهان نشه */
    body {
        padding-bottom: 64px;
    }

    /* گروه چپ/راست — هر کدام ۲ آیتم */
    .mbn-group {
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: space-around;
    }

    /* فضای وسط برای دکمه جستجو */
    .mbn-center-wrap {
        flex: 0 0 72px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* هر آیتم nav */
    .mbn-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 10px;
        background: transparent;
        border: none;
        color: #6b7280;
        cursor: pointer;
        text-decoration: none;
        transition: color 0.2s ease;
        font-family: 'Vazirmatn', sans-serif;
        min-width: 48px;
    }

    .mbn-item:hover,
    .mbn-item.mbn-active {
        color: #008CFF;
    }

    .mbn-icon {
        width: 22px;
        height: 22px;
        stroke-width: 1.8;
        flex-shrink: 0;
    }

    .mbn-label {
        font-size: 0.65rem;
        font-weight: 500;
        font-family: 'Vazirmatn', sans-serif;
        line-height: 1;
        white-space: nowrap;
    }

    /* دکمه جستجوی وسط */
    .mbn-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0070CC, #008CFF);
        border: none;
        cursor: pointer;
        /* بالاتر از nav */
        position: relative;
        bottom: 10px;
        transition: background 0.2s ease;
    }

    .mbn-search-btn:hover {
        background: linear-gradient(135deg, #005BB5, #0070CC);
    }

    .mbn-search-icon {
        width: 24px;
        height: 24px;
        color: #fff;
        stroke-width: 2.2;
    }
}


/* ═══════════════════════════════════════════════════
   پنل کاربری — آواتار دایره + dropdown
   ═══════════════════════════════════════════════════ */

/* wrapper — position:relative برای dropdown */
.user-avatar-wrap {
    position: relative;
}
.user-avatar-wrap.hidden { display: none; }
.user-avatar-wrap.active { display: block; }

/* دکمه گرد آواتار — بدون background (پس‌زمینه هدر نمایش داده می‌شود) */
.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0,140,255,0.5);
    background: transparent;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}
.user-avatar-btn:hover {
    border-color: #008CFF;
    color: #008CFF;
}

/* Dropdown panel */
.user-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: 260px;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    z-index: 500;
    direction: rtl;
}
/* موبایل: ثابت نسبت به viewport تا هرگز از صفحه بیرون نرود */
.user-dropdown-mobile {
    position: fixed;
    right: auto;
    left: 8px;
    /* top در JS تنظیم می‌شود — مقدار پیش‌فرض برای هدر موبایل ~56px */
    top: 56px;
    width: min(260px, calc(100vw - 16px));
    min-width: 0;
}
.user-dropdown.open { display: block; }

/* بخش‌های dropdown */
.udrop-section { padding: 4px 0; }

/* بخش پروفایل بالای dropdown */
.udrop-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px;
}
.udrop-profile-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.udrop-user-phone {
    font-size: 12px;
    color: #6b7280;
    direction: ltr;
    text-align: right;
}

.udrop-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,140,255,0.15);
    border: 2px solid rgba(0,140,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008CFF;
    flex-shrink: 0;
    overflow: hidden;
}
.udrop-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* خط جداکننده */
.udrop-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0;
}

/* آیتم منو */
.udrop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
    direction: rtl;
}
.udrop-item:hover {
    background: rgba(255,255,255,0.05);
    color: #f1f5f9;
}
.udrop-icon {
    width: 18px;
    height: 18px;
    color: #6b7280;
    flex-shrink: 0;
    transition: color .15s;
}
.udrop-item:hover .udrop-icon { color: #008CFF; }

/* دکمه خروج */
.udrop-logout {
    color: #f87171;
    padding-bottom: 12px;
}
.udrop-logout:hover { background: rgba(239,68,68,0.08); color: #f87171; }
.udrop-logout .udrop-icon { color: #f87171; }
.udrop-logout:hover .udrop-icon { color: #f87171; }
