/* --- YouTube Home Style Video Grid --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 20px;
}

.video-card {
    width: 100%;
    transition: transform var(--transition);
}

.video-card:hover { transform: translateY(-4px); }

.video-thumb-link {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 16 / 9;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-thumb-link:hover .video-thumbnail { transform: scale(1.04); }

/* Unified YouTube-style Info Block */
.video-info {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    align-items: flex-start;
}

.avatar-col { flex-shrink: 0; }

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.title-col {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-name {
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
}

.channel-name:hover { color: var(--text); }

.video-stats {
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 1000px) {
}

.video-interaction-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.channel-block { display: flex; align-items: center; gap: 12px; }

/* Action Buttons Styles */
.video-actions-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn-pill:hover {
    background: #3f3f3f;
}

.like-dislike-group {
    display: flex;
    background: #272727;
    border-radius: 20px;
    overflow: hidden;
}

.like-dislike-group .action-btn-pill {
    border-radius: 0;
}

.divider {
    border-left: 1px solid #444 !important;
}

.subscribe-btn-main {
    background: #f1f1f1;
    color: #0f0f0f;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.action-btn-pill {
    background: var(--surface-3);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.suggested-channel, .suggested-stats {
    font-size: 0.75rem;
    color: var(--muted);
}
.watch-video-actions button,
.category-tabs button {
    border: none;
    background: #272727;
    color: #fff;
    border-radius: 24px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
}

.watch-video-actions button:hover,
.category-tabs button:hover {
    background: #3a3a3a;
}
/* --- Upload Form Styles --- */
.upload-container { display: flex; justify-content: center; padding: 40px 20px; }
.upload-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 800px;
    padding: 30px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.full-width { grid-column: span 2; }

.upload-form input, .upload-form select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
}

@media (max-width: 900px) {
    .app { grid-template-columns: 88px 1fr; }
    .sidebar span, .nav-title { display: none; }
}

@media (max-width: 680px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

.action-btn-pill.active {
    background: #fff;
    color: #000;
}

@keyframes likePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.like-animate {
    animation: likePop 0.3s ease;
}


/* STYLES GOVERNING THE COMMENT SECTION*/
.comments-section {
    margin-top: 24px;
    background: transparent;
}

.comment-form {
    margin-bottom: 18px;
}

.comment-form textarea,
.reply-box textarea {
    width: 100%;
    min-height: 64px;
    background: #181818;
    border: 1px solid #333;
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    resize: vertical;
}

.comment-form button,
.submit-reply-btn,
.cancel-reply-btn {
    margin-top: 8px;
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
}

.comment-form button,
.submit-reply-btn {
    background: #fff;
    color: #000;
}

.cancel-reply-btn {
    background: #272727;
    color: #fff;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.comment-item.reply {
    margin-top: 12px;
}

.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-avatar.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-body strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.comment-body p {
    color: #e5e5e5;
    line-height: 1.5;
    margin: 0;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
}

.comment-actions button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 13px;
}

.comment-actions button:hover,
.comment-actions button.active {
    color: #3ea6ff;
}

.replies {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid #333;
}
.comment-item.reply .replies {
    padding-left: 16px;
}

.reply-box {
    margin-top: 12px;
}

.reply-box-actions {
    display: flex;
    gap: 8px;
}

.toggle-replies-btn {
    margin-top: 6px;
    background: none;
    border: none;
    color: #3ea6ff;
    cursor: pointer;
    font-size: 13px;
}

.toggle-replies-btn:hover {
    text-decoration: underline;
}

.comment-sort h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: #fff; /* Match dark theme text */
}

.sort-btn {
    background: none;
    border: none;
    color: #aaa; /* Muted text for inactive state */
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-btn:hover {
    color: #fff;
}

/* Optional: Add a "Sort by" icon style if you want to include one later */
.sort-btn::before {
    content: "\f0c9"; /* FontAwesome bars icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    display: none; /* Set to block if you want the icon visible */
}
/* --- Comment Sort Header --- */


.comment-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    margin-top: 10px;
    margin: 16px 0;
}

.sort-btn,
.load-more-comments {
    border: none;
    background: #272727;
    color: #fff;
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
}
/* Classic underline effect for the active/focused sort option */


