/* =====================================================
   VIDEO DETAIL PAGE - Stylesheet
   ===================================================== */

/* ===== Detail Layout ===== */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1100px) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

@media (min-width: 1600px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1100px) minmax(320px, 1fr);
    }
}

@media (max-width: 1200px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .recommendations {
        grid-column: 1 / -1;
    }
}

.detail-main {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 1100px;
}

/* ===== Meta Info ===== */
.meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-header {
    gap: 10px;
}

.detail-title {
    margin: 0;
    line-height: 1.1;
}

.meta-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.left-stack {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 640px) {
    .detail-title {
        font-size: calc(1em + 2px);
        line-height: 1.2;
        margin-top: 6px;
    }
}

.views-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.muted-chip {
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ===== Description ===== */
.description {
    background: var(--card);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    box-sizing: border-box;
}

.description-body { white-space: pre-wrap; }

.description-body .category-recommend-link {
    color: #f0a0c0;
    text-decoration: none;
    transition: color 0.2s;
}
.description-body .category-recommend-link:hover {
    color: #ff8ab5;
    text-decoration: underline;
}

.description.collapsible {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255,255,255,0.08);
}

.description.collapsible,
.description.collapsible * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(255,255,255,0.08);
    outline: none;
}

.description.collapsible:active,
.description.collapsible .description-body:active {
    background: transparent;
    color: inherit;
}

.description.collapsed .description-body {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc-more {
    font-weight: inherit;
    color: #b7e7f5;
}

/* ===== Mobile Dividers ===== */
@media (max-width: 768px) {
    .detail-main {
        gap: 6px;
    }
    
    .meta-line {
        flex-wrap: wrap;
        gap: 6px 8px;
    }
    
    .rating-block {
        background: transparent;
        border: none;
        padding: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin: 0;
        box-shadow: none;
        width: 100%;
        order: 3;
    }
    
    .views-block {
        order: 2;
    }
    
    .left-stack {
        order: 1;
        width: 100%;
    }
    
    .rating-top,
    .rating-footer {
        display: none !important;
    }
    
    .rating-strip {
        display: flex !important;
        grid-template-columns: unset !important;
        align-items: center;
        gap: 6px;
        width: 100%;
        flex: 1;
    }
    
    .vote-btn {
        flex: 0 0 auto;
        padding: 6px 10px;
        min-width: 44px;
        min-height: 36px;
        font-size: 0.95rem;
        border-radius: 6px;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
    }
    
    .vote-btn:hover {
        background: rgba(255,255,255,0.08) !important;
    }
    
    .vote-btn.active.like {
        background: rgba(52,211,153,0.12) !important;
        border-color: rgba(52,211,153,0.4) !important;
    }
    
    .vote-btn.active.dislike {
        background: rgba(239,68,68,0.12) !important;
        border-color: rgba(239,68,68,0.4) !important;
    }
    
    .vote-btn::after {
        content: ' ' attr(data-count);
        font-size: 0.75rem;
        margin-left: 4px;
        font-weight: 600;
        opacity: 0.9;
    }
    
    .ratio-track {
        display: none !important;
    }
    
    .description {
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.1);
        border-top: 1px solid rgba(255,255,255,0.08);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 10px 12px;
        border-radius: 8px;
        margin: 4px 0;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
        position: relative;
    }
    
    .description::before {
        content: '';
        position: absolute;
        top: -5px;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255,255,255,0.08);
    }
    
    .description::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255,255,255,0.08);
    }
    
    .tags-row {
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding-bottom: 6px;
        margin-bottom: 0;
        margin-top: 0;
        gap: 6px;
    }
    
    .recommendations {
        margin-top: -10px;
    }
}

@media (max-width: 640px) {
    .vote-btn {
        min-width: 40px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 0.9rem;
    }
    
    .vote-btn::after {
        font-size: 0.75rem;
    }
}

/* ===== Player ===== */
.player-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 8px;
    box-sizing: border-box;
    max-width: 1100px;
    width: 100%;
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
}

@media (max-width: 640px) {
    .player-wrapper {
        padding: 0;
        background: transparent;
        border-radius: 0;
        max-width: 100%;
        margin: 0;
        width: 100%;
        transform: none;
        transform-origin: center top;
    }
}

.player-shell {
    position: relative;
    width: 100%;
    height: 100%;
}

.player-shell .video-js {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0;
    user-select: none;
    -webkit-user-select: none;
}

#video-container .video-js {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.video-js .vjs-tech {
    object-fit: contain;
}

.player-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    display: flex;
}

@media (max-width: 640px) {
    .player-aspect {
        min-height: auto;
        max-height: none;
        border-radius: 0;
    }
}

