/* ========== فونت و تنظیمات پایه ========== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://www.pochland.ir/uploads/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://www.pochland.ir/uploads/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0f1c;
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    color: #eef2ff;
    line-height: 1.5;
    padding: 0.8rem;
    min-height: 100vh;
}

/* ========== لایه‌بندی سایدبار ثابت در دسکتاپ ========== */
.app-wrapper {
    display: flex;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - 1.6rem);
}

.channels-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(13, 18, 30, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    border: 1px solid rgba(70, 100, 170, 0.3);
    padding: 1rem 0.5rem;
    height: calc(100vh - 1.6rem);
    position: sticky;
    top: 0.8rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 0 0.8rem 0.8rem 0.8rem;
    border-bottom: 1px solid #2a3450;
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 0.9rem;
    color: #ffb347;
    display: flex;
    align-items: center;
    gap: 8px;
}

.channels-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 0.5rem;
}

.channels-list::-webkit-scrollbar {
    width: 4px;
}

.channels-list::-webkit-scrollbar-track {
    background: #1f2a3e;
    border-radius: 4px;
}

.channels-list::-webkit-scrollbar-thumb {
    background: #ffb347;
    border-radius: 4px;
}

.channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ccd6f0;
    font-size: 0.85rem;
}

.channel-item:hover {
    background: rgba(255, 180, 71, 0.15);
    color: #ffb347;
}

.channel-item.active {
    background: rgba(255, 180, 71, 0.25);
    color: #ffb347;
    border-right: 3px solid #ffb347;
}

.channel-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.channel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e2a4a;
}

.channel-count {
    background: #1e2a4a;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #9aabdf;
}

.channel-item.active .channel-count {
    background: rgba(255, 180, 71, 0.3);
    color: #ffb347;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: #ffb347;
    color: #0a0f1c;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: none;
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    background: #ffcc66;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #0a0f1c;
    border-left: 1px solid #ffb34733;
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.mobile-sidebar.open {
    right: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999;
    display: none;
}

.mobile-sidebar-overlay.open {
    display: block;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: #ffb347;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
    text-align: left;
    display: block;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.site-header {
    text-align: center;
    margin: 0.8rem 0 1.5rem 0;
}
.site-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #9ac4ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.site-title small {
    font-size: 0.9rem;
    background: none;
    color: #8d9aeb;
    font-weight: 400;
}
.developer {
    text-align: center;
    font-size: 0.8rem;
    color: #7b8bae;
    margin-top: 0.2rem;
}
.developer a {
    color: #9bb5ff;
    text-decoration: none;
}
.developer a:hover {
    color: #ffffff;
}

.info-card {
    background: rgba(18, 25, 45, 0.85);
    border-radius: 24px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(70, 100, 170, 0.4);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.info-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: justify;
    color: #eef3ff;
}
.info-card strong {
    color: #ffdb7e;
}
.support-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1rem;
}
.support-badge {
    background: #1e2a4a;
    border-radius: 40px;
    padding: 0.25rem 1rem;
    font-size: 0.7rem;
    color: #b9cbff;
}
.donate-link {
    background: rgba(218, 165, 32, 0.15);
    border: 1px solid #d4a52c;
    color: #ffdf8c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.donate-link:hover {
    background: rgba(218, 165, 32, 0.3);
    border-color: #f5b642;
    color: #fff2cc;
    transform: scale(1.02);
}
.supporters-btn {
    background: rgba(100, 140, 210, 0.2);
    border: 1px solid #5a7bc4;
    color: #bbd4ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.supporters-btn:hover {
    background: rgba(100, 140, 210, 0.35);
    border-color: #8aabff;
    color: #ffffff;
    transform: scale(1.02);
}
.small-note {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.chat-alert {
    margin: 0 0 1.5rem 0;
    background: linear-gradient(120deg, rgba(218, 165, 32, 0.12), rgba(100, 140, 210, 0.12));
    border-radius: 28px;
    border-right: 4px solid #ffb347;
    backdrop-filter: blur(4px);
    position: relative;
}
.chat-alert-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    justify-content: space-between;
}
.chat-alert-icon {
    font-size: 2rem;
    background: #ffb34722;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 60px;
    flex-shrink: 0;
}
.chat-alert-text {
    flex: 2;
    min-width: 180px;
}
.chat-alert-text strong {
    display: block;
    font-size: 1rem;
    color: #ffdb8e;
}
.chat-alert-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}
.chat-alert-btn {
    background: #ffb347;
    color: #0a0f1c;
    text-decoration: none;
    padding: 0.55rem 1.3rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.chat-alert-btn:hover {
    background: #ffcc66;
    transform: scale(1.02);
}
.chat-alert-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ccd6f0;
    font-size: 1.2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-alert-close:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: rotate(90deg);
}
.beta-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
}