.sort-btn.active {
    color: #000;
    border-bottom: 2px solid #fff;
    background: #fff;
}

.load-more-comments {
    display: block;
    margin: 20px auto;
}
.load-more-comments:hover{
    background:#555555;
}

.load-more-comments:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.skeleton-box {
    background: #333;
    border-radius: 50%;
    width: 38px;
    height: 38px;
}

.skeleton-line {
    height: 10px;
    background: #333;
    margin: 6px 0;
    border-radius: 6px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton {
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}
.subscribe-btn-main.subscribed {
    background: #272727;
    color: #fff;
}

.subscribe-btn-main:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.watch-left-column {
    min-width: 0;
}

/* =========================
   VIDEO TITLE
   ========================= */

.video-main-title {
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 950;
    margin: 18px 0 0;
    color: #fff;
    line-height: 1.22;
    letter-spacing: -0.03em;
}

/* =========================
   VIDEO PLAYER BOX
   ========================= */

.video-player-container {
    width: 100%;
}

.video-player-box {
    background: radial-gradient(circle at top right, rgba(255,45,85,0.14), transparent 34%),
    #05060a;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
    border: 1px solid rgba(255,45,85,0.16);
    box-shadow: 0 28px 70px rgba(0,0,0,0.50),
    0 0 30px rgba(255,45,85,0.10),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.video-player-box::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
            linear-gradient(
                    180deg,
                    rgba(255,255,255,0.04),
                    transparent 18%,
                    transparent 82%,
                    rgba(0,0,0,0.16)
            );

    z-index: 2;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    max-height: 72vh;
    background: #000;
    border-radius: inherit;
}

/* =========================
   VIDEO DESCRIPTION CARD
   Add this section in PHP if missing:
   <section class="video-description-card">...</section>
   ========================= */

.video-description-card {
    margin-top: 18px;
    padding: 18px;

    border-radius: 22px;
    border: 1px solid rgba(255,45,85,0.14);

    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.09), transparent 34%),
            linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
            #0f1118;

    box-shadow:
            0 18px 45px rgba(0,0,0,0.34),
            inset 0 1px 0 rgba(255,255,255,0.04);
}

.video-description-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;
}

.video-description-stat {
    min-height: 32px;
    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    border-radius: 999px;

    background: rgba(255,255,255,0.055);
    color: #ddd;

    font-size: 12px;
    font-weight: 900;
}

.video-description-stat i {
    color: #ff6f8d;
}

.video-description-text {
    margin: 0;

    color: #d5d7de;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
}

.video-description-text.is-collapsed {
    display: -webkit-box;
    overflow: hidden;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.video-description-more {
    margin-top: 12px;

    border: none;
    background: transparent;

    color: #ff7a93;

    font-size: 13px;
    font-weight: 950;

    cursor: pointer;
}

.video-description-more:hover {
    color: #fff;
}

/* scrollbar */
.watch-sidebar::-webkit-scrollbar {
    width: 6px;
}

.watch-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255,45,85,0.30);
}

.watch-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tabs button {
    min-height: 38px;
    padding: 0 14px;

    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.07);

    background:
            linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
            rgba(255,255,255,0.035);

    color: #d8d9df;

    font-size: 13px;
    font-weight: 900;

    white-space: nowrap;
    cursor: pointer;

    transition:
            transform 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease,
            color 0.2s ease,
            box-shadow 0.2s ease;
}

.category-tabs button:hover {
    transform: translateY(-1px);

    color: #fff;
    border-color: rgba(255,45,85,0.24);
    background: rgba(255,45,85,0.12);
}

.category-tabs button.active {
    color: #fff;
    border-color: rgba(255,255,255,0.13);

    background: linear-gradient(135deg, #e1164d, #ff2d55);

    box-shadow:
            0 12px 26px rgba(255,45,85,0.25),
            inset 0 1px 0 rgba(255,255,255,0.12);
}

/* =========================
   SUGGESTED VIDEOS LIST
   ========================= */

.suggested-list {
    display: grid;
    gap: 12px;
}
/* --- Suggested Sidebar --- */


.suggested-video-card {
    display: grid;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 12px;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.055);
    background: linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.018);
    color: #fff;
    transition: transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.suggested-video-card:hover {
    transform: translateY(-2px);

    border-color: rgba(255,45,85,0.25);
    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.10), transparent 35%),
            rgba(255,255,255,0.035);

    box-shadow:
            0 16px 34px rgba(0,0,0,0.32),
            0 0 18px rgba(255,45,85,0.08);
}

