:root {
    --bg: #000000;
    --bg-soft: #0a0a0a;
    --bg-card: #0d0d0d;
    --bg-card-2: #131313;
    --border: #242424;
    --border-soft: #1a1a1a;
    --text: #ffffff;
    --muted: #b8b8b8;
    --red: #b50000;
    --red-dark: #7d0000;
    --yellow: #ffcc00;
    --black-2: #111111;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
}

.container {
    width: min(1600px, calc(100% - 24px));
    margin: 0 auto;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #000;
    border-bottom: 1px solid var(--border-soft);
}

.topbar {
    background: var(--red);
    border-bottom: 1px solid var(--red-dark);
}

.header-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.site-logo {
    flex: 0 0 auto;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.header-search {
    flex: 1 1 auto;
    max-width: 780px;
    margin: 0 10px;
}

.header-search-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.header-select {
    width: 90px;
    min-width: 90px;
    border-radius: 0;
    border: 1px solid #2e2e2e;
    background: #1a1a1a;
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    box-shadow: none;
}

.header-select:focus {
    background: #1a1a1a;
    color: #fff;
    box-shadow: none;
    border-color: #2e2e2e;
}

.header-input {
    flex: 1 1 auto;
    border-radius: 0;
    border: 1px solid #2e2e2e;
    border-left: 0;
    border-right: 0;
    background: #ffffff;
    color: #000000;
    padding: 10px 14px;
    outline: none;
    box-shadow: none;
    min-width: 0;
}

.header-input:focus {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
    outline: none;
    border-color: #2e2e2e;
}

.header-input::placeholder {
    color: #777;
}

.header-search-btn {
    width: 54px;
    min-width: 54px;
    border: 1px solid #2e2e2e;
    background: #202020;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-link {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.top-link:hover {
    color: #ffe082;
}

/* MAIN */
.main-container {
    padding-top: 14px;
    padding-bottom: 24px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

/* SIDEBAR */
.sidebar-box {
    background: #080808;
    border: 1px solid var(--border-soft);
}

.sidebar-block {
    border-bottom: 1px solid #161616;
    padding: 10px 0;
}

.sidebar-block:last-child {
    border-bottom: 0;
}

.sidebar-title {
    padding: 0 12px 10px;
    color: var(--yellow);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-link {
    display: block;
    padding: 9px 12px;
    color: #fff;
    font-size: 14px;
    border-top: 1px solid #111;
    transition: background .2s ease, color .2s ease;
}

.sidebar-link:hover {
    background: #101010;
    color: var(--yellow);
}

/* CONTENT */
.content-area {
    min-width: 0;
}

/* SECTION */
.tube-section {
    background: #000;
    border: 1px solid #1f1f1f;
    margin-bottom: 16px;
}

.tube-section-head {
    background: linear-gradient(180deg, #1a1a1a 0%, #050505 100%);
    border-bottom: 1px solid #2a2a2a;
    padding: 10px 14px;
}

.tube-section-head h2 {
    margin: 0;
    color: var(--yellow);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

/* GRID */
.tube-grid {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.tube-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* VIDEO CARD */
.video-card {
    background: transparent;
    transition: opacity .2s ease;
}

.video-card:hover {
    opacity: .96;
}

.video-media {
    position: relative;
    height: 165px;
    overflow: hidden;
    background: #000;
    border: 1px solid #202020;
    border-radius: 0;
}

.video-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .25s ease;
}

.video-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    display: block;
    transition: opacity .25s ease;
}

.video-card.is-previewing video {
    opacity: 1;
}

.video-card.is-previewing img {
    opacity: 0;
}

.video-play-icon {
    display: none;
}

.video-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 0;
}

.video-body {
    margin-top: 6px;
}

.video-title {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    min-height: 38px;
}

.video-title:hover {
    color: var(--yellow);
}

.video-meta {
    margin-top: 4px;
    color: #c4c4c4;
    font-size: 12px;
    line-height: 1.35;
    opacity: 1;
}

/* PAGINATION */
.pagination {
    justify-content: center;
    padding: 0 14px 14px;
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
}

.page-link {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 0 !important;
    padding: 8px 12px;
    box-shadow: none !important;
}

.page-link:hover {
    background: #1b1b1b;
    color: var(--yellow);
}

.page-item.active .page-link {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* FOOTER */
.site-footer {
    margin-top: 24px;
    padding: 20px 0;
    border-top: 1px solid #1f1f1f;
    text-align: center;
    color: #999;
    opacity: 1;
}

/* VIDEO DETAIL PAGE */
.yt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.yt-main,
.yt-sidebar {
    min-width: 0;
}

.yt-player-shell {
    width: 100%;
}

.fixed-player {
    width: 100%;
    background: #000;
    border: 1px solid #222;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    box-shadow: none;
}

.fixed-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.yt-content-box,
.yt-comments-box,
.yt-sidebar-box {
    margin-top: 16px;
    background: #0b0b0b;
    border: 1px solid #1f1f1f;
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
}

.yt-title {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    color: #fff;
}

.yt-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.yt-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #b9b9b9;
    font-size: 14px;
}

.yt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.yt-btn,
.yt-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a1a;
    border: 1px solid #343434;
    color: #fff;
    padding: 10px 14px;
    border-radius: 0;
    font-weight: 700;
    cursor: pointer;
}

.yt-btn:hover,
.yt-link-btn:hover {
    color: var(--yellow);
    background: #202020;
}

.yt-like-btn {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.yt-like-btn:hover {
    color: #fff;
    background: #930000;
}

.yt-description-box {
    margin-top: 16px;
    background: #101010;
    border: 1px solid #1f1f1f;
    border-radius: 0;
    padding: 14px;
}

.yt-description-header {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--yellow);
}

.yt-description-text {
    color: #ddd;
    line-height: 1.7;
    white-space: pre-line;
}

.yt-section-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
    color: var(--yellow);
}

.yt-comment-form {
    margin-bottom: 22px;
}

.yt-comment-list {
    display: grid;
    gap: 14px;
}

.yt-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.yt-comment-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 0;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.yt-comment-body {
    min-width: 0;
}

.yt-comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
    color: #a7a7a7;
    font-size: 13px;
}

