﻿
/* ============ هدر ============ */
.page-header {
    max-width: 1300px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.9rem;
    position: relative;
    margin-bottom: 0.85rem;
    letter-spacing: -0.5px;
}

    .page-title i {
        color: var(--gold);
        font-size: 2.1rem;
        filter: drop-shadow(0 6px 14px var(--gold-glow));
        animation: pulse 3s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.page-title span {
    background: linear-gradient(135deg, var(--ink) 20%, var(--gold) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--ink), var(--gold), transparent);
    border-radius: 4px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--ink-soft);
    font-weight: 500;
    max-width: 680px;
    margin: 0 auto;
}

/* ============ ابزار ============ */
.toolbar {
    max-width: 1300px;
    margin: 0 auto 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.stat-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    border: 1.5px solid var(--gold);
    border-radius: 60px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(212, 175, 55, 0.1);
}

    .stat-box i {
        color: var(--gold);
        font-size: 1.35rem;
        filter: drop-shadow(0 0 8px var(--gold-glow));
    }

.stat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

    .stat-text small {
        color: rgba(212, 175, 55, 0.75);
        font-size: 0.72rem;
        font-weight: 600;
    }

    .stat-text strong {
        color: var(--gold);
        font-size: 1.15rem;
        font-weight: 800;
    }

.search-box {
    position: relative;
    flex: 1 1 320px;
    max-width: 460px;
}

    .search-box i {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gold);
        font-size: 1.05rem;
        pointer-events: none;
    }

    .search-box input {
        width: 100%;
        padding: 0.9rem 3.2rem 0.9rem 1.2rem;
        font-family: inherit;
        font-size: 0.95rem;
        color: var(--ink);
        background: var(--white);
        border: 2px solid var(--ink);
        border-radius: 60px;
        outline: none;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-sm);
    }

        .search-box input::placeholder {
            color: var(--ink-muted);
        }

        .search-box input:focus {
            border-color: var(--gold);
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18), var(--shadow-md);
        }

/* ============ گرید ویدئوها ============ */
.videos-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* ============ کارت ویدئو ============ */
.video-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cardIn 0.55s cubic-bezier(0.2, 0.9, 0.4, 1) backwards;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
    z-index: 5;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

/* تصویر پیش‌نمایش */
.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

    .video-thumbnail::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.65) 100%);
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .video-thumbnail video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
        transition: transform 0.6s ease;
    }

.video-card:hover .video-thumbnail video {
    transform: scale(1.06);
}

/* دکمه Play */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 2px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    z-index: 2;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(212, 175, 55, 0.15);
    pointer-events: none;
}

    .play-button i {
        margin-right: -3px; /* برای مرکز شدن بهتر مثلث */
        filter: drop-shadow(0 0 8px var(--gold-glow));
    }

.video-card:hover .play-button {
    background: var(--gold);
    color: var(--ink);
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5), 0 0 0 12px rgba(212, 175, 55, 0.2);
}

/* نشان‌های بالای تصویر */
.thumbnail-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    z-index: 3;
    pointer-events: none;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(6px);
}

    .duration-badge i {
        font-size: 0.8rem;
    }

/* آیکون پلی‌لیست */
.video-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .video-type-badge i {
        font-size: 0.8rem;
    }

/* بدنه کارت */
.video-body {
    padding: 1.35rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.video-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.87rem;
    color: var(--ink-soft);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1.5px dashed rgba(212, 175, 55, 0.35);
    margin-top: auto;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--gold-soft);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

    .meta-item i {
        color: var(--gold-dark);
        font-size: 0.82rem;
    }

/* فوتر کارت */
.video-footer {
    padding: 0 1.4rem 1.4rem;
    display: flex;
    gap: 0.6rem;
}

.btn-watch {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--gold);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 40px;
    border: 1.5px solid var(--gold);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .btn-watch:hover {
        background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
        color: var(--ink);
        border-color: var(--ink);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(212, 175, 55, 0.45);
    }

    .btn-watch i {
        font-size: 0.95rem;
    }

/* ============ مودال تمام صفحه ویدئو ============ */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(12px);
    padding: 1.5rem;
}

    .video-modal.open {
        opacity: 1;
        visibility: visible;
    }

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: #000;
    border-radius: var(--radius);
    border: 2px solid var(--gold);
    box-shadow: 0 0 80px rgba(212, 175, 55, 0.35), 0 30px 80px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.video-modal.open .video-modal-content {
    transform: scale(1);
}

.video-modal video {
    width: 100%;
    display: block;
    max-height: 75vh;
    background: #000;
}

.video-modal-info {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    border-top: 1.5px solid var(--gold);
}

.video-modal-title {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .video-modal-title i {
        font-size: 1.2rem;
    }

.video-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
}

    .video-modal-meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .video-modal-meta i {
        color: var(--gold);
        font-size: 0.9rem;
    }

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

    .video-modal-close:hover {
        background: var(--gold);
        color: var(--ink);
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.8);
    }

/* ============ حالت خالی ============ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    border: 1.5px dashed rgba(212, 175, 55, 0.5);
}

    .empty-state i {
        font-size: 4.5rem;
        color: var(--gold);
        display: block;
        margin-bottom: 1rem;
        opacity: 0.6;
    }

    .empty-state h3 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--ink);
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: var(--ink-muted);
        font-size: 0.95rem;
    }

/* ============ رسپانسیو ============ */
@media (max-width: 900px) {
    .page-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.75rem 1rem 3rem;
    }

    .page-title {
        font-size: 1.6rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

        .page-title i {
            font-size: 1.4rem;
        }

    .toolbar {
        gap: 0.75rem;
    }

    .stat-box {
        padding: 0.7rem 1.1rem;
        width: 100%;
        justify-content: center;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .video-modal {
        padding: 0.5rem;
    }

    .video-modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .video-modal-info {
        padding: 1rem;
    }
}

@media (max-width: 400px) {
    .video-thumbnail {
        aspect-ratio: 4 / 3;
    }

    .play-button {
        width: 54px;
        height: 54px;
        font-size: 1.35rem;
    }
}

