:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f3f5;
    --bg-navbar: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f7f7f7;
    --accent: #e21b12;
    --accent-hover: #ff321f;
    --accent-red: #e21b12;
    --text-main: #050505;
    --text-muted: #646a73;
    --border: #d9dce1;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    --font: "Roboto", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.notice-bar {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    background: #f7f7f7;
    color: #111;
    font-weight: 800;
    text-align: center;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.top-line {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 0.85rem 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.03em;
}

.brand-ai {
    color: #050505;
}

.brand-x {
    min-width: 0.92em;
    height: 0.92em;
    margin: 0 0.07em;
    padding: 0 0.12em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    line-height: 1;
    transform: skewX(-10deg);
    border-radius: 2px;
}

.brand-x span {
    display: inline-block;
    transform: skewX(10deg);
}


.brand-tube {
    color: var(--accent);
}

.language-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
}

.language-control label {
    font-size: 0.82rem;
}

.language-control select {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
    color: var(--text-main);
    padding: 0 0.45rem;
    font-weight: 700;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    flex: 1;
    max-width: 520px;
    display: grid;
    grid-template-columns: 1fr 48px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
}

.search-form input {
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 0.95rem;
    background: transparent;
    color: var(--text-main);
}

.search-form button {
    border: 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.search-symbol {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.header-link {
    color: var(--text-main);
    font-weight: 800;
}

.header-link:hover,
.back-link:hover {
    color: var(--accent);
}

.category-nav {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 0 15px 0.8rem;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.nav-chip {
    height: 36px;
    padding: 0 0.9rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-secondary);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.nav-chip.active,
.nav-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 1.25rem 15px 2rem;
}

.section-head {
    min-height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head h1 {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.1;
}

.section-head p {
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.sort-pill {
    height: 34px;
    padding: 0 0.85rem;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    background: var(--bg-secondary);
    color: var(--accent);
    font-weight: 900;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

.home-sections {
    display: grid;
    gap: 2.25rem;
}

.content-section {
    display: grid;
    gap: 1rem;
}

.section-title-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-title-row h2 {
    position: relative;
    padding-left: 0.55rem;
    font-size: 1.25rem;
    line-height: 1.2;
}

.section-title-row h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12rem;
    width: 3px;
    height: 1.15rem;
    background: var(--accent);
}

.view-all-link {
    color: var(--text-main);
    font-weight: 900;
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--accent);
}

.section-grid {
    width: 100%;
}

.video-card {
    display: block;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.video-card:hover {
    background: var(--bg-hover);
    border-color: rgba(226, 27, 18, 0.45);
    transform: translateY(-2px);
}

.thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050507;
    overflow: hidden;
}

.thumb-box img,
.side-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.duration {
    position: absolute;
    right: 7px;
    bottom: 7px;
    min-width: 44px;
    height: 22px;
    padding: 0 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 800;
}

.card-play-button,
.detail-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(226, 27, 18, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.card-play-button {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    opacity: 0.96;
    pointer-events: none;
}

.card-play-button span,
.detail-play-button span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid #fff;
}

.card-body {
    min-height: 78px;
    padding: 0.62rem 0.72rem 0.68rem;
    text-align: center;
}

.card-body h2 {
    min-height: 38px;
    font-size: 0.9rem;
    line-height: 1.32;
    font-weight: 800;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-button {
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 900;
}

.page-button.active,
.page-button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 260px;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 800;
}

.watch-layout {
    display: block;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--border);
    overflow: hidden;
}

.main-video,
.embed-frame {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.main-video {
    object-fit: contain;
}

.embed-frame {
    display: none;
    border: 0;
}

.player-frame.has-embed .embed-frame {
    display: block;
}

.player-frame.has-embed .main-video,
.player-frame.has-embed .detail-play-button {
    display: none;
}

.detail-play-button {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.detail-play-button span {
    border-top-width: 16px;
    border-bottom-width: 16px;
    border-left-width: 24px;
}

.player-frame.is-playing .detail-play-button {
    display: none;
}

.video-details,
.sidebar {
    margin-top: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1rem;
}

.video-details h1 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    line-height: 1.18;
}

.meta-row {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--text-muted);
}

.meta-row span {
    padding: 0.25rem 0.48rem;
    border-radius: 3px;
    background: #f0f1f3;
}

.tag-list {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag-list span {
    padding: 0.28rem 0.56rem;
    border-radius: 999px;
    background: rgba(226, 27, 18, 0.08);
    color: var(--accent);
    font-weight: 800;
}

.download-link {
    width: fit-content;
    margin-top: 0.9rem;
    min-height: 38px;
    padding: 0 0.85rem;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}

.sidebar {
    margin-top: 1rem;
}

.sidebar h2 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.side-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem 1rem;
}

.side-item {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 0.65rem;
}

.side-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #050507;
    overflow: hidden;
}

.side-item h3 {
    font-size: 0.92rem;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-item p {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.site-footer {
    margin-top: 2rem;
    padding: 1.4rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 700px) {
    .top-line {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form {
        max-width: none;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.72rem;
    }

    .card-play-button {
        width: 50px;
        height: 50px;
    }

    .detail-play-button {
        width: 74px;
        height: 74px;
    }
}

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

    .side-item {
        grid-template-columns: 112px minmax(0, 1fr);
    }
}