.suggested-thumb {
    width: 100%;
    min-width: 0;
    flex-shrink: 1;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: radial-gradient(circle, rgba(255,45,85,0.18), transparent 44%),
    #08090e;
}

.suggested-thumb img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    height: 100%;
    transition: transform 0.25s ease;
}

.suggested-video-card:hover .suggested-thumb img {
    transform: scale(1.06);
}

.suggested-duration {
    position: absolute;
    bottom: 7px;
    right: 7px;
    background: rgba(0,0,0,0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    padding: 4px 7px;
    border-radius: 8px;
}
/* Meta Data Alignment */


.suggested-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.suggested-title {
    font-size: 14px;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-weight: 950;
}

.suggested-details {
    margin-top: 7px;
}

.suggested-channel {
    margin: 0 0 4px;

    display: flex;
    align-items: center;
    gap: 5px;

    color: #c8cad2;

    font-size: 12px;
    font-weight: 800;
}

.suggested-channel i {
    color: #2d8cff;
    font-size: 11px;
}

.suggested-stats {
    margin: 0;

    color: #858894;

    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.suggested-new-badge {
    margin-top: 7px;
    padding: 4px 8px;

    display: inline-flex;
    align-items: center;

    border-radius: 999px;

    background: rgba(255,45,85,0.14);
    color: #ff8aa2;

    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================
   EMPTY SIDEBAR STATE
   ========================= */

.suggested-list:empty::before {
    content: "No suggested videos found.";

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 160px;
    padding: 20px;

    border-radius: 18px;
    border: 1px dashed rgba(255,45,85,0.20);

    color: #aaa;

    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

/* =========================
   RESPONSIVE WATCH LAYOUT
   ========================= */

/* ==========================================================
   WATCH PAGE RESPONSIVE FIX
   Prevents recommended videos from squeezing the player
   ========================================================== */

/* Large desktop: normal watch layout */
.watch-page {
    display: grid;
    grid-template-columns: minmax(720px, 1fr) 390px;
    gap: 24px;
    width: 100%;
    align-items: start;
}

/* Medium screens: drop recommended videos below earlier */
@media (max-width: 1380px) {
    .watch-page {
        grid-template-columns: 1fr !important;
    }

    .watch-left-column {
        width: 100% !important;
        min-width: 0 !important;
    }

    .watch-sidebar {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        margin-top: 22px !important;
    }

    .suggested-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        gap: 14px !important;
    }

    .suggested-video-card {
        grid-template-columns: 145px minmax(0, 1fr) !important;
    }

    .suggested-thumb {
        width: 100% !important;
    }
}

/* Tablets and phones */
@media (max-width: 760px) {
    .watch-layout-main {
        padding: 10px !important;
    }

    .watch-page {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .video-player-box {
        border-radius: 16px !important;
        aspect-ratio: 16 / 9 !important;
    }

    .main-video {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .video-interaction-bar {
        padding: 14px !important;
    }

    .video-actions-btns {
        width: 100% !important;
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 4px !important;
    }

    .video-actions-btns::-webkit-scrollbar {
        display: none;
    }

    .action-btn-pill {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .watch-sidebar {
        margin-top: 16px !important;
        padding: 12px !important;
        border-radius: 18px !important;
    }

    .suggested-list {
        grid-template-columns: 1fr !important;
    }

    .suggested-video-card {
        grid-template-columns: 128px minmax(0, 1fr) !important;
        padding: 8px !important;
    }

    .suggested-thumb {
        width: 100% !important;
        border-radius: 12px !important;
    }
}

/* Very small phones */
@media (max-width: 460px) {
    .suggested-video-card {
        grid-template-columns: 112px minmax(0, 1fr) !important;
    }

    .suggested-title {
        font-size: 12px !important;
    }

    .suggested-new-badge {
        display: none !important;
    }
}

@media (max-width: 1050px) {
    .watch-page {
        grid-template-columns: 1fr;
    }

    .watch-sidebar {
        position: static;

        max-height: none;

        margin-top: 22px;
    }

    .suggested-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .suggested-video-card {
        grid-template-columns: 145px minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .video-player-box {
        border-radius: 18px;
    }

    .video-main-title {
        margin-top: 14px;
        font-size: 21px;
    }

    .watch-sidebar {
        padding: 12px;
        border-radius: 20px;
    }

    .suggested-list {
        grid-template-columns: 1fr;
    }

    .suggested-video-card {
        grid-template-columns: 132px minmax(0, 1fr);
        padding: 8px;
    }

    .suggested-title {
        font-size: 13px;
    }
}

@media (max-width: 460px) {
    .suggested-video-card {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .suggested-thumb {
        border-radius: 12px;
    }

    .suggested-new-badge {
        display: none;
    }
}
/* --- Video Play Page (playvideo.php) --- */


/* ==========================================================
   WATCH PAGE TOP SPACING FIX
   Reduces large gap between top nav and video/category tabs
   ========================================================== */

.watch-layout-main {
    grid-column: 2 / -1;
    padding: 20px;
    padding-top: 14px !important;
}
/* ==========================================================
   WATCH PAGE - DESCRIPTION + RECOMMENDED VIDEOS
   GHPHOUSE PREMIUM DARK RED THEME
   ========================================================== */
/* =========================
   WATCH PAGE MAIN LAYOUT
   ========================= */


.watch-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-items: start !important;
}

.video-player-container,
.watch-left-column,
.watch-sidebar {
    margin-top: 0 !important;
}
/* =========================
   WATCH SIDEBAR
   ========================= */


/* Suggested videos sidebar should start close to the top */
.watch-sidebar {
    min-width: 0;
    position: sticky;
    top: calc(var(--ghp-topbar-height, 76px) + 10px) !important;
    align-self: start;
    max-height: calc(100vh - var(--ghp-topbar-height, 76px) - 28px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(255,45,85,0.13);
    background: radial-gradient(circle at top right, rgba(255,45,85,0.10), transparent 34%),
    linear-gradient(180deg, #14161e, #0b0d12);
    box-shadow: 0 22px 60px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.04);
    box-sizing: border-box;
}
/* =========================
   CATEGORY TABS
   ========================= */


/* Category tabs should not create extra spacing */
.category-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    background: linear-gradient(180deg, #14161e 70%, rgba(20,22,30,0));
    scrollbar-width: none;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove possible old large spacing from previous layout */
.main.watch-layout-main,
.watch-layout-main .watch-page,
.watch-layout-main .video-player-container {
    transform: none !important;
}

/* Mobile */
@media (max-width: 900px) {
    .watch-layout-main {
        padding-top: 10px !important;
    }

    .watch-sidebar {
        margin-top: 14px !important;
    }
}

/* ==========================================================
   FORCE FIX: REMOVE LARGE TOP GAP ON WATCH PAGE
   Put this at the VERY BOTTOM of video.css
   ========================================================== */

body .app .main.watch-layout-main {
    padding-top: 12px !important;
    margin-top: 0 !important;
    min-height: 0 !important;
}

body .app .main.watch-layout-main .watch-page {
    padding-top: 0 !important;
    margin-top: 0 !important;

    display: grid !important;
    align-items: start !important;
}

/* Stop the video/player area from creating huge empty height */
body .app .main.watch-layout-main .video-player-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

body .app .main.watch-layout-main .video-player-box {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
}

/* Video should fill the player box only, not create extra vertical space */
body .app .main.watch-layout-main .main-video {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 68vh !important;

    display: block !important;
    object-fit: contain !important;
}

/* Pull the channel/actions section close to the video */
body .app .main.watch-layout-main .video-main-title {
    margin-top: 12px !important;
}

body .app .main.watch-layout-main .video-interaction-bar {
    margin-top: 12px !important;
    margin-bottom: 14px !important;
}

/* Sidebar tabs must start at the top of their card */
body .app .main.watch-layout-main .watch-sidebar {
    margin-top: 0 !important;
    padding-top: 10px !important;
    align-self: start !important;
    top: 10px !important;
}

body .app .main.watch-layout-main .category-tabs {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any old spacer pseudo-elements */
body .app .main.watch-layout-main .watch-page::before,
body .app .main.watch-layout-main .video-player-container::before,
body .app .main.watch-layout-main .watch-sidebar::before {
    display: none !important;
    content: none !important;
}

/* ==========================================================
   FINAL FIX: REMOVE GAP ABOVE WATCH SIDEBAR
   The sidebar is already below the header through the app grid,
   so it should NOT add the topbar height again.
   ========================================================== */

body .app .main.watch-layout-main {
    padding-top: 10px !important;
}

body .app .main.watch-layout-main .watch-page {
    align-items: flex-start !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Main fix */
body .app .main.watch-layout-main .watch-sidebar {
    position: sticky !important;

    /* Do NOT use topbar height here */
    top: 10px !important;

    margin-top: 0 !important;
    padding-top: 10px !important;

    align-self: flex-start !important;
}

/* Tabs must sit immediately at the top of the sidebar */
body .app .main.watch-layout-main .watch-sidebar .category-tabs {
    position: sticky !important;
    top: 0 !important;

    margin-top: 0 !important;
    margin-bottom: 10px !important;

    padding-top: 0 !important;
    padding-bottom: 10px !important;
}

/* Remove hidden spacing that may come from older duplicate rules */
body .app .main.watch-layout-main .watch-sidebar > *:first-child {
    margin-top: 0 !important;
}

/* Tablet and mobile: no sticky sidebar */
@media (max-width: 1380px) {
    body .app .main.watch-layout-main .watch-sidebar {
        position: relative !important;
        top: auto !important;

        margin-top: 16px !important;
        padding-top: 10px !important;
    }

    body .app .main.watch-layout-main .watch-sidebar .category-tabs {
        position: relative !important;
        top: auto !important;
    }
}

/* ==========================================================
   VIDEO REPORT MODAL
   ========================================================== */

.report-video-btn {
    color: #ff8aa2 !important;
}

.report-video-btn:hover {
    color: #fff !important;
}

.ghp-report-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(14px);
}

.ghp-report-modal-backdrop.show {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.ghp-report-modal {
    width: min(100%, 520px);

    border-radius: 26px;
    border: 1px solid rgba(255,45,85,0.22);

    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.16), transparent 34%),
            linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.018)),
            #101119;

    box-shadow:
            0 28px 80px rgba(0,0,0,0.55),
            0 0 36px rgba(255,45,85,0.14),
            inset 0 1px 0 rgba(255,255,255,0.05);

    padding: 20px;
}

.ghp-report-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
}

.ghp-report-modal-head h3 {
    margin: 0;

    color: #fff;

    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.ghp-report-modal-head p {
    margin: 6px 0 0;

    color: #aaa;

    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.ghp-report-close {
    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.07);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.ghp-report-close:hover {
    background: rgba(255,45,85,0.18);
}

.ghp-report-form {
    display: grid;
    gap: 15px;
}

.ghp-report-row {
    display: grid;
    gap: 8px;
}

.ghp-report-row label {
    color: #ddd;

    font-size: 13px;
    font-weight: 900;
}

.ghp-report-row label span {
    color: #888;
    font-weight: 750;
}

.ghp-report-row select,
.ghp-report-row textarea {
    width: 100%;

    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);

    background:
            linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
            #090d15;

    color: #fff;

    padding: 13px 14px;
    outline: none;
    box-sizing: border-box;
}

.ghp-report-row select:focus,
.ghp-report-row textarea:focus {
    border-color: rgba(255,45,85,0.38);
    box-shadow: 0 0 0 3px rgba(255,45,85,0.08);
}

.ghp-report-row textarea {
    min-height: 115px;
    resize: vertical;
}

.ghp-report-warning {
    padding: 12px 13px;

    border-radius: 16px;
    border: 1px solid rgba(255,190,80,0.20);

    background: rgba(255,190,80,0.08);
    color: #ffd083;

    display: flex;
    align-items: flex-start;
    gap: 9px;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.ghp-report-submit {
    min-height: 48px;

    border: none;
    border-radius: 999px;

    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    font-size: 14px;
    font-weight: 950;

    cursor: pointer;

    box-shadow:
            0 14px 30px rgba(255,45,85,0.24),
            inset 0 1px 0 rgba(255,255,255,0.12);
}

.ghp-report-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 560px) {
    .ghp-report-modal {
        padding: 16px;
        border-radius: 22px;
    }

    .ghp-report-modal-head h3 {
        font-size: 19px;
    }
}

/* ==========================================================
   WATCH PAGE MORE / ELLIPSIS POPUP
   ========================================================== */

.watch-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.watch-more-wrap .more-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
}

.watch-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 200;

    width: 260px;
    padding: 8px;

    display: none;

    border-radius: 18px;
    border: 1px solid rgba(255,45,85,0.18);

    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.12), transparent 34%),
            linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.018)),
            #101119;

    box-shadow:
            0 20px 55px rgba(0,0,0,0.45),
            0 0 24px rgba(255,45,85,0.10),
            inset 0 1px 0 rgba(255,255,255,0.05);
}

.watch-more-menu.show {
    display: grid;
    gap: 6px;
}

.watch-more-menu::before {
    content: "";

    position: absolute;
    top: -7px;
    right: 18px;

    width: 14px;
    height: 14px;

    transform: rotate(45deg);

    background: #101119;
    border-left: 1px solid rgba(255,45,85,0.18);
    border-top: 1px solid rgba(255,45,85,0.18);
}

.watch-more-item {
    width: 100%;
    padding: 11px 12px;

    border: none;
    border-radius: 14px;

    background: transparent;
    color: #fff;

    display: flex;
    align-items: center;
    gap: 11px;

    text-align: left;
    cursor: pointer;

    transition:
            background 0.2s ease,
            transform 0.2s ease;
}

.watch-more-item:hover {
    background: rgba(255,45,85,0.13);
    transform: translateY(-1px);
}

.watch-more-item > span {
    width: 36px;
    height: 36px;

    border-radius: 13px;

    background: rgba(255,45,85,0.14);
    color: #ff8aa2;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 36px;
}

.watch-more-item strong {
    display: block;

    color: #fff;

    font-size: 13px;
    font-weight: 950;
}

.watch-more-item small {
    display: block;
    margin-top: 3px;

    color: #999;

    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

@media (max-width: 560px) {
    .watch-more-menu {
        right: -6px;
        width: 240px;
    }
}

/* ==========================================================
   WATCH MORE MENU: REPORT / LOGIN REQUIRED SECTION
   ========================================================== */

.watch-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.watch-more-wrap .more-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0 !important;
    justify-content: center;
}

.watch-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 500;

    width: 270px;
    padding: 8px;

    display: none;

    border-radius: 18px;
    border: 1px solid rgba(255, 45, 85, 0.18);

    background:
            radial-gradient(circle at top right, rgba(255, 45, 85, 0.13), transparent 34%),
            linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
            #101119;

    box-shadow:
            0 20px 55px rgba(0, 0, 0, 0.48),
            0 0 24px rgba(255, 45, 85, 0.10),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.watch-more-menu.show {
    display: grid;
    gap: 6px;
}

.watch-more-menu::before {
    content: "";

    position: absolute;
    top: -7px;
    right: 18px;

    width: 14px;
    height: 14px;

    transform: rotate(45deg);

    background: #101119;
    border-left: 1px solid rgba(255, 45, 85, 0.18);
    border-top: 1px solid rgba(255, 45, 85, 0.18);
}

/* Works for both <button> and <a> */
.watch-more-item {
    width: 100%;
    min-height: 62px;
    padding: 11px 12px;

    border: none;
    border-radius: 14px;

    background: transparent;
    color: #fff;

    display: flex;
    align-items: center;
    gap: 11px;

    text-align: left;
    text-decoration: none;

    cursor: pointer;

    transition:
            background 0.2s ease,
            transform 0.2s ease,
            border-color 0.2s ease;
}

.watch-more-item:hover {
    background: rgba(255, 45, 85, 0.13);
    transform: translateY(-1px);
}

.watch-more-item > span {
    width: 38px;
    height: 38px;

    border-radius: 14px;

    background: rgba(255, 45, 85, 0.14);
    color: #ff8aa2;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;
}

.watch-more-item > span i {
    font-size: 15px;
}

.watch-more-item div {
    min-width: 0;
}

.watch-more-item strong {
    display: block;

    color: #fff;

    font-size: 13px;
    font-weight: 950;
    line-height: 1.25;
}

.watch-more-item small {
    display: block;
    margin-top: 4px;

    color: #999;

    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

/* Report item */
.watch-more-item#openReportVideoModal > span {
    background: rgba(255, 45, 85, 0.16);
    color: #ff8aa2;
}

.watch-more-item#openReportVideoModal:hover > span {
    background: linear-gradient(135deg, #e1164d, #ff2d55);
    color: #fff;
}

/* Login required link */
.watch-more-item[href*="login.php"] > span {
    background: rgba(45, 140, 255, 0.14);
    color: #8ab4ff;
}

.watch-more-item[href*="login.php"]:hover {
    background: rgba(45, 140, 255, 0.11);
}

.watch-more-item[href*="login.php"]:hover > span {
    background: linear-gradient(135deg, #2d8cff, #6aa9ff);
    color: #fff;
}

/* Mobile */
@media (max-width: 560px) {
    .watch-more-menu {
        right: -4px;
        width: 245px;
    }

    .watch-more-item {
        min-height: 58px;
        padding: 10px;
    }

    .watch-more-item > span {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .watch-more-item strong {
        font-size: 12px;
    }

    .watch-more-item small {
        font-size: 10px;
    }
}

.ghp-empty-state {
    padding: 36px 24px;
    border-radius: 24px;
    border: 1px solid rgba(255,45,85,0.16);
    background:
            radial-gradient(circle at top right, rgba(255,45,85,0.10), transparent 34%),
            linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
            #101119;
    color: #fff;
    text-align: center;
    box-shadow:
            0 20px 55px rgba(0,0,0,0.38),
            inset 0 1px 0 rgba(255,255,255,0.04);
}

.ghp-empty-state i {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 22px;
    background: rgba(255,45,85,0.14);
    color: #ff8aa2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.ghp-empty-state strong {
    display: block;
    color: #fff;
    font-size: 22px;
    font-weight: 950;
}

.ghp-empty-state span {
    display: block;
    max-width: 560px;
    margin: 8px auto 0;
    color: #aaa;
    font-size: 14px;
    line-height: 1.55;
}
/* ==========================================================
   COMMENT REPORT BUTTON
   ========================================================== */

.comment-report-btn {
    border: none;
    background: transparent;
    color: #999;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 7px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
            background 0.2s ease,
            color 0.2s ease,
            transform 0.2s ease;
}

.comment-report-btn:hover {
    background: rgba(255, 45, 85, 0.12);
    color: #ff8aa2;
    transform: translateY(-1px);
}

.comment-report-btn i {
    font-size: 11px;
}

.comment-item:target {
    border-radius: 18px;
    background: rgba(255, 45, 85, 0.08);
    box-shadow:
            0 0 0 1px rgba(255, 45, 85, 0.20),
            0 12px 30px rgba(255, 45, 85, 0.12);
    scroll-margin-top: 100px;
}
.ghp-player-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;background:rgba(2,6,23,.94);border-top:1px solid rgba(148,163,184,.18)}.ghp-player-options label{display:flex;align-items:center;gap:7px;color:#cbd5e1;font-size:.78rem}.ghp-player-options select,.ghp-player-options button{border:1px solid rgba(148,163,184,.25);border-radius:8px;background:#111827;color:#fff;padding:7px 9px}.ghp-player-options button{margin-left:auto;cursor:pointer}.ghp-video-chapters{margin:16px 0;padding:16px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:rgba(15,23,42,.72)}.ghp-video-chapters__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.ghp-video-chapters__header h2{font-size:1rem;margin:0;color:#fff}.ghp-video-chapters__header span{color:#94a3b8;font-size:.8rem}.ghp-video-chapters__list{display:flex;gap:8px;overflow:auto;padding-bottom:3px}.ghp-video-chapters__list button{display:grid;grid-template-columns:auto minmax(120px,1fr);gap:8px;text-align:left;white-space:nowrap;border:1px solid rgba(148,163,184,.2);border-radius:9px;background:#111827;color:#e2e8f0;padding:9px 11px;cursor:pointer}.ghp-video-chapters__list button:hover{border-color:#8b5cf6}.ghp-video-chapters__list time{color:#c4b5fd;font-variant-numeric:tabular-nums}@media(max-width:640px){.ghp-player-options button{margin-left:0}.ghp-video-chapters{padding:12px}}
