/* ============================================================
   پوچ لند — استایل اصلی سایت
   نسخه بهینه‌شده و ریسپانسیو کامل
   ============================================================ */

/* ============ 1. فونت‌ها ============ */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/uploads/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/uploads/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============ 2. متغیرهای رنگ و اندازه ============ */
:root {
    /* رنگ‌های پایه */
    --bg: #0f0f0f;
    --bg-elev: #1a1a1a;
    --bg-elev-2: #222;
    --bg-elev-3: #272727;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);

    /* متن */
    --text: #f1f1f1;
    --text-muted: #aaa;
    --text-dim: #888;
    --text-faint: #666;

    /* برند */
    --brand: #ffb347;
    --brand-dark: #ff9500;
    --brand-grad: linear-gradient(135deg, #ffb347, #ff9500);

    /* رنگ‌های وضعیت */
    --success: #10b981;
    --danger: #ff6b6b;
    --info: #3ea6ff;

    /* ابعاد */
    --header-h: 57px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* سایه */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

    /* ترنزیشن */
    --ease: 0.2s ease;
    --ease-fast: 0.15s ease;
}

/* ============ 3. ریست و پایه ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, system-ui, sans-serif;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
img { display: block; max-width: 100%; height: auto; }

/* Focus برای دسترس‌پذیری */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: #303030;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============================================================
   4. هدر
   ============================================================ */
.yt-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.yt-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.yt-menu-btn {
    color: #fff;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast);
}
.yt-menu-btn:hover { background: rgba(255,255,255,0.1); }

.yt-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    transition: opacity var(--ease-fast);
}
.yt-logo:hover { opacity: 0.85; }
.yt-logo-icon { color: #ff0000; font-size: 1.6rem; line-height: 1; }
.yt-logo-text { color: #fff; }
.yt-logo-text .wm-fa { color: var(--brand); font-weight: 700; }

/* 🔍 فرم جستجو (دسکتاپ) */
.yt-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}

.yt-search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    border: 1px solid #303030;
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: #121212;
    transition: border-color var(--ease);
}
.yt-search-form:focus-within { border-color: #065fd4; }

.yt-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}
.yt-search-input::placeholder { color: var(--text-dim); }

.yt-search-btn {
    background: var(--bg-elev-2);
    border-right: 1px solid #303030;
    color: #fff;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast);
    flex-shrink: 0;
}
.yt-search-btn:hover { background: #303030; }
.yt-search-btn svg { width: 20px; height: 20px; fill: #fff; }

.yt-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: auto;
}

/* 🔍 دکمه آیکون (ذره‌بین) — فقط در موبایل دیده می‌شه */
.yt-icon-btn {
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;              /* پیش‌فرض: مخفی */
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast);
    flex-shrink: 0;
}
.yt-icon-btn:hover { background: rgba(255,255,255,0.1); }
.yt-icon-btn svg { width: 20px; height: 20px; }

/* ============================================================
   5. چیدمان اصلی
   ============================================================ */
.yt-layout {
    display: flex;
    min-height: calc(100vh - var(--header-h));
}

.yt-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg);
    padding: 12px 0;
    height: calc(100vh - var(--header-h));
    position: sticky;
    top: var(--header-h);
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.05);
}
.yt-sidebar::-webkit-scrollbar { width: 6px; }
.yt-sidebar::-webkit-scrollbar-thumb { background: #303030; border-radius: 3px; }
.yt-sidebar::-webkit-scrollbar-thumb:hover { background: #555; }

.yt-sidebar-title {
    padding: 8px 20px;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.yt-channel-list { display: flex; flex-direction: column; }

.yt-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    transition: background var(--ease-fast);
    cursor: pointer;
    font-size: 0.85rem;
}
.yt-channel-item:hover { background: rgba(255,255,255,0.06); }
.yt-channel-item.active {
    background: rgba(255,179,71,0.12);
    color: var(--brand);
    font-weight: 700;
}

.yt-channel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #303030;
}

.yt-channel-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

.yt-channel-count {
    font-size: 0.7rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.yt-main {
    flex: 1;
    min-width: 0;
    padding: 12px 24px 24px;
}

/* ============================================================
   6. کارت اطلاعات / حمایت
   ============================================================ */
.yt-info-card {
    background: linear-gradient(135deg, #1a253f, #0f172a);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,179,71,0.2);
    box-shadow: var(--shadow-sm);
}

.yt-info-title {
    font-size: 1.1rem;
    color: var(--brand);
    margin-bottom: 10px;
    font-weight: 700;
}

.yt-info-text {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 16px;
    text-align: justify;
}
.yt-info-text strong { color: #fff; font-weight: 700; }

.yt-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.yt-donate-btn {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--ease), box-shadow var(--ease);
}
.yt-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243,156,18,0.4);
}

.yt-supporters-btn {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--ease);
    border: 1px solid var(--border-strong);
}
.yt-supporters-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.yt-info-note {
    font-size: 0.75rem;
    color: #8ba3d4;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   7. فیلترها
   ============================================================ */
.yt-filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 16px;
    margin-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.yt-filters::-webkit-scrollbar { display: none; }

.yt-filter-chip {
    background: var(--bg-elev-3);
    border: 1px solid #303030;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all var(--ease-fast);
    flex-shrink: 0;
}
.yt-filter-chip:hover { background: #3a3a3a; }
.yt-filter-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 700;
}

/* ============================================================
   8. تگ‌ها
   ============================================================ */
.yt-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 20px;
    align-items: center;
}
.yt-tags-label {
    font-size: 0.85rem;
    color: var(--brand);
    font-weight: 700;
    margin-right: 4px;
}
.yt-tag-chip {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.4);
    color: #a29bfe;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    transition: all var(--ease);
}
.yt-tag-chip:hover {
    background: rgba(108, 92, 231, 0.3);
    color: #fff;
}

