/* ==================== تنظیمات کلی ==================== */
:root {
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== استایل‌های عمومی ==================== */
.container {
    padding: 20px;
}

.video-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.video-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.video-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
}

.video-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.video-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==================== فیلترها و جستجو ==================== */
.video-filters {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-row select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--dark-color);
    font-size: 0.95rem;
    min-width: 160px;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.filter-row select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.filter-row select:hover {
    border-color: var(--primary-light);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-box input::placeholder {
    color: var(--gray-color);
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 1rem;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.search-box button i {
    font-size: 1.1rem;
}

/* ==================== کارت ویدیو ==================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--dark-color);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.video-overlay i {
    font-size: 3rem;
    color: white;
    background: rgba(139, 92, 246, 0.9);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform: scale(0.8);
    transition: var(--transition);
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.video-card:hover .video-overlay i {
    transform: scale(1);
}

.video-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex-grow: 1;
}

.video-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.video-title a:hover {
    color: var(--primary-color);
}

.video-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray-color);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition);
}

.meta-item:hover {
    color: var(--primary-color);
}

.meta-item i {
    font-size: 0.9rem;
}

.video-category {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.video-category a {
    display: inline-flex;
    align-items: center;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    gap: 0.375rem;
}

.video-category a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.video-category a::before {
    content: '🏷️';
    font-size: 0.9rem;
}

.video-difficulty {
    margin-top: auto;
}

.video-difficulty .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.beginner {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.intermediate {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge.advanced {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge.expert {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== پیغام خالی ==================== */
.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius);
    border: 2px dashed var(--border-color);
}

.no-videos i {
    font-size: 4rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-videos h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.no-videos p {
    color: var(--gray-color);
    max-width: 400px;
    margin: 0 auto;
}

/* ==================== صفحه‌بندی ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.page-link:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.prev,
.page-link.next {
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
}

.page-link.prev i,
.page-link.next i {
    font-size: 0.9rem;
    transition: var(--transition);
}

.page-link.prev:hover i {
    transform: translateX(-2px);
}

.page-link.next:hover i {
    transform: translateX(2px);
}

/* ==================== صفحه جزئیات ویدیو ==================== */
.video-player-section {
    margin-bottom: 2rem;
    background: var(--dark-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-player-container {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: black;
}

.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.video-header {
    background: white;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.video-header h1 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.95rem;
    transition: var(--transition);
}

.stat-item:hover {
    color: var(--primary-color);
}

.stat-item i {
    font-size: 1.1rem;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    margin-left: auto;
}

.like-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--danger-color);
}

.like-btn.liked {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--danger-color);
}

