﻿/* ═══════════════════════════════════════════════════════════
   🎬 چکاوک — استایل سایت
   همان تم اپ موبایل: سرمه‌ای تیره #081523 + طلایی #D89B3D
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg: #081523; /* PrimaryBackground اپ */
    --bg-2: #0b1a2c; /* SecondaryBackground */
    --surface: #0f2033; /* SurfaceBackground */
    --elevated: #16293f; /* ElevatedBackground */
    --border: rgba(147, 165, 184, 0.18);
    --text: #eef4fa; /* PrimaryText */
    --text-2: #cfdcea; /* SecondaryText */
    --muted: #93a5b8; /* MutedText */
    --faded: #5d7186; /* FadedText */
    --gold: #d89b3d; /* PrimaryGold */
    --gold-dark: #a9782c; /* GoldDark */
    --gold-soft: rgba(216, 155, 61, 0.13);
    --error: #ff6b6b;
    --error-dark: rgba(178, 48, 48, 0.25);
    --radius: 16px;
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scrollbar-color: var(--elevated) var(--bg);
}

body {
    margin: 0;
    font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
}

img {
    display: block;
}

a {
    color: var(--gold);
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--elevated);
    border-radius: 8px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--faded);
    }

/* ═══════════════════════════════════════════
   چیدمان کلی: هدر / محتوا+منو / فوتر
   ═══════════════════════════════════════════ */

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.brand-icon {
    font-size: 28px;
}

.brand-text strong {
    display: block;
    font-size: 18px;
    line-height: 1.3;
}

.brand-text small {
    display: block;
    font-size: 10px;
    color: var(--muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
}

    .icon-btn:hover {
        border-color: var(--gold);
    }

    .icon-btn:active {
        transform: scale(0.94);
    }

.gold-line {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-dark) 20%, var(--gold) 50%, var(--gold-dark) 80%, transparent 100%);
}

/* ── بدنه: منو (راست) + محتوا (چپ) ── */

.body-wrap {
    display: flex;
    flex: 1;
    width: 100%;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 16px;
}

.sidebar {
    width: 92px;
    flex-shrink: 0;
    padding: 14px 8px;
}

.side-rail {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: calc(100vh - 170px);
}

.side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 72px;
    padding: 6px 0 4px;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
}

    .side-btn:hover .side-icon {
        border-color: var(--gold);
    }

.side-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.15s;
}

.side-label {
    font-size: 10px;
    font-weight: bold;
    color: var(--muted);
}

.side-sep {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.side-spacer {
    flex: 1;
}

.side-exit .side-icon {
    background: var(--error-dark);
    border-color: rgba(255, 107, 107, 0.5);
}

.side-exit .side-label {
    color: var(--error);
}

.side-login .side-icon {
    background: var(--gold-soft);
    border-color: var(--gold);
}

.side-login .side-label {
    color: var(--gold);
}

.inline-form {
    display: inline;
}

.footer {
    margin-top: auto;
    background: var(--bg-2);
}

.footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 11px;
    color: var(--muted);
    font-weight: bold;
}

    .footer-text .dot {
        color: var(--faded);
    }

/* ═══════════════════════════════════════════
   کارت‌ها و اجزای مشترک
   ═══════════════════════════════════════════ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.card-title {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 12px;
}

.page-head {
    margin: 4px 0 14px;
}

    .page-head h1 {
        margin: 0 0 4px;
        font-size: 22px;
    }

.page-sub {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--gold);
    color: #081523;
    font-weight: bold;
    font-size: 14px;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    padding: 10px 22px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(216, 155, 61, 0.3);
    transition: filter 0.15s, transform 0.1s;
}

    .btn-gold:hover {
        filter: brightness(1.08);
    }

    .btn-gold:active {
        transform: scale(0.97);
    }

.btn-lg {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 18px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

    .btn-ghost:hover {
        border-color: var(--gold);
        color: var(--text-2);
    }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 6px;
}

    .form-actions .btn-gold {
        flex: 1;
        min-width: 180px;
    }

/* ── فرم‌ها ── */

.field {
    margin-bottom: 12px;
}

    .field label {
        display: block;
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 6px;
    }

    .field input,
    .field select,
    .actors-search input {
        width: 100%;
        height: 44px;
        background: var(--elevated);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--text);
        padding: 0 12px;
        font-family: inherit;
        font-size: 14px;
        transition: border-color 0.15s, box-shadow 0.15s;
    }

        .field input:focus,
        .field select:focus,
        .actors-search input:focus {
            outline: none;
            border-color: var(--gold);
            box-shadow: 0 0 0 3px var(--gold-soft);
        }

        .field input::placeholder {
            color: var(--faded);
        }

        .field select option {
            background: var(--elevated);
            color: var(--text);
        }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-error {
    display: block;
    font-size: 11px;
    color: var(--error);
    margin-top: 4px;
}