/* ============================================================
   9. ردیف کانال‌های افقی
   ============================================================ */
.yt-channels-row-wrapper {
    display: block;
    margin-bottom: 12px;
}
.yt-channels-row-title {
    font-size: 0.85rem;
    color: var(--brand);
    font-weight: 700;
    margin-bottom: 8px;
    padding: 0 4px;
}

.yt-channels-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.yt-channels-row::-webkit-scrollbar { display: none; }

.yt-channel-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--ease);
    width: 72px;
}
.yt-channel-chip:hover { transform: translateY(-2px); }
.yt-channel-chip.active .yt-channel-chip-avatar {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(255,179,71,0.3);
}
.yt-channel-chip.active .yt-channel-chip-name { color: var(--brand); }

.yt-channel-chip-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-elev);
    border: 2px solid transparent;
    transition: var(--ease);
}

.yt-channel-chip-name {
    font-size: 0.7rem;
    color: #ccc;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--ease);
}

/* ============================================================
   10. گرید ویدیوها
   ============================================================ */
.yt-videos-grid,
.yt-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px 16px;
}

/* انیمیشن ورود کارت‌ها */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.yt-video-card,
.yt-music-card {
    animation: cardFadeIn 0.4s ease both;
}

/* تأخیر پلکانی برای کارت‌های اول */
.yt-video-card:nth-child(1) { animation-delay: 0.02s; }
.yt-video-card:nth-child(2) { animation-delay: 0.04s; }
.yt-video-card:nth-child(3) { animation-delay: 0.06s; }
.yt-video-card:nth-child(4) { animation-delay: 0.08s; }
.yt-video-card:nth-child(5) { animation-delay: 0.10s; }
.yt-video-card:nth-child(6) { animation-delay: 0.12s; }
.yt-video-card:nth-child(7) { animation-delay: 0.14s; }
.yt-video-card:nth-child(8) { animation-delay: 0.16s; }
.yt-video-card:nth-child(n+9) { animation-delay: 0.18s; }

.yt-video-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform var(--ease);
}
.yt-video-card:hover { transform: translateY(-2px); }

.yt-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elev);
}
.yt-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.yt-video-card:hover .yt-thumbnail img { transform: scale(1.03); }

/* بج‌ها */
.yt-badges {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    z-index: 2;
}
.yt-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.yt-badge-new { background: rgba(255,0,0,0.9); color: #fff; }
.yt-badge-hot { background: rgba(255,149,0,0.9); color: #000; }
.yt-badge-pin { background: rgba(59,130,246,0.9); color: #fff; }
.yt-badge-vip { background: linear-gradient(135deg, #ffd700, #ff9500); color: #000; }
.yt-badge-music { background: rgba(16,185,129,0.9); color: #fff; }

/* اطلاعات ویدیو */
.yt-video-info {
    display: flex;
    gap: 12px;
    padding: 12px 0 0;
}
.yt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #303030;
}
.yt-video-text { flex: 1; min-width: 0; }

.yt-video-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}

.yt-video-channel {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--ease-fast);
}
.yt-video-channel:hover { color: #fff; }

.yt-video-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* ============================================================
   11. کارت موزیک
   ============================================================ */
.yt-music-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elev);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--ease);
    border: 1px solid var(--bg-elev-3);
}
.yt-music-card:hover {
    background: var(--bg-elev-2);
    border-color: #3a3a3a;
}

.yt-music-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: var(--bg);
}
.yt-music-content { padding: 10px; }
.yt-music-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.yt-music-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.yt-music-player {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}
.yt-music-play {
    background: var(--success);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--ease);
    flex-shrink: 0;
}
.yt-music-play:hover { transform: scale(1.1); }
.yt-music-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: monospace;
    flex: 1;
}
.yt-music-download {
    font-size: 0.7rem;
    color: var(--success);
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16,185,129,0.1);
    transition: background var(--ease-fast);
}
.yt-music-download:hover { background: rgba(16,185,129,0.2); }

