/* --- RoboNIT TV Dark Theme --- */
.tv-container {
    display: flex;
    background: #0f0f0f;
    color: #fff;
    min-height: 100vh;
    padding-top: 90px;
}

/* Sidebar */
.tv-sidebar {
    width: 240px;
    background: #0f0f0f;
    /* Seamless look */
    padding: 20px;
    border-right: 1px solid #222;
    /* Minimal border if needed */
    height: calc(100vh - 90px);
    position: sticky;
    top: 90px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-block {
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.sidebar-block:last-child {
    border: none;
}

.tv-heading {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.tv-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.2s;
    font-size: 0.95rem;
}

.tv-nav-link:hover,
.tv-nav-link.active {
    background: #222;
}

.tv-nav-link .dashicons {
    font-size: 20px;
}

.tv-show-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #ddd;
    text-decoration: none;
    font-size: 0.9rem;
}

.tv-show-link:hover {
    color: #fff;
}

.tv-show-link.active-show {
    color: var(--color-accent-blue, #00f0ff);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding-left: 10px;
}

.show-thumb-mini {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main Content */
.tv-main {
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
}

/* Hero */
.tv-hero {
    height: 300px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
}

.tv-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #0f0f0f 0%, rgba(15, 15, 15, 0.2) 80%);
    border-radius: 16px;
}

.tv-hero-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 60%;
}

.tv-label {
    background: var(--color-accent-blue, #00f0ff);
    color: #000;
    padding: 4px 8px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.8rem;
}

.tv-hero-title {
    font-size: 2rem;
    margin: 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.tv-hero-meta {
    color: #ccc;
    margin-bottom: 20px;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-play:hover {
    background: #ddd;
}

/* Chips */
.tv-chips-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.chip {
    background: #222;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
    border: 1px solid #333;
    transition: 0.2s;
}

.chip:hover,
.chip.active {
    background: #fff;
    color: #000;
}

/* Grid */
.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    cursor: pointer;
}

.video-thumb-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 12px;
}

.video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.video-thumb-wrap:hover img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.video-details {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.video-avatar img {
    border-radius: 50%;
}

.video-title {
    font-size: 1rem;
    margin: 0 0 4px;
    line-height: 1.4;
}

.video-title a {
    color: #fff;
    text-decoration: none;
}

.video-info {
    font-size: 0.85rem;
    color: #aaa;
}

.video-show-name {
    color: #aaa;
    text-decoration: none;
}

.video-show-name:hover {
    color: #fff;
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .tv-sidebar {
        display: none;
    }

    /* Use hamburger menu logic in real implementation */
    .tv-hero-content {
        width: 100%;
    }
}


.video-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(3px);
    /* ایجاد افکت شیشه‌ای مات */
}

.hover-title-text {
    color: #fff;
    font-weight: 300;
    font-size: 1rem;
    /* اندازه متناسب برای عناوین طولانی */
    text-align: center;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* نمایش حداکثر ۳ خط و سپس سه نقطه */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

.video-card:hover .video-hover-overlay {
    opacity: 1;
}

.video-card:hover .hover-title-text {
    transform: translateY(0);
}




.tv-search-wrap {
    position: relative;
    margin-bottom: 20px;
}

#tv-ajax-search {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 10px 35px 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.tv-search-wrap .dashicons-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.spinner-loader {
    position: absolute;
    left: 10px;
    top: 30%;
    width: 15px;
    height: 15px;
    border: 2px solid #333;
    border-top: 2px solid var(--color-accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}