.validation-summary {
    color: var(--error);
    font-size: 13px;
    margin-bottom: 12px;
}

    .validation-summary ul {
        margin: 0;
        padding-inline-start: 18px;
    }

    .validation-summary:empty {
        display: none;
    }

/* ═══════════════════════════════════════════
   صفحه اصلی: تب‌ها + ژانرها + ردیف‌ها
   ═══════════════════════════════════════════ */

.category-card {
    padding: 0;
    overflow: hidden;
}

.tabs {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding: 8px 8px 0;
    scrollbar-width: none;
}

    .tabs::-webkit-scrollbar {
        display: none;
    }

.tab {
    flex-shrink: 0;
    background: var(--elevated);
    color: var(--muted);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 14px;
    margin-top: 4px;
    cursor: pointer;
}

    .tab.active {
        background: var(--surface);
        color: var(--text);
        border-color: var(--border);
        margin-top: 0;
        padding-bottom: 12px;
    }

.tab-panels {
    min-width: 0;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 18px 16px;
        border-top: 1px solid var(--border);
    }

.cat-icon {
    font-size: 46px;
    line-height: 1;
}

.cat-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.cat-info p {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--muted);
}

.cat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .cat-actions .btn-gold {
        padding: 7px 16px;
        font-size: 12px;
    }

.genre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.genre-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 8px;
    color: var(--text);
    transition: border-color 0.15s, transform 0.1s;
}

    .genre-cell:hover {
        border-color: var(--gold);
        transform: translateY(-2px);
    }

.genre-emoji {
    font-size: 26px;
}

.genre-name {
    font-size: 12px;
    font-weight: bold;
}

.row-card {
    padding-bottom: 12px;
}

.row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.row-title {
    margin: 0;
    font-size: 15px;
}

.row-link {
    font-size: 12px;
}

/* ═══════════════════════════════════════════
   کارت پوستر
   ═══════════════════════════════════════════ */

.poster-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 148px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.movie-card {
    color: var(--text);
    min-width: 0;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--elevated);
    border: 1px solid var(--border);
    transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.movie-card:hover .poster-wrap {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    background: var(--elevated);
}

.poster-empty-lg {
    font-size: 52px;
}

.rating-badge {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    background: rgba(8, 21, 35, 0.85);
    color: var(--gold);
    font-size: 11px;
    font-weight: bold;
    border-radius: 8px;
    padding: 2px 7px;
    border: 1px solid rgba(216, 155, 61, 0.4);
}

.type-badge {
    position: absolute;
    bottom: 6px;
    inset-inline-end: 6px;
    background: rgba(8, 21, 35, 0.85);
    color: var(--text-2);
    font-size: 10px;
    border-radius: 8px;
    padding: 2px 7px;
    border: 1px solid var(--border);
}