/* ============================================================
   12. اسکلتون
   ============================================================ */
.yt-skeleton { animation: skeleton-pulse 1.5s infinite; }
.yt-skeleton-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-elev);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.yt-skeleton-text {
    height: 12px;
    background: var(--bg-elev);
    border-radius: 4px;
    margin-bottom: 8px;
}
.yt-skeleton-text.short { width: 60%; }

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   13. حالت خالی
   ============================================================ */
.yt-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
    grid-column: 1 / -1;
}
.yt-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}
.yt-empty h3 {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 8px;
    font-weight: 700;
}

/* ============================================================
   14. سایدبار موبایل
   ============================================================ */
.yt-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.yt-mobile-overlay.active { opacity: 1; visibility: visible; }

.yt-mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 16px 0;
}
.yt-mobile-sidebar.active { transform: translateX(0); }

.yt-mobile-close {
    color: #fff;
    font-size: 1.5rem;
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast);
}
.yt-mobile-close:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   15. فوتر
   ============================================================ */
.yt-footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.8rem;
    margin-top: 40px;
}
.yt-footer a {
    color: var(--brand);
    font-weight: 700;
}
.yt-footer a:hover { text-decoration: underline; }

/* ============================================================
   16. مودال حامیان
   ============================================================ */
.yt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
    padding: 20px;
}
.yt-modal.active { opacity: 1; visibility: visible; }

.yt-modal-content {
    background: linear-gradient(145deg, #1a253f, #0b1022);
    border-radius: var(--radius-xl);
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    transform: scale(0.9);
    transition: transform var(--ease);
}
.yt-modal.active .yt-modal-content { transform: scale(1); }

.yt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.yt-modal-header h3 {
    font-size: 1.1rem;
    color: var(--brand);
    font-weight: 700;
}

.yt-modal-close {
    background: rgba(255,255,255,0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    transition: background var(--ease);
}
.yt-modal-close:hover { background: rgba(255,255,255,0.2); }

.yt-modal-progress {
    background: #2c3e66;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}
.yt-modal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    width: 0%;
    transition: width 0.5s ease;
}

.yt-modal-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}
.yt-modal-stats span { color: var(--brand); font-weight: 700; }

.yt-modal-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    padding: 8px;
}
.yt-modal-list::-webkit-scrollbar { width: 4px; }
.yt-modal-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.yt-supporter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
}
.yt-supporter-item:last-child { border-bottom: none; }
.yt-supporter-name { color: #fff; font-weight: 500; }
.yt-supporter-amount { color: var(--brand); font-weight: 700; }

.yt-modal-card-box {
    background: #0a0f1e;
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid #f39c12;
    text-align: center;
}
.yt-modal-card-number {
    font-family: monospace;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: 1px;
    margin: 8px 0;
    word-break: break-all;
}
.yt-modal-copy-btn {
    background: #f39c12;
    color: #0a0f1e;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.8rem;
    transition: transform var(--ease);
}
.yt-modal-copy-btn:hover { transform: scale(1.05); }

/* ============================================================
   17. منوی کاربر و دکمه‌های احراز هویت
   ============================================================ */
.yt-user-menu { position: relative; }

.yt-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 4px 12px 4px 4px;
    border-radius: 30px;
    transition: background var(--ease);
}
.yt-user-btn:hover { background: rgba(255,255,255,0.15); }

.yt-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.yt-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yt-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--bg-elev);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--ease);
    z-index: 200;
    overflow: hidden;
}
.yt-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.yt-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.yt-user-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.yt-user-dropdown-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.yt-user-dropdown-username {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.yt-user-dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #ddd;
    transition: background var(--ease-fast);
}
.yt-user-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.yt-user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.yt-user-dropdown-item.yt-logout { color: var(--danger); }
.yt-user-dropdown-item.yt-logout:hover { background: rgba(231,76,60,0.15); }