.like-btn i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.like-btn.liked i {
    animation: heartBeat 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* ==================== طرح‌بندی محتوا ==================== */
.video-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .video-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ==================== محتوای اصلی ==================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.description-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.description-section h2 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.description-section h2 i {
    color: var(--primary-color);
}

.description-text {
    color: var(--dark-color);
    line-height: 1.8;
    font-size: 1rem;
}

.description-text p {
    margin-bottom: 1rem;
}

.short-description {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
    color: var(--dark-color);
    font-style: italic;
}

/* ==================== بخش نظرات ==================== */
.comments-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.comments-header h2 {
    font-size: 1.25rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comments-header h2 i {
    color: var(--primary-color);
}

.count {
    color: var(--gray-color);
    font-weight: normal;
    font-size: 0.95rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    min-height: 120px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.comment-form textarea::placeholder {
    color: var(--gray-color);
}

.form-actions {
    margin-top: 1rem;
    text-align: left;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
}

.login-prompt p {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ==================== لیست نظرات ==================== */
.comments-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-color);
}

/* ==================== سایدبار ==================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-info-card,
.actions-card,
.related-videos {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.video-info-card h3,
.actions-card h3,
.related-videos h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-info-card h3 i,
.actions-card h3 i,
.related-videos h3 i {
    color: var(--primary-color);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list strong {
    color: var(--dark-color);
    min-width: 80px;
    font-weight: 600;
}

.info-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.info-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--gray-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* ==================== دکمه‌های اقدامات ==================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-download,
.btn-share,
.btn-report {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    width: 100%;
}

.btn-download {
    background: var(--secondary-color);
    color: white;
}

.btn-download:hover {
    background: #0ea271;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-share {
    background: var(--info-color);
    color: white;
}

.btn-share:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-report {
    background: var(--light-color);
    color: var(--danger-color);
    border: 2px solid var(--border-color);
}

.btn-report:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-2px);
}

/* ==================== ویدیوهای مرتبط ==================== */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.related-thumb {
    position: relative;
    width: 80px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--dark-color);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-thumb .duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h4 {
    font-size: 0.9rem;
    color: var(--dark-color);
    margin-bottom: 0.375rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-info .meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.related-info .meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== صفحه‌های دیگر ==================== */
/* صفحه جستجوی پیشرفته */
.search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.search-container {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-results {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.results-header h2 {
    font-size: 1.25rem;
    color: var(--dark-color);
}

.results-count {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* صفحه پلی‌لیست */
.playlist-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.playlist-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.playlist-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.playlist-meta {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.playlist-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.playlist-meta .meta-item i {
    font-size: 1.1rem;
}

.playlist-videos {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.playlist-video-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--light-color);
    margin-bottom: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.playlist-video-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(8px);
}

.playlist-video-item:last-child {
    margin-bottom: 0;
}

.playlist-video-thumb {
    position: relative;
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--dark-color);
}

.playlist-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-video-thumb .duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.playlist-video-info {
    flex: 1;
    min-width: 0;
}

.playlist-video-info h3 {
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.playlist-video-info h3 a {
    color: inherit;
    text-decoration: none;
}

.playlist-video-info h3 a:hover {
    color: var(--primary-color);
}

.playlist-video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* صفحه کاربری */
.user-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.user-info h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.user-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.user-stat .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.user-stat .label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* آداپتیو برای موبایل */
@media (max-width: 768px) {
    .video-header h1 {
        font-size: 2rem;
    }

    .video-header p {
        font-size: 1rem;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row {
        flex-direction: column;
        width: 100%;
    }

    .filter-row select {
        width: 100%;
        min-width: auto;
    }

    .search-box {
        max-width: 100%;
        min-width: auto;
    }

    .video-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .like-btn {
        margin-left: 0;
    }

    .user-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .user-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .playlist-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .playlist-video-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .playlist-video-thumb {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 16/9;
    }

    .playlist-video-meta {
        justify-content: center;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card,
.video-player-section,
.description-section,
.comments-section,
.sidebar>div {
    animation: fadeIn 0.6s ease-out;
}

/* استایل برای حالت تاریک (اختیاری) */
@media (prefers-color-scheme: dark) {

    .video-container,
    .video-filters,
    .video-card,
    .video-info-card,
    .actions-card,
    .related-videos,
    .description-section,
    .comments-section,
    .login-prompt,
    .user-header,
    .playlist-videos {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }

    .video-title,
    .video-title a,
    .video-info-card h3,
    .actions-card h3,
    .related-videos h3,
    .comments-header h2,
    .description-section h2,
    .user-info h1,
    .results-header h2 {
        color: #f9fafb;
    }

    .video-meta,
    .stat-item,
    .info-list strong,
    .count,
    .login-prompt p {
        color: #d1d5db;
    }

    .description-text,
    .short-description {
        color: #e5e7eb;
    }

    .filter-row select,
    .search-box input,
    .comment-form textarea,
    .filter-group input,
    .filter-group select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .search-box button {
        background: var(--primary-color);
    }

    .related-item,
    .playlist-video-item {
        background: #374151;
    }

    .related-item:hover,
    .playlist-video-item:hover {
        background: #4b5563;
        border-color: var(--primary-color);
    }
}


/* استایل‌های جستجو */
.video-search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-main-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-container {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: #667eea;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
    color: #333;
    width: 100%;
}

.search-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.voice-search-btn,
.clear-search-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    border-radius: 50%;
}

.voice-search-btn:hover,
.clear-search-btn:hover {
    color: #667eea;
    background: #f0f0f0;
}

.search-submit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* فیلترها */
.search-filters-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filters-header {
    margin-bottom: 1rem;
}

.filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.filters-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filters-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s;
    overflow: hidden;
}

.filters-content.active {
    grid-template-rows: 1fr;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 0;
}

.filter-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    background: white;
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.reset-filters-btn,
.apply-filters-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.apply-filters-btn {
    background: #10b981;
    color: white;
}

.reset-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.apply-filters-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* پیشنهادات جستجو */
.search-suggestions {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.toggle-suggestions {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.toggle-suggestions.rotated {
    transform: rotate(180deg);
}

.suggestions-content {
    padding: 1rem;
}

.trending-searches,
.recent-searches,
.category-suggestions {
    margin-bottom: 1.5rem;
}

.trending-searches h5,
.recent-searches h5,
.category-suggestions h5 {
    margin-bottom: 0.75rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trending-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.trending-tag:hover {
    background: #c7d2fe;
    transform: translateY(-2px);
}

.tag-count {
    background: #4f46e5;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.recent-list {
    max-height: 150px;
    overflow-y: auto;
}

.recent-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.recent-search-item:hover {
    background: #f8fafc;
}

.recent-search-item a {
    flex: 1;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
}

.remove-recent {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.remove-recent:hover {
    color: #ef4444;
    background: #fee2e2;
}

.clear-recent-btn {
    width: 100%;
    padding: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.clear-recent-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.category-suggestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s;
}

.category-suggestion:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.category-icon {
    color: #4f46e5;
}

.category-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-count {
    font-size: 0.8rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* نتایج جستجوی زنده */
.live-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5rem;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.live-results {
    padding: 0.5rem;
}

.live-result-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
    margin-bottom: 0.25rem;
}

.live-result-item:hover {
    background: #f8fafc;
}

.live-result-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.live-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-result-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.live-result-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    color: #64748b;
}

.live-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* سایدبار */
.video-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.related-videos-sidebar,
.quick-search-sidebar,
.categories-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.related-videos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-video-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: #333;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.related-video-item:hover {
    background: #f8fafc;
}

.related-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.related-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.related-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.sidebar-search-form {
    margin-bottom: 1.5rem;
}

.sidebar-search-input {
    position: relative;
    display: flex;
}

.sidebar-search {
    flex: 1;
    padding: 0.5rem 3rem 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.sidebar-search:focus {
    border-color: #667eea;
}

.sidebar-search-btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    transition: background 0.3s;
}

.sidebar-search-btn:hover {
    background: #4338ca;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud-item {
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag-cloud-item:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
}

.categories-list {
    margin-bottom: 1rem;
}

.category-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
}

.category-sidebar-item:hover {
    background: #f8fafc;
    color: #1e293b;
    transform: translateX(4px);
}

.category-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.category-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.view-all-categories {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.view-all-categories:hover {
    color: #4338ca;
}

/* دکمه موبایل */
.mobile-search-fab {
    position: fixed;
    bottom: 2rem;
    left: 1rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
}

.mobile-search-fab:hover {
    transform: scale(1.1);
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .video-main-content {
        flex-direction: column;
    }

    .video-sidebar {
        width: 100%;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-main-row {
        flex-direction: column;
    }

    .search-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        flex-direction: column;
    }

    .video-search-section {
        display: none;
    }

    .mobile-search-fab {
        display: flex;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 0.5rem;
    }

    .related-thumbnail {
        width: 100px;
        height: 70px;
    }
}