.movie-card-title {
    font-size: 12px;
    font-weight: bold;
    margin-top: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* شماره‌ی رتبه‌ی گیشه ایران */
.rank-list {
    counter-reset: rank;
}

    .rank-list .movie-card {
        counter-increment: rank;
    }

    .rank-list .poster-wrap::after {
        content: counter(rank);
        position: absolute;
        bottom: 4px;
        inset-inline-start: 6px;
        font-size: 30px;
        font-weight: 900;
        color: var(--gold);
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
        pointer-events: none;
    }

/* ═══════════════════════════════════════════
   جستجو: فرم + فیلتر این‌لاین + نتایج
   ═══════════════════════════════════════════ */

.suggest-field {
    position: relative;
}

.suggest-box {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline: 0;
    z-index: 40;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 264px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.suggest-item {
    padding: 9px 12px;
    cursor: pointer;
}

    .suggest-item:hover, .suggest-item.active {
        background: var(--elevated);
    }

.si-display {
    font-size: 14px;
    font-weight: bold;
}

.si-detail {
    font-size: 11px;
    color: var(--muted);
}

.results {
    margin-top: 8px;
}

.results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0 12px;
}

.results-title {
    margin: 0;
    font-size: 17px;
}

.results-count {
    font-size: 12px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0 8px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: bold;
}

    .page-btn:hover {
        border-color: var(--gold);
        color: var(--text);
    }

    .page-btn.active {
        background: var(--gold);
        color: #081523;
        border-color: var(--gold);
    }

.page-dots {
    color: var(--faded);
    padding: 0 2px;
}

.actors-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

    .actors-search input {
        flex: 1;
        min-width: 200px;
    }

/* ═══════════════════════════════════════════
   صفحه‌ی فیلم و بازیگر
   ═══════════════════════════════════════════ */

.detail-page {
    max-width: 100%;
}

.detail-hero {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-people {
    margin: 6px 0 10px;
}

.detail-poster {
    width: 220px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--elevated);
}

    .detail-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.detail-title {
    margin: 0 0 4px;
    font-size: 24px;
}

.detail-original {
    font-size: 13px;
    color: var(--muted);
    direction: ltr;
    text-align: start;
    margin-bottom: 8px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.meta-chip {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 12px;
}

    .meta-chip.gold {
        background: var(--gold);
        color: #081523;
        font-weight: bold;
        border: none;
    }

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.chip {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 999px;
    padding: 2px 11px;
    font-size: 12px;
    transition: filter 0.15s;
}

    .chip:hover {
        filter: brightness(1.15);
    }

.person-line {
    font-size: 13px;
    margin: 3px 0;
    color: var(--text-2);
}

.person-role {
    color: var(--gold);
    font-weight: bold;
    margin-inline-end: 6px;
}

.detail-summary {
    margin: 0;
    font-size: 14px;
    line-height: 2.1;
    color: var(--text-2);
    white-space: pre-line;
}

/* ── بازیگرها ── */

.actor-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.actor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 14px;
}

.actor-card {
    text-align: center;
    color: var(--text);
    min-width: 0;
}

.actor-photo {
    width: 96px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--elevated);
    transition: border-color 0.15s;
}

.actor-card:hover .actor-photo {
    border-color: var(--gold);
}

.actor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-photo .poster-empty {
    font-size: 30px;
}