/* ========== تب‌های دسته‌بندی ========== */
.category-tabs {
    display: flex;
    gap: 12px;
    margin: 0 0 1.5rem 0;
    background: rgba(18, 25, 45, 0.6);
    padding: 0.5rem;
    border-radius: 60px;
    width: fit-content;
    flex-wrap: wrap;
}
.tab-cat-btn {
    background: none;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #ccd6f0;
    font-size: 0.85rem;
}
.tab-cat-btn.active {
    background: #ffb347 !important;
    color: #0a0f1c !important;
    box-shadow: 0 2px 8px rgba(255, 180, 71, 0.4);
}
.tab-cat-btn:hover:not(.active) {
    background: rgba(255, 180, 71, 0.2);
    color: #ffb347;
}

/* ========== جستجوی هوشمند ========== */
.search-box {
    margin: 0 0 1.5rem 0;
    position: relative;
}
.search-input {
    width: 100%;
    background: rgba(18, 25, 45, 0.9);
    border: 1px solid #2d3a5a;
    border-radius: 60px;
    padding: 0.8rem 1.2rem;
    color: #eef2ff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: #ffb347;
    background: rgba(18, 25, 45, 1);
    box-shadow: 0 0 0 2px rgba(255, 180, 71, 0.2);
}
.search-input::placeholder {
    color: #6f7da0;
    font-size: 0.8rem;
}
.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffb347;
    font-size: 1.1rem;
    pointer-events: none;
}
.search-results-count {
    position: absolute;
    left: 20px;
    bottom: -28px;
    font-size: 0.7rem;
    color: #34d399;
    direction: ltr;
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(0,0,0,0.6);
    padding: 2px 10px;
    border-radius: 20px;
    pointer-events: none;
}
.search-results-count.show {
    opacity: 1;
}
.highlight {
    background: rgba(255, 180, 71, 0.35);
    color: #ffb347;
    border-radius: 6px;
    padding: 0 3px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #8d9aeb;
    background: rgba(18, 25, 45, 0.5);
    border-radius: 28px;
    margin: 1rem 0;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffb347;
    color: #0a0f1c;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #ffcc66;
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: #0f1622;
    border-radius: 28px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
    border: 1px solid #2d3a5a;
    box-shadow: 0 20px 35px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2a3450;
}
.modal-header h3 {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #ffd966, #ffb347);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.close-modal {
    background: none;
    border: none;
    color: #9aabdf;
    font-size: 1.8rem;
    cursor: pointer;
}
.close-modal:hover {
    color: #ffb347;
}
.modal-progress {
    background: #1a1f2e;
    border-radius: 30px;
    margin: 1rem 0;
    height: 20px;
    overflow: hidden;
}
.modal-progress-bar {
    background: linear-gradient(90deg, #ffb347, #ffcc33);
    width: 0%;
    height: 100%;
    transition: width 0.3s;
}
.modal-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.8rem 0;
    font-size: 0.75rem;
}
.modal-stats span {
    color: #ffd966;
    font-weight: bold;
}
.supporters-list-modal {
    margin: 1rem 0;
    max-height: 250px;
    overflow-y: auto;
}
.supporter-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #1f2a3e;
    font-size: 0.85rem;
}
.supporter-name-modal {
    font-weight: 600;
    color: #eef3ff;
}
.supporter-amount-modal {
    color: #ffd966;
    direction: ltr;
}
.modal-card {
    background: #0a0e18;
    border-radius: 20px;
    padding: 0.8rem;
    margin-top: 1rem;
    text-align: center;
    border: 1px dashed #ffb347;
}
.modal-card-number {
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: 2px;
    direction: ltr;
    color: #ffd966;
}
.copy-modal-btn {
    background: #ffb34722;
    border: 1px solid #ffb347;
    color: #ffd966;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-size: 0.65rem;
    cursor: pointer;
    margin-right: 8px;
}

/* ========== برچسب‌ها ========== */
.badges-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 15;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 40px;
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    white-space: nowrap;
}
.badge-new {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: white;
    box-shadow: 0 2px 8px rgba(230,57,70,0.4);
}
.badge-hot {
    background: linear-gradient(135deg, #ff8c00, #ffb347);
    color: #0a0f1c;
    box-shadow: 0 2px 8px rgba(255,140,0,0.4);
}
.badge-pin {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    box-shadow: 0 2px 8px rgba(139,92,246,0.4);
}
.badge-vip {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0a0f1c;
    box-shadow: 0 2px 8px rgba(251,191,36,0.4);
}
.badge-music {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #0a0f1c;
    box-shadow: 0 2px 8px rgba(16,185,129,0.4);
}

/* ========== گرید ویدیوها ========== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.8rem 0;
}
.video-card {
    background: #11161f;
    border-radius: 22px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #232a37;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(255, 180, 70, 0.3);
    border-color: rgba(255, 180, 71, 0.5);
}

/* ========== اصلاح شده: نمایش صحیح thumbnail در موبایل و دسکتاپ ========== */
.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0e16;
    overflow: hidden;
}
.thumbnail-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 5;
    transition: background 0.35s ease;
}
.thumbnail-wrapper::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.75);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb347;
    font-size: 1.6rem;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    backdrop-filter: blur(4px);
    z-index: 10;
    font-family: monospace;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}