/* دکمه‌های ورود و ثبت‌نام */
.yt-login-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--info);
    color: var(--info);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background var(--ease);
    white-space: nowrap;
    display: inline-block;
}
.yt-login-btn:hover { background: rgba(62,166,255,0.15); }

.yt-register-btn {
    padding: 8px 16px;
    background: var(--brand-grad);
    color: var(--bg);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    transition: transform var(--ease), box-shadow var(--ease);
    white-space: nowrap;
    display: inline-block;
}
.yt-register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,179,71,0.4);
}

/* ============================================================
   18. ریسپانسیو
   ============================================================ */

/* --- تبلت بزرگ / لپ‌تاپ کوچک --- */
@media (max-width: 1200px) {
    .yt-videos-grid,
    .yt-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* --- سایدبار مخفی + ذره‌بین نمایش (تبلت) --- */
@media (max-width: 1100px) {
    .yt-sidebar { display: none; }
}

/* --- تبلت: فرم جستجو مخفی، ذره‌بین نمایش --- */
@media (max-width: 900px) {
    .yt-header-center { display: none; }
    .yt-header-right .yt-icon-btn { display: inline-flex; }

    .yt-videos-grid,
    .yt-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* --- موبایل بزرگ --- */
@media (max-width: 768px) {
    .yt-header {
        padding: 8px 10px;
        gap: 8px;
    }
    .yt-logo-text { font-size: 1.1rem; }
    .yt-main { padding: 8px 12px 20px; }

    .yt-info-card { padding: 14px; }
    .yt-info-title { font-size: 1rem; }
    .yt-info-text { font-size: 0.78rem; }
    .yt-donate-btn,
    .yt-supporters-btn {
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .yt-modal-content { padding: 16px; }

    .yt-channels-row { padding: 4px 0 12px; }
    .yt-channel-chip-avatar { width: 50px; height: 50px; }
    .yt-channel-chip-name { font-size: 0.65rem; }

    /* گرید 2 ستونی */
    .yt-videos-grid,
    .yt-skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 8px;
    }

    /* اطلاعات ویدیو فشرده */
    .yt-video-info { padding: 8px 0 0; gap: 8px; }
    .yt-avatar { width: 24px; height: 24px; }
    .yt-video-title { font-size: 0.82rem; line-height: 1.4; margin-bottom: 3px; }
    .yt-video-channel { font-size: 0.72rem; }
    .yt-video-meta { font-size: 0.68rem; gap: 3px; }
    .yt-badge { font-size: 0.55rem; padding: 2px 5px; }
    .yt-thumbnail { border-radius: var(--radius-sm); }

    /* منوی کاربر فشرده */
    .yt-user-name { display: none; }
    .yt-user-btn { padding: 4px; }
    .yt-login-btn,
    .yt-register-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* --- موبایل کوچک --- */
@media (max-width: 480px) {
    .yt-header {
        padding: 8px 8px;
        gap: 6px;
    }
    .yt-header-right { gap: 6px; }
    .yt-logo-text { font-size: 1rem; }

    .yt-info-actions { flex-direction: column; }
    .yt-donate-btn,
    .yt-supporters-btn {
        width: 100%;
        justify-content: center;
    }

    .yt-login-btn,
    .yt-register-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

/* --- موبایل خیلی کوچک --- */
@media (max-width: 380px) {
    .yt-videos-grid,
    .yt-skeleton-grid {
        grid-template-columns: 1fr;
    }
    .yt-channel-chip-avatar { width: 44px; height: 44px; }
    .yt-channel-chip { width: 56px; }
    .yt-logo-text { font-size: 0.95rem; }
    .yt-login-btn,
    .yt-register-btn {
        padding: 5px 8px;
        font-size: 0.65rem;
    }
}

/* --- موبایل خیلی خیلی کوچک --- */
@media (max-width: 360px) {
    .yt-videos-grid,
    .yt-skeleton-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   19. دسترس‌پذیری — کاهش انیمیشن
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   20. چاپ — استایل ساده
   ============================================================ */
@media print {
    .yt-header,
    .yt-sidebar,
    .yt-footer,
    .yt-mobile-sidebar,
    .yt-mobile-overlay,
    .yt-modal,
    #backToTopBtn {
        display: none !important;
    }
    body { background: #fff; color: #000; }
    .yt-main { padding: 0; }
}