.video-player,
.video-fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    z-index: 1;
}

/* ===== Player Controls ===== */
.player-controls {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.7));
    border: none;
    border-radius: 10px;
    z-index: 20;
    backdrop-filter: blur(4px);
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: auto;
}

.player-controls.is-mobile {
    left: 6px;
    right: 6px;
    bottom: 6px;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px;
    padding: 6px 8px;
}

.ctl-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
    min-width: 34px;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    pointer-events: auto;
}

.ctl-btn:hover { background: rgba(77,208,225,0.16); border-color: rgba(77,208,225,0.35); }
.ctl-btn:active { transform: translateY(1px); }

.time-label {
    color: #e1e7f2;
    font-size: 0.9rem;
    min-width: 120px;
}

/* ===== Progress Bar ===== */
.progress-bar {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    outline: none;
    border: 1px solid rgba(255,255,255,0.12);
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4dd0e1;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 0 0 4px rgba(77,208,225,0.25);
}

.progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4dd0e1;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 0 0 4px rgba(77,208,225,0.25);
}

@media (max-width: 640px) {
    .progress-bar {
        height: 8px;
        cursor: pointer;
    }
    .progress-bar::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 0 4px rgba(77,208,225,0.35);
    }
    .progress-bar::-moz-range-thumb {
        width: 18px;
        height: 18px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 0 4px rgba(77,208,225,0.35);
    }
}

/* ===== Volume ===== */
.vol-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.vol-bar {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    outline: none;
    border: 1px solid rgba(255,255,255,0.12);
    width: 100px;
}

.vol-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffb74d;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px rgba(255,183,77,0.2);
}

.vol-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffb74d;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px rgba(255,183,77,0.2);
}

/* ===== Rating Block ===== */
.rating-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-score {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.01em;
}