.yt-comment-text {
    color: #fff;
    line-height: 1.6;
}

.yt-related-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
    color: #fff;
    text-decoration: none;
}

.yt-related-thumb img {
    width: 100%;
    height: 82px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border: 1px solid #202020;
}

.yt-related-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.yt-related-title:hover {
    color: var(--yellow);
}

.yt-related-meta {
    font-size: 12px;
    color: #a9a9a9;
}

/* FORM GLOBAL */
.form-control,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 0;
    border: 1px solid #2c2c2c;
    background: #111;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    background: #111;
    color: #fff;
    border-color: #444;
    outline: none;
    box-shadow: none;
}

.form-control::placeholder {
    color: #888;
}

/* RESPONSIVE */
@media (max-width: 1399px) {
    .tube-grid-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .yt-layout {
        grid-template-columns: 1fr;
    }

    .yt-sidebar {
        order: 2;
    }
}

@media (max-width: 1100px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-box {
        display: none;
    }

    .tube-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100%, calc(100% - 16px));
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .site-logo {
        font-size: 24px;
    }

    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .header-actions {
        display: none;
    }

    .header-select {
        width: 78px;
        min-width: 78px;
        font-size: 13px;
    }

    .header-search-btn {
        width: 46px;
        min-width: 46px;
    }

    .tube-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .video-media {
        height: 135px;
    }

    .tube-section-head h2 {
        font-size: 18px;
    }

    .yt-title {
        font-size: 22px;
    }

    .yt-related-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .yt-related-thumb img {
        height: 70px;
    }

    .yt-btn,
    .yt-link-btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .tube-grid-5 {
        gap: 10px;
        padding: 10px;
    }

    .video-media {
        height: 120px;
    }

    .video-title {
        font-size: 13px;
        min-height: 34px;
    }

    .video-meta {
        font-size: 11px;
    }
}