.actor-name {
    font-size: 12px;
    font-weight: bold;
    margin-top: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-original {
    font-size: 10px;
    color: var(--muted);
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-hero {
    align-items: center;
}

.actor-photo-lg {
    width: 150px;
    border-width: 3px;
}

    .actor-photo-lg .poster-empty {
        font-size: 46px;
    }

/* ═══════════════════════════════════════════
   ورود / ثبت‌نام
   ═══════════════════════════════════════════ */

.auth-page {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 28px 22px;
}

.auth-icon {
    font-size: 44px;
    margin-bottom: 6px;
}

.auth-title {
    margin: 0 0 4px;
    font-size: 20px;
}

.auth-sub {
    margin: 0 0 18px;
    font-size: 12px;
    color: var(--muted);
}

.auth-card .field {
    text-align: start;
}

.auth-links {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

    .auth-links a {
        font-weight: bold;
        margin-inline-start: 4px;
    }

/* ═══════════════════════════════════════════
   EmptyState
   ═══════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 56px 20px;
}

.empty-icon {
    font-size: 54px;
    margin-bottom: 10px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.empty-state p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--muted);
}

/* ═══════════════════════════════════════════
   موبایل — منو ستون باریک سمت راست می‌ماند
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {

    .topbar-inner {
        padding: 8px 12px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .brand-text small {
        display: none;
    }

    /* منو همیشه ستون سمت راست است — حتی در موبایل */
    .body-wrap {
        display: flex;
    }

    .content {
        padding: 10px;
    }

    .sidebar {
        width: 64px;
        padding: 10px 4px;
    }

    .side-rail {
        top: 64px;
        gap: 4px;
        min-height: calc(100vh - 150px);
    }

    .side-btn {
        width: 100%;
        padding: 4px 0 2px;
    }

    .side-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 10px;
    }

    .side-label {
        font-size: 8px;
    }

    .side-sep {
        display: none;
    }

    .tab-panel.active {
        flex-direction: column;
        text-align: center;
    }

    .cat-actions {
        justify-content: center;
    }

    .cat-icon {
        font-size: 40px;
    }

    .detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-poster {
        width: 190px;
    }

    .detail-meta, .detail-chips, .cat-actions, .form-actions {
        justify-content: center;
    }

    .detail-original {
        text-align: center;
    }

    .person-line {
        text-align: center;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .poster-row {
        grid-auto-columns: 126px;
    }

    .poster-grid {
        grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
        gap: 9px;
    }

    .actor-row {
        grid-auto-columns: 84px;
    }

    .actor-photo {
        width: 84px;
    }
}

/* ═══════════════════════════════════════════
   🛒 سبد خرید — صفحه‌ی فیلم (همان AddToCartCart اپ)
   ═══════════════════════════════════════════ */

.cart-card {
    padding-bottom: 18px;
}

.cart-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.cart-icon {
    font-size: 28px;
}

.cart-head .card-title {
    margin: 0;
}

.cart-status {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 12px 0;
}

.seasons-title {
    color: var(--gold);
    font-size: 15px;
    margin: 16px 0 10px;
}

.season-box {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.season-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.season-name {
    font-weight: bold;
    font-size: 14px;
}

.episode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

    .episode-row:last-child {
        margin-bottom: 0;
    }

.episode-info {
    min-width: 0;
}

    .episode-info b {
        display: block;
        font-size: 13px;
    }

    .episode-info small {
        display: block;
        color: var(--muted);
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.ep-in-cart {
    color: var(--success, #2fbf71);
    font-size: 16px;
}

.btn-add {
    background: var(--success, #2fbf71);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s, transform 0.1s;
}

    .btn-add:hover {
        filter: brightness(1.1);
    }

    .btn-add:active {
        transform: scale(0.95);
    }

.btn-season {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    padding: 7px 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s;
}

    .btn-season:hover {
        filter: brightness(1.15);
    }

.in-cart {
    background: var(--gold-soft) !important;
    color: var(--gold) !important;
    box-shadow: none !important;
    cursor: default;
}

@media (max-width: 768px) {
    .episode-row {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════
   🛒 صفحه‌ی سبد خرید — همان CartPage اپ
   ═══════════════════════════════════════════ */

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 10px;
}

.cart-poster {
    width: 56px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--elevated);
    border: 1px solid var(--border);
}

    .cart-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cart-poster .poster-empty {
        font-size: 20px;
    }

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .cart-item-title:hover {
        color: var(--gold);
    }

.cart-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 3px;
}

.badge-chip {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 10px;
    border-radius: 999px;
    padding: 1px 8px;
}

.price-note {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.cart-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.cart-item-price {
    color: var(--gold);
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
}

    .cart-item-price.no-price {
        color: var(--muted);
        font-size: 11px;
    }

.btn-remove {
    background: var(--error-dark);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: var(--error);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    padding: 5px 10px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

    .btn-remove:hover {
        filter: brightness(1.2);
    }

    .btn-remove:active {
        transform: scale(0.92);
    }

.totals-box {
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 14px 0;
}

.total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    padding: 4px 0;
}

.total-main {
    border-top: 1px dashed var(--border);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    color: var(--gold);
}

    .total-main b {
        font-size: 18px;
    }

.total-warn {
    color: var(--error);
    font-size: 12px;
    justify-content: center;
}

.btn-danger {
    border-color: rgba(255, 107, 107, 0.5);
    color: var(--error);
}

    .btn-danger:hover {
        border-color: var(--error);
        color: var(--error);
    }

/* بج تعداد سبد روی آیکون منو */
.side-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 0;
    inset-inline-end: 2px;
    background: var(--error);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item-side {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}

/* ═══════════════════════════════════════════
   👤 صفحه‌ی پروفایل — همان ProfilePage اپ
   ═══════════════════════════════════════════ */

.profile-card {
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--gold-soft);
    border: 2px solid var(--gold);
    border-radius: 50%;
}

.profile-name {
    margin: 0 0 6px;
    font-size: 18px;
}

.pfield {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.pfield-last {
    border-bottom: none;
}

.pfield-label {
    color: var(--gold);
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.pfield-value {
    color: var(--text);
    font-size: 14px;
    text-align: left;
    word-break: break-word;
}

.profile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

    .profile-actions .btn-gold,
    .profile-actions .btn-ghost {
        width: 100%;
    }

@media (max-width: 768px) {
    .pfield {
        flex-direction: column;
        gap: 2px;
    }

    .pfield-value {
        text-align: start;
    }
}

/* ═══════════════════════════════════════════
   🧾 سوابق خرید + 📥 درخواست فیلم — همان اپ
   ═══════════════════════════════════════════ */

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
}

.order-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-title {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .order-title:hover {
        color: var(--gold);
    }

.order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 3px;
}

.order-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    font-size: 12px;
    white-space: nowrap;
}

.order-date {
    color: var(--muted);
}

.order-copied {
    color: var(--success, #2fbf71);
    font-weight: bold;
}

.order-pending {
    color: var(--gold);
    font-weight: bold;
}

/* ── فرم درخواست: انتخاب نوع ── */

.type-toggle {
    display: flex;
    gap: 8px;
}

.type-opt {
    flex: 1;
    cursor: pointer;
}

    .type-opt input {
        display: none;
    }

    .type-opt span {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        background: var(--elevated);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--muted);
        font-size: 14px;
        font-weight: bold;
        transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .type-opt input:checked + span {
        background: var(--gold-soft);
        border-color: var(--gold);
        color: var(--gold);
    }

/* ── لیست درخواست‌ها ── */

.req-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.req-info {
    min-width: 0;
}

    .req-info b {
        display: block;
        font-size: 14px;
    }

.req-status {
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

    .req-status.approved {
        color: var(--success, #2fbf71);
    }

    .req-status.rejected {
        color: var(--error);
    }

    .req-status.pending {
        color: var(--gold);
    }

@media (max-width: 768px) {
    .order-item {
        flex-wrap: wrap;
    }

    .order-side {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    .req-item {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════
   🔍 جستجوی سریع صفحه‌ی اصلی — ۵ نتیجه + نمایش همه
   ═══════════════════════════════════════════ */

.hero-search {
    margin-bottom: 14px;
}

.hero-search-input {
    width: 100%;
    height: 48px;
    padding: 0 46px 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .hero-search-input:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 3px var(--gold-soft);
    }

    .hero-search-input::placeholder {
        color: var(--muted);
    }

.hero-search-icon {
    position: absolute;
    top: 15px;
    inset-inline-end: 15px;
    font-size: 17px;
    opacity: 0.7;
    pointer-events: none;
}

/* لیست نتایج — از .suggest-box موجود + ارتفاع بیشتر */
.suggest-box.hero-suggest {
    max-height: 440px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

    .search-item:hover {
        background: var(--elevated);
    }

.search-poster {
    width: 40px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.search-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.search-title {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item:hover .search-title {
    color: var(--gold);
}

.search-en {
    font-size: 11px;
    color: var(--muted);
    direction: ltr;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-year {
    font-size: 11px;
    color: var(--muted);
}

.search-genre {
    font-size: 11px;
    color: var(--gold);
}

.search-empty {
    padding: 18px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.search-all {
    display: block;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: var(--gold);
}

    .search-all:hover {
        background: var(--gold-soft);
    }

/* ═══════════════════════════════════════════
   🤖 کپچای ثبت‌نام — معادله در جعبه‌ی خط‌خورده
   ═══════════════════════════════════════════ */

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    border: 1px dashed var(--gold);
    border-radius: 12px;
    background: repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.07) 0 7px, transparent 7px 14px), var(--elevated);
    user-select: none;
    margin-bottom: 4px;
}

.captcha-ch {
    display: inline-block;
    font-weight: bold;
    line-height: 1;
}

    .captcha-ch.cd {
        color: var(--gold);
        font-size: 24px;
    }

    .captcha-ch.cs {
        color: var(--muted);
        font-size: 20px;
    }

/* ═══════════════════════════════════════════
   🖼 آیکون‌های تصویری منوی راست (webp)
   داخل همان کاشی — با hover و اندازه‌ی موبایل هماهنگ
   ═══════════════════════════════════════════ */

.side-icon .side-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

/* ═══════════════════════════════════════════
   🖼 آیکون‌های تصویری کارت دسته‌بندی (تب‌های خانه)
   ═══════════════════════════════════════════ */

.cat-icon .cat-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
    .cat-icon .cat-img {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
}

/* ═══════════════════════════════════════════
   🖼 آیکون‌های بزرگ کارت دسته‌بندی (×۲) + متن متناسب
   + لوگوی هدر
   ═══════════════════════════════════════════ */

.cat-icon .cat-img {
    width: 128px;
    height: 128px;
    border-radius: 24px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.cat-info h3 {
    font-size: 21px;
}

.cat-info p {
    font-size: 14px;
}

.cat-actions .btn-gold {
    padding: 9px 20px;
    font-size: 14px;
}

.brand-img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .cat-icon .cat-img {
        width: 112px;
        height: 112px;
        border-radius: 20px;
    }

    .cat-info h3 {
        font-size: 18px;
    }

    .brand-img {
        height: 34px;
    }
}

/* ═══════════════════════════════════════════
   💛 نوار طلایی عمودی — بین منوی راست و محتوا
   (چسبیده مثل منو — همیشه در دید، از زیر هدر شروع)
   ═══════════════════════════════════════════ */

.sidebar::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    right: 92px; /* لبه‌ی چپ منو — عرض منو ۹۲px */
    width: 3px;
    background: linear-gradient(180deg, transparent 0%, var(--gold-dark) 20%, var(--gold) 50%, var(--gold-dark) 80%, transparent 100%);
    z-index: 90; /* زیر هدر (۱۰۰) → از زیر خط طلایی هدر پیدایش می‌شود */
    pointer-events: none;
}

@media (max-width: 768px) {
    .sidebar::before {
        right: 64px;
    }
    /* عرض منو در موبایل */
}

/* 🖼 لوگوی بزرگ‌تر */
.brand-img {
    height: 56px;
}

@media (max-width: 768px) {
    .brand-img {
        height: 44px;
    }
}

/* ═══════════════════════════════════════════
   📺 تب‌های «سریال‌های در حال پخش» — روز هفته
   ═══════════════════════════════════════════ */

.tab-panel.active.airing-panel {
    display: block;
    padding: 14px 6px 6px;
}

.day-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-inline-end: 5px;
    vertical-align: middle;
}

.airing-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════
   📺 فصل + آخرین قسمت زیر کارت سریال در حال پخش
   ═══════════════════════════════════════════ */

.airing-cell {
    min-width: 0;
}

.airing-ep {
    text-align: center;
    padding: 2px 0 6px;
}

.airing-season {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.airing-epnum {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: var(--gold);
    margin-top: 1px;
}

/* ═══════════════════════════════════════════
   🖼 بک‌گراند هدر صفحه‌ی جزئیات — MainPoster
   (پوستر از ستون Poster؛ بک‌گراند از MainPoster)
   ═══════════════════════════════════════════ */

.detail-hero {
    position: relative;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

    .detail-backdrop img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.35;
    }

    .detail-backdrop::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(8, 10, 16, 0.45) 0%, rgba(8, 10, 16, 0.88) 100%);
    }

.detail-hero > .detail-poster,
.detail-hero > .detail-info {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════
   🎭 نوار فیلتر ژانرهای اصلی — صفحه‌ی دسته‌بندی
   ═══════════════════════════════════════════ */

.genre-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
    scrollbar-width: none;
}

    .genre-bar::-webkit-scrollbar {
        display: none;
    }

.genre-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

    .genre-chip:hover {
        border-color: var(--gold);
        background: var(--gold-soft);
        color: var(--gold);
    }

.genre-chip-clear {
    margin-bottom: 12px;
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
}

    .genre-chip-clear:hover {
        background: var(--gold);
        border-color: var(--gold);
        color: #081523;
    }

/* ═══════════════════════════════════════════
   🎭 گرید ژانرهای اصلی — همه در یک خط
   (دسکتاپ: ۶ ستون مساوی؛ موبایل: اسکرول افقی)
   ═══════════════════════════════════════════ */

.genre-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

    .genre-grid::-webkit-scrollbar {
        display: none;
    }

@media (max-width: 768px) {
    .genre-grid {
        grid-auto-columns: 104px;
    }
}

/* ═══════════════════════════════════════════
   📱 تقویت ریسپانسیو — گوشی‌های باریک
   ═══════════════════════════════════════════ */

/* تیتر ردیف + لینک «همه» در عرض کم کنار هم جا شوند */
.row-head {
    flex-wrap: wrap;
    gap: 4px 10px;
}

/* فوتر در ۳۲۰px بدون سرریز */
.footer-text {
    flex-wrap: wrap;
}

/* تیترهای بزرگ در موبایل کوچک */
@media (max-width: 480px) {
    .detail-title {
        font-size: 20px;
    }

    .page-head h1 {
        font-size: 18px;
    }

    .auth-title {
        font-size: 18px;
    }
}

/* ═══════════════════════════════════════════
   🎬 ردیف‌های دوقلو — دو پنل فیلم/سریال در خانه
   ═══════════════════════════════════════════ */

.tab-panel.active.dual-panel {
    display: block;
    padding: 14px 6px 6px;
}

/* نوار پایین پنل — دکمه «نمایش همه» پایین و سمت راست (مثل اپ) */
.dual-more {
    display: flex;
    justify-content: flex-start; /* در RTL = سمت راست */
    padding: 10px 8px 6px;
}

    .dual-more .btn-gold {
        padding: 8px 22px;
        font-size: 13px;
    }

.dual-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════
   🎭 باکس جستجوی سریع خانه — بخش‌بندی فیلم/بازیگر
   ═══════════════════════════════════════════ */

.search-section {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: bold;
    color: var(--muted);
}

.search-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════
   🖴 فایل‌های فلش — درخت + چک‌باکس del
   ═══════════════════════════════════════════ */

.flash-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.flash-userpick {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flash-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: bold;
}

.flash-select, .flash-input {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

    .flash-select:focus, .flash-input:focus {
        border-color: var(--gold);
    }

.flash-input {
    min-width: 200px;
}

.flash-btn {
    background: var(--elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

    .flash-btn:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

.flash-summary {
    font-size: 12px;
    color: var(--muted);
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
}

.flash-scan {
    margin-inline-start: auto;
}

.flash-tree-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
}

.ftree, .ftree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .ftree ul.ftree-children {
        padding-inline-start: 22px;
    }
/* تورفتگی هر سطح */

.ftree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    min-width: 0;
}

    .ftree-row:hover {
        background: var(--elevated);
    }

.ftree-caret {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 12px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
}

    .ftree-caret::after {
        content: "◀";
    }

.ftree-node.open > .ftree-row .ftree-caret::after {
    content: "▼";
}

.ftree-caret-none {
    visibility: hidden;
    cursor: default;
}

.ftree-del {
    accent-color: var(--gold);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}

.ftree-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.ftree-name {
    font-size: 13px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ftree-meta {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* آیتم‌های del=1 — چک‌شده و خط‌خورده */
.ftree-row.is-del .ftree-name {
    color: var(--muted);
    text-decoration: line-through;
}

/* جست‌وجو */
.ftree-hidden {
    display: none !important;
}

.ftree-node.ftree-hit > .ftree-row .ftree-name {
    color: var(--gold);
    font-weight: bold;
}

.flash-nohit {
    padding: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.flash-toast {
    font-size: 12px;
    color: var(--gold);
    opacity: 0;
    transition: opacity .2s;
}

    .flash-toast.show {
        opacity: 1;
    }

    .flash-toast.err {
        color: var(--error);
    }

@media (max-width: 768px) {
    .flash-input {
        min-width: 140px;
    }

    .ftree ul.ftree-children {
        padding-inline-start: 14px;
    }
}

/* 🖴 درخت فلش — مخفی شدن فرزندان پوشه‌ی بسته + نشانگر دست روی ردیف پوشه */
.ftree-node:not(.open) > .ftree-children {
    display: none;
}

.ftree-node:has(> .ftree-children) > .ftree-row {
    cursor: pointer;
}

/* ═══════════════════════════════════════════
   💽 داشبورد مشخصات فلش — چارت‌ها + کارت‌ها
   ═══════════════════════════════════════════ */
.fdash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 14px;
}

.fdash-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.fdash-title {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.fdash-donut-wrap {
    position: relative;
    height: 250px;
}

    .fdash-donut-wrap.small {
        height: 205px;
    }

.fdash-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
}

    .fdash-center b {
        font-size: 21px;
        color: var(--gold);
    }

    .fdash-center small {
        font-size: 11px;
        color: var(--muted);
    }

.fdash-zero {
    padding: 60px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.fdash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.fdash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}

    .fdash-card .k {
        font-size: 11px;
        color: var(--muted);
        margin-bottom: 4px;
    }

    .fdash-card .v {
        font-size: 14px;
        font-weight: bold;
        overflow-wrap: anywhere;
    }

.fdash-more {
    display: flex;
    justify-content: flex-start;
    padding: 12px 0 2px;
}

@media (max-width: 768px) {
    .fdash-grid {
        grid-template-columns: 1fr;
    }

    .fdash-donut-wrap {
        height: 220px;
    }

        .fdash-donut-wrap.small {
            height: 190px;
        }
}

/* 💽 هشدار ظرفیت فلش — سفارش‌ها بیشتر از فضای خالی */
.fdash-warn {
    background: rgba(224, 86, 74, 0.12);
    border: 1px solid #e0564a;
    color: #f0968d;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
}

/* 🛒 لینک مدیریت فلش در پیام وضعیت سبد */
.cart-status-link {
    color: var(--gold);
    font-weight: bold;
    text-decoration: underline;
    margin-inline-start: 6px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   🎞 ردیف پوسترها — اسکرول با چرخ ماوس + دکمه‌های جهت
   ═══════════════════════════════════════════ */
.poster-scroll {
    position: relative;
}

    .poster-scroll .poster-row {
        scroll-snap-type: x proximity;
        scrollbar-width: none; /* نوار اسکرول حذف — دکمه‌ها کارش را می‌کنند */
    }

        .poster-scroll .poster-row::-webkit-scrollbar {
            display: none;
        }

.poster-row > * {
    scroll-snap-align: start;
}

.pscroll-btn {
    position: absolute;
    top: 0;
    bottom: 6px;
    width: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    color: var(--text);
    background: rgba(20, 26, 38, 0.82);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

    .pscroll-btn:hover {
        background: rgba(35, 44, 62, 0.95);
        border-color: var(--gold);
    }

/* در RTL آیتم‌های بعدی سمت چپ‌اند */
.pscroll-next {
    left: 0;
    border-radius: 0 10px 10px 0;
}

.pscroll-prev {
    right: 0;
    border-radius: 10px 0 0 10px;
}

.pscroll-off {
    opacity: 0;
    pointer-events: none;
}

.pscroll-none .pscroll-btn {
    display: none;
}

/* لمس/موبایل: سوایپ طبیعی هست — دکمه لازم نیست */
@media (hover: none), (max-width: 639px) {
    .pscroll-btn {
        display: none;
    }
}

/* ═══════════════════════════════════════════
   🗂 دسته‌بندی‌های صفحه اصلی — کاشی + آیکون بزرگ + دو دکمه
   دسکتاپ: یک ردیف ۶تایی | موبایل: دو ردیف ۳تایی
   ═══════════════════════════════════════════ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

/* کاشی هر دسته */
.cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 8px 10px;
    transition: border-color 0.15s;
}

    .cat-tile:hover {
        border-color: var(--gold);
    }

/* آیکون — تا حداکثر عرض کاشی */
.cat-tile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}

/* دو دکمه کنار هم در یک ردیف — عنوان دسته روی خود دکمه‌هاست */
.cat-tile .cat-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: 4px;
}

    .cat-tile .cat-actions .btn-gold {
        flex: 1 1 0;
        min-width: 0;
        padding: 6px 4px;
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 8px;
    }

@media (max-width: 768px) {
    /* دو ردیف سه‌تایی */
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 8px;
    }

    /* در موبایل دکمه‌ها زیر هم می‌روند تا عنوان کامل خوانا بماند */
    .cat-tile .cat-actions {
        flex-direction: column;
    }

        /* دکمه‌های بلندتر در موبایل — لمس راحت‌تر */
        .cat-tile .cat-actions .btn-gold {
            padding: 11px 6px;
            font-size: 12px;
        }
}

/* ═══════════════════════════════════════════
   🎭 گرید ژانرها — سلول «همه ژانرها» + یک ردیف هم‌اندازه در موبایل
   (۷ سلول هم‌عرض: ۶ ژانر اصلی + نمایش همه)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .genre-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
        overflow: visible;
    }

        .genre-grid .genre-emoji {
            font-size: 18px;
        }

        .genre-grid .genre-name {
            font-size: 9.5px;
            word-break: break-word;
        }
}

/* ═══════════════════════════════════════════
   💬 پیام‌های من — لیست پیام + Badge خوانده‌نشده
   ═══════════════════════════════════════════ */
.msg-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .msg-head h1 {
        margin: 0;
    }

.msg-badge {
    background: rgba(91, 141, 214, 0.16);
    color: #9ec1f0;
    border: 1px solid rgba(91, 141, 214, 0.45);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

    .msg-badge.hide {
        display: none;
    }

.msg-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.msg-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}

    .msg-item:hover {
        border-color: var(--gold);
    }

/* نقطه‌ی پیام خوانده‌نشده */
.msg-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 7px;
    border-radius: 50%;
    background: #5b8dd6;
    display: none;
}

.msg-item.unread .msg-dot {
    display: block;
}

.msg-icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1.3;
}

.msg-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* متن پیام — تا دو خط جمع می‌شود، با کلیک کامل باز می‌شود */
.msg-text {
    font-size: 13px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
/* خوانده‌نشده: متن بُلد و روشن */
.msg-item.unread .msg-text {
    color: var(--text);
    font-weight: bold;
}

.msg-item.open .msg-text {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
}

.msg-meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .msg-list {
        padding: 8px;
        gap: 6px;
    }

    .msg-item {
        padding: 10px;
    }

    .msg-icon {
        font-size: 18px;
    }
}

/* ═══════════════════════════════════════════
   🔔 زنگ پیام‌ها — بج تعداد خوانده‌نشده + بنر پیام جدید
   ═══════════════════════════════════════════ */
.topbar-actions .icon-btn {
    position: relative;
}

.bell-badge {
    position: absolute;
    top: -5px;
    left: -7px;
    background: #e0564a;
    color: #fff;
    border: 2px solid var(--bg);
    border-radius: 999px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    padding: 3px 6px;
    min-width: 8px;
    text-align: center;
    pointer-events: none;
}

    .bell-badge.hide {
        display: none;
    }

/* بنر شناور «پیام جدید» — پایین صفحه */
.msg-notify {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(340px, calc(100vw - 36px));
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12.5px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: msgNotifyIn 0.25s ease;
}

    .msg-notify span {
        color: var(--gold);
        font-weight: bold;
        white-space: nowrap;
    }

@keyframes msgNotifyIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}