.rating-counts {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.rating-counts .count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.rating-strip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

.ratio-track {
    position: relative;
    height: 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.ratio-like,
.ratio-dislike {
    position: absolute;
    top: 0;
    bottom: 0;
}

.ratio-like { left: 0; background: linear-gradient(90deg, #34d399, #16a34a); }
.ratio-dislike { right: 0; background: linear-gradient(90deg, #b91c1c, #ef4444); }

/* Vote icons - Lucide */
.vote-icon {
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.vote-icon-like {
    color: #facc15;
    filter: drop-shadow(0 0 2px rgba(250, 204, 21, 0.3));
}

.vote-icon-dislike {
    color: #fbbf24;
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.3));
}

.vote-btn:hover .vote-icon {
    transform: scale(1.15);
}

.vote-btn.active.like .vote-icon-like {
    color: #fde047;
    filter: drop-shadow(0 0 6px rgba(253, 224, 71, 0.6));
}

.vote-btn.active.dislike .vote-icon-dislike {
    color: #f59e0b;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.like-count .vote-icon-like,
.dislike-count .vote-icon-dislike {
    margin-right: 2px;
}

/* Desktop only: counters (icon + number) are clickable */
@media (min-width: 901px) {
    .rating-counts .like-count,
    .rating-counts .dislike-count {
        cursor: pointer;
        user-select: none;
    }

    .rating-counts .like-count:hover .vote-icon,
    .rating-counts .dislike-count:hover .vote-icon {
        transform: scale(1.1);
    }

    /* Desktop: tighten icon/text alignment inside buttons */
    .rating-strip .vote-btn {
        gap: 8px;
        line-height: 1.1;
    }

    .rating-strip .vote-btn .vote-icon {
        display: block;
        flex: 0 0 auto;
        position: relative;
        top: -0.5px;
    }

    .rating-strip .vote-btn .vote-text {
        font-weight: 800;
        font-size: 1.06rem;
        line-height: 1.1;
    }
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    min-width: 56px;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.vote-btn.like { border-color: rgba(52,211,153,0.4); }
.vote-btn.dislike { border-color: rgba(239,68,68,0.4); }
.vote-btn:hover { transform: translateY(-1px); }
.vote-btn.active.like { background: rgba(52,211,153,0.16); }
.vote-btn.active.dislike { background: rgba(239,68,68,0.16); }

.rating-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

/* ===== Mobile Rating Styles ===== */
@media (max-width: 768px) {
    .meta-line {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .rating-block {
        background: transparent;
        border: none;
        padding: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin: 0;
        order: 3;
        width: auto;
        flex: 0 1 auto;
    }
    
    .rating-top,
    .rating-footer {
        display: none !important;
    }
    
    .rating-strip {
        display: flex !important;
        grid-template-columns: unset !important;
        align-items: center;
        gap: 6px;
        width: auto;
        flex: 0 1 auto;
        order: 2;
    }
    
    .vote-btn {
        flex: 0 0 auto;
        padding: 6px 12px;
        min-width: 95px;
        min-height: 36px;
        font-size: 0.9rem;
        border-radius: 6px;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: relative;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
    }
    
    .vote-btn:hover {
        background: rgba(255,255,255,0.08) !important;
    }
    
    .vote-btn.active.like {
        background: rgba(52,211,153,0.12) !important;
        border-color: rgba(52,211,153,0.4) !important;
    }
    
    .vote-btn.active.dislike {
        background: rgba(239,68,68,0.12) !important;
        border-color: rgba(239,68,68,0.4) !important;
    }
    
    .vote-btn::after {
        content: ' ' attr(data-count);
        font-size: 0.75rem;
        margin-left: 2px;
        font-weight: 600;
        opacity: 0.9;
    }
    
    .vote-text {
        display: inline;
    }
    
    .ratio-track {
        display: none !important;
    }
    
    .views-block {
        order: 1;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .vote-btn {
        min-width: 50px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .vote-btn::after {
        font-size: 0.7rem;
        margin-left: 1px;
    }
    
    .vote-text {
        font-size: 0.85rem;
    }
}

/* ===== Tags ===== */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(77,208,225,0.12);
    color: #e6f7ff;
    border: 1px solid rgba(77,208,225,0.25);
    font-size: 0.9rem;
    text-decoration: none;
}

.tag-chip:hover {
    border-color: rgba(77,208,225,0.55);
    background: rgba(77,208,225,0.2);
}

/* ===== Recommendations ===== */
.recommendations {
    background: var(--card);
    border: none;
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1100px) {
    .recommendations--expanded {
        grid-column: 1 / -1;
        width: 100%;
    }
    .recommendations--expanded .rec-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(345px, 1fr));
    gap: 6px;
    align-items: start;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Mobile Recommendations */
@media (max-width: 768px) {
    .recommendations {
        background: transparent;
        border-radius: 0;
        width: 100%;
        margin-left: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .rec-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .rec-card {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .rec-grid {
        grid-template-columns: 1fr;
    }
}

.rec-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.rec-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.rec-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.rec-card img,
.rec-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.rec-thumb-img.hidden-thumb { visibility: hidden; }

/* Lazy-load картинки рекомендаций (SEO: Google не видит реальный src) */
.rec-thumb-img.rec-lazy {
    background: #181818;
}

/* Placeholder для динамического создания video (невидим, не занимает место) */
.rec-hover-placeholder {
    display: none;
}

.rec-hover-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    visibility: hidden;
    background: #000;
    opacity: 0;
    transition: none;
    border-radius: 8px;
}

.rec-hover-preview.playing { visibility: visible; opacity: 1; }

.duration-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 3;
}

.rec-views {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
}

.rec-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.rec-meta {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.rec-meta > .date-label { order: 1; }
.rec-meta > .cat-badge { order: 2; }

.cat-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(136,165,204,0.18), rgba(136,165,204,0.14));
    border: 1px solid rgba(136,165,204,0.35);
    color: #8ba5cc;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 60px;
    justify-content: center;
}

.cat-badge:hover {
    background: linear-gradient(135deg, rgba(136,165,204,0.25), rgba(136,165,204,0.18));
    border-color: rgba(136,165,204,0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(136,165,204,0.2);
}

.date-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.04);
    font-weight: 600;
    min-width: 60px;
    transition: none;
    text-align: center;
}

.rec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    padding-top: 5px;
    border-top: 1px solid var(--border);
}

.rec-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

@media (max-width: 640px) {
    .rec-tag {
        font-size: 0.75rem;
    }
}

.rec-tag:hover {
    background: var(--accent-glow);
    border-color: var(--border-light);
    color: var(--text);
}

/* ===== Infinite Scroll Loader ===== */
.rec-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rec-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: rec-spin 0.8s linear infinite;
}

@keyframes rec-spin {
    to { transform: rotate(360deg); }
}

.rec-loader-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.rec-infinite-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.rec-end-icon {
    font-size: 32px;
    opacity: 0.6;
}

.rec-end-text {
    font-weight: 600;
    color: var(--text-dim);
}

.rec-end-subtext {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ===== Banner Ad ===== */
.banner-ad-container {
    margin-top: 16px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: sticky;
    top: 80px;
    z-index: 10;
    transition: all 0.3s ease;
}

.banner-ad-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-ad-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.banner-ad-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 1200px) {
    .banner-ad-container {
        position: relative;
        top: 0;
    }
}

/* ===== Comments Section ===== */
.comments-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    margin-top: 24px;
}

.comments-header {
    margin-bottom: 24px;
}

.comments-header .comments-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-count {
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
}

.comment-form-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.comment-form-avatar {
    flex-shrink: 0;
    padding-top: 2px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.08);
}

.comment-avatar-default {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(77,208,225,0.2);
}

.comment-form-content {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 12px;
    transition: all 0.2s;
}

.comment-form-content:focus-within {
    border-color: rgba(77,208,225,0.5);
    box-shadow: 0 0 0 3px rgba(77,208,225,0.1);
}

.comment-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 20px;
    max-height: 150px;
    overflow-y: auto;
    padding: 2px 0;
}

.comment-textarea:focus {
    outline: none;
}

.comment-textarea::placeholder {
    color: var(--muted);
}

.btn-comment-submit {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4dd0e1, #26a69a);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-comment-submit:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(77,208,225,0.4);
}

.btn-comment-submit:active {
    transform: scale(0.95);
}

.btn-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-comment-submit svg {
    width: 16px;
    height: 16px;
}

.comment-login-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(77,208,225,0.05);
    border: 1px solid rgba(77,208,225,0.15);
    border-radius: 12px;
    margin-bottom: 32px;
}

.comment-login-prompt svg {
    flex-shrink: 0;
    color: #4dd0e1;
}

.comment-login-prompt p {
    margin: 0;
    color: var(--text-dim);
    font-size: 14px;
}

.comment-login-prompt a {
    color: var(--text-dim);
    text-decoration: underline;
    cursor: pointer;
}

.comment-login-prompt a:hover {
    color: var(--text);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    transition: all 0.2s;
}

.comment-item:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.comment-item-avatar {
    flex-shrink: 0;
}

.comment-item-content {
    flex: 1;
}

.comment-item-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-item-username {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.comment-item-time {
    font-size: 12px;
    color: var(--muted);
}

.comment-item-time::before {
    content: "•";
    margin-right: 6px;
}

.comment-item-edited {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

.comment-item-text {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 6px;
}

.comment-item-actions {
    display: flex;
    gap: 16px;
}

.comment-item-action {
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    border: none;
    padding: 4px 0;
    font-weight: 500;
}

.comment-item-action:hover {
    color: var(--text);
}

.comment-item-action.delete:hover {
    color: #ff4757;
}

@media (max-width: 900px) {
    .comments-section {
        display: none !important;
    }
}

/* ===== Player / Ads Styles ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preroll-skip-btn {
    position: absolute;
    bottom: 60px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10001;
    border-radius: 4px;
    transition: background 0.2s;
}

.preroll-skip-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.preroll-skip-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.preroll-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    z-index: 10000;
    cursor: pointer;
}

.vjs-toggle-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 997;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.vjs-toggle-overlay.visible {
    opacity: 1;
}

.vjs-toggle-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

.vjs-toggle-icon svg {
    width: 60%;
    height: 60%;
    display: block;
}

.vjs-toggle-icon.pulse {
    animation: iconPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPulse {
    0% { transform: scale(0.8); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.video-js *:focus {
    outline: none !important;
}

.video-js:focus {
    outline: none !important;
}

.vjs-big-play-button:focus,
.vjs-big-play-button:active {
    outline: none !important;
    border: none !important;
}

.video-js .vjs-control-bar *:focus {
    outline: none !important;
}

.video-js .vjs-loading-spinner,
.video-js .vjs-spinner,
.vjs-loading-spinner,
.vjs-spinner {
    display: none !important;
}

/* ===== Favorite Badge ===== */
.favorite-badge {
    background: #2d9a95 !important;
    border: none !important;
    color: #fff !important;
    padding: 4px 8px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.favorite-badge:hover {
    background: #1e7a75 !important;
    transform: translateY(-1px) !important;
}

.favorite-badge.active {
    background: #4caf50 !important;
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* ===== VAST/IMA Ad Styles ===== */
.ima-ad-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
}

.video-js.vjs-ad-playing .vjs-tech,
.video-js.vjs-ad-loading .vjs-tech {
    pointer-events: none !important;
}

.video-js.vjs-ad-playing .vjs-control-bar,
.video-js.vjs-ad-loading .vjs-control-bar {
    display: none !important;
}

.video-js.vjs-ad-playing .vjs-big-play-button,
.video-js.vjs-ad-loading .vjs-big-play-button {
    display: none !important;
}

/* VAST Loading Indicator */
.vast-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.vast-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vastSpin 0.8s linear infinite;
}

@keyframes vastSpin {
    to { transform: rotate(360deg); }
}

/* Big Play Button for Mobile */
.vast-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    cursor: pointer;
}

.vast-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.vast-play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.vast-play-btn svg {
    width: 35px;
    height: 35px;
    fill: #fff;
    margin-left: 5px;
}