.video-card:hover .thumbnail-wrapper::before {
    background: rgba(0, 0, 0, 0);
}
.video-card:hover .thumbnail-wrapper::after {
    transform: translate(-50%, -50%) scale(1);
}
.thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: block;
}
.video-card:hover .thumbnail-img {
    transform: scale(1.06);
}
.card-content {
    padding: 1rem 0.9rem 1.2rem 0.9rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.4rem;
}
.channel-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e2a4a;
}
.channel-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #7f91c2;
}
.video-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1rem;
    color: #f0f4ff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    padding-bottom: 0.6rem;
}
.video-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 2px;
    background: linear-gradient(90deg, #ffb347, #ffcc33);
    border-radius: 2px;
    transition: width 0.35s ease;
}
.video-card:hover .video-title::after {
    width: 65px;
}
.watch-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e3a8a;
    color: white;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    width: fit-content;
    gap: 6px;
}
.watch-link:hover {
    background: #2d4db3;
    transform: scale(1.02);
    gap: 8px;
}

/* ========== استایل کارت موزیک (اصلاح شده برای موبایل) ========== */
.music-card {
    background: linear-gradient(135deg, #0d2818, #0a1a12);
    border-radius: 22px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.music-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.8);
}
.music-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a1a12;
    overflow: hidden;
}
.music-thumbnail-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.2);
    z-index: 5;
    transition: background 0.35s;
}
.music-thumbnail-wrapper::after {
    content: "🎵";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(16, 185, 129, 0.9);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0f1c;
    font-size: 1.8rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
    z-index: 10;
}
.music-card:hover .music-thumbnail-wrapper::before {
    background: rgba(16, 185, 129, 0.05);
}
.music-card:hover .music-thumbnail-wrapper::after {
    transform: translate(-50%, -50%) scale(1);
}
.music-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s;
}
.music-card:hover .music-thumbnail-img {
    transform: scale(1.06);
}
.music-content {
    padding: 1rem 0.9rem 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.music-artist {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.4rem;
}
.music-icon {
    font-size: 1rem;
}
.music-artist-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #34d399;
    letter-spacing: 0.5px;
}
.music-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0.8rem;
    color: #eef2ff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    padding-bottom: 0.6rem;
}
.music-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
}
.music-player {
    margin-top: 0.8rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 40px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.play-pause-btn {
    background: #10b981;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0a0f1c;
    font-size: 0.8rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.play-pause-btn:hover {
    background: #34d399;
    transform: scale(1.05);
}
.music-time {
    font-size: 0.7rem;
    color: #9aabdf;
    direction: ltr;
    font-family: monospace;
}
.music-download {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    margin-right: auto;
}
.music-download:hover {
    background: #10b981;
    color: #0a0f1c;
}
audio {
    display: none;
}

.footer-note {
    text-align: center;
    margin-top: 2.5rem;
    padding: 1rem;
    border-top: 1px solid #1f2a3e;
    font-size: 0.7rem;
    color: #6f7da0;
}
img {
    content-visibility: auto;
}

/* ========== موبایل ========== */
@media (max-width: 768px) {
    .app-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    .channels-sidebar {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .main-content {
        width: 100%;
    }
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
    .video-card, .music-card {
        border-radius: 16px;
    }
    
    /* اصلاح مهم برای موبایل: تثبیت نسبت ابعاد thumbnail */
    .thumbnail-wrapper,
    .music-thumbnail-wrapper {
        aspect-ratio: 16 / 9;
        min-height: auto;
    }
    .thumbnail-img,
    .music-thumbnail-img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }
    
    .thumbnail-wrapper::after, 
    .music-thumbnail-wrapper::after {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .card-content, .music-content {
        padding: 0.6rem 0.5rem 0.8rem 0.5rem;
    }
    .video-title, .music-title {
        font-size: 0.7rem;
        padding-bottom: 0.4rem;
    }
    .video-title::after, .music-title::after {
        width: 25px;
        height: 1.5px;
    }
    .watch-link, .music-download {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
    }
    .badges-container {
        top: 5px;
        right: 5px;
        gap: 4px;
    }
    .badge {
        font-size: 0.5rem;
        padding: 2px 6px;
    }
    .site-title {
        font-size: 1.8rem;
    }
    .site-title small {
        font-size: 0.7rem;
    }
    .info-card {
        padding: 0.8rem 1rem;
    }
    .chat-alert-content {
        padding: 0.7rem 1rem;
    }
    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    .channel-info, .music-artist {
        gap: 6px;
    }
    .channel-avatar-small {
        width: 20px;
        height: 20px;
    }
    .channel-name, .music-artist-name {
        font-size: 0.55rem;
    }
    .category-tabs {
        gap: 6px;
        padding: 0.3rem;
    }
    .tab-cat-btn {
        padding: 0.3rem 1rem;
        font-size: 0.7rem;
    }
    .play-pause-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .music-time {
        font-size: 0.6rem;
    }
    .search-results-count {
        font-size: 0.6rem;
        bottom: -24px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        gap: 0.5rem;
    }
    .video-title, .music-title {
        font-size: 0.65rem;
    }
    /* برای موبایل‌های خیلی کوچک */
    .thumbnail-wrapper,
    .music-thumbnail-wrapper {
        aspect-ratio: 4 / 3;
    }
}

.thanks-btn {
    background: rgba(52, 211, 153, 0.15);
    border-color: #34d399;
    color: #34d399;
}
.thanks-btn:hover {
    background: rgba(52, 211, 153, 0.3);
    border-color: #34d399;
    color: #ffffff;
}
.update-banner {
    background: linear-gradient(105deg, #0f0f1a 0%, #1a1a2e 100%);
    border-radius: 60px;
    padding: 12px 20px 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    margin: 15px 0;
}
.update-banner:hover {
    border-color: rgba(243, 156, 18, 0.6);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.1);
}
.banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 2;
}
.banner-icon {
    background: rgba(243, 156, 18, 0.15);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}
.banner-info {
    flex: 1;
}
.banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.live-badge {
    font-size: 10px;
    background: rgba(243, 156, 18, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    color: #f39c12;
    letter-spacing: 0.5px;
}
.banner-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
}
.banner-desc {
    color: #aaa;
    font-size: 12px;
}
.banner-desc strong {
    color: #f39c12;
    font-weight: 500;
}
.banner-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.progress-chip {
    background: rgba(255,255,255,0.05);
    border-radius: 40px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.progress-text {
    font-size: 11px;
    color: #888;
}
.progress-percent {
    font-size: 13px;
    font-weight: bold;
    color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
}
.banner-close {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #888;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.banner-close:hover {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}
@media (max-width: 600px) {
    .update-banner {
        border-radius: 20px;
        flex-direction: column;
        align-items: stretch;
    }
    .banner-right {
        justify-content: space-between;
    }
    .banner-icon {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
}

/* ========================================
   SKELETON LOADING & LAZY LOADING EFFECTS
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #1e293b 0%, #334155 30%, #1e293b 60%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.thumbnail-img,
.music-thumbnail-img {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    transition: opacity 0.3s ease-in-out;
}
.thumbnail-img.loaded,
.music-thumbnail-img.loaded {
    animation: none;
    background: none;
    opacity: 0;
    animation: fadeIn 0.4s ease-in-out forwards;
}
@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}
.video-card.skeleton-card,
.music-card.skeleton-card {
    position: relative;
    overflow: hidden;
}
.video-card.skeleton-card::before,
.music-card.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
    animation: shimmer-overlay 1.5s infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes shimmer-overlay {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.thumbnail-img,
.music-thumbnail-img {
    will-change: opacity;
    image-rendering: auto;
}
@media (max-width: 768px) {
    .thumbnail-img,
    .music-thumbnail-img {
        background: #0f172a;
        animation: none;
    }
    .thumbnail-img.loaded,
    .music-thumbnail-img.loaded {
        animation: fadeIn 0.3s ease-out forwards;
    }
}
.thumbnail-wrapper,
.music-thumbnail-wrapper {
    position: relative;
    background: #0f172a;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.text-skeleton {
    height: 16px;
    background: linear-gradient(90deg, #1e293b 0%, #334155 30%, #1e293b 60%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
    margin: 8px 0;
}
.text-skeleton.title {
    height: 20px;
    width: 80%;
}
.text-skeleton.channel {
    height: 14px;
    width: 60%;
}
/* ========== اسکلتون لودینگ برای فرمت جدید ========== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    background: #11161f;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #232a37;
}

.skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(90deg, #1e293b 0%, #334155 30%, #1e293b 60%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-content {
    padding: 1rem;
}

.skeleton-channel {
    height: 14px;
    width: 40%;
    background: linear-gradient(90deg, #1e293b 0%, #334155 30%, #1e293b 60%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.skeleton-title {
    height: 18px;
    width: 80%;
    background: linear-gradient(90deg, #1e293b 0%, #334155 30%, #1e293b 60%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
}