:root {
    --watch-page-max: 430px;
    --watch-content-max: 430px;
    --watch-tablet-ad-max: 300px;
    --watch-mobile-ad-width: 300px;
    --watch-gap-y: 6px;
    --watch-bg: #edf3fb;
    --watch-panel: #ffffff;
    --watch-line: rgba(15, 23, 42, .18);
    --watch-text: #0f172a;
    --watch-muted: #64748b;
}

html {
    min-width: 0;
    min-height: 100%;
    background: #dce6f2;
    color: var(--watch-text);
}

body {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    height: auto;
    margin: 0;
    overflow-x: hidden;
    background: var(--watch-bg);
    color: var(--watch-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img,
video,
iframe {
    max-width: 100%;
}

.watch-shell.detail-page {
    width: 100%;
    max-width: var(--watch-page-max);
    margin: 0 auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 15px;
}

.watch-site-header {
    width: min(100%, var(--watch-content-max));
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0 0 var(--watch-gap-y);
    padding: 10px;
    border: 1px solid var(--watch-line);
    background: rgba(255, 255, 255, .97);
}

.watch-home-arrow {
    position: relative;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, .34);
    border-radius: 999px;
    background: #1a1a1a;
    color: transparent;
    font-size: 0;
    line-height: 0;
    font-weight: 700;
    text-decoration: none;
}

.watch-home-arrow::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 18px;
    width: 15px;
    height: 2px;
    border-radius: 999px;
    background: #d4af37;
}

.watch-home-arrow::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-left: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;
    transform: rotate(45deg);
    transform-origin: center;
}

.watch-search {
    display: flex;
    min-width: 0;
    gap: 8px;
}

.watch-search__input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--watch-line);
    border-radius: 12px;
    outline: 0;
    background: #f8fbff;
    color: var(--watch-text);
    font-size: 14px;
}

.watch-search__input:focus {
    border-color: rgba(36, 107, 254, .52);
    box-shadow: 0 0 0 3px rgba(36, 107, 254, .12);
}

.watch-search__button {
    width: 68px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #246bfe, #d93491);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.watch-shell > .watch-head,
.top-banner-320x100,
.top-banner-320x150,
.ad-grid-180x150,
.detail-native-grid,
.sticky-bottom-banner {
    display: none !important;
}

.detail-block {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

.global-adv-container {
    display: flex;
    width: min(100%, var(--watch-page-max));
    max-width: var(--watch-page-max);
    min-width: 0;
    margin: var(--watch-gap-y) auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px dashed rgba(51, 51, 51, .82);
    border-radius: 8px;
    box-shadow: none;
    background: #f4f6f8;
    color: #1f2a3a;
    text-align: center;
}

.detail-block > .global-adv-container {
    width: 100%;
    max-width: 100%;
    margin: var(--watch-gap-y) auto;
    border: 1px dashed rgba(51, 51, 51, .82);
    border-radius: 8px;
}

.global-adv-container--large {
    min-height: 250px;
    background: #fff3e6;
}

.global-adv-container--strip {
    min-height: 100px;
    background: #eef6ff;
}

.global-adv-placeholder {
    color: #999;
    font-size: 12px;
    line-height: 1.4;
    padding: 20px;
}

.watch-shell .ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    border: 1px dashed #9aa8bb;
    box-shadow: none;
    box-sizing: border-box;
    background: #f4f6f8;
    color: #475569;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
}

.watch-shell .ad-slot > span {
    padding: 0 10px;
}

.adv-top-large,
.adv-bottom-large {
    width: 100%;
    max-width: 100%;
    min-height: 250px;
    height: auto;
}

.adv-above-video,
.adv-below-video {
    width: 100%;
    max-width: 100%;
    min-height: 50px !important;
    height: 50px;
}

.video-player-container,
.watch-main {
    width: min(100%, var(--watch-content-max));
    overflow: hidden;
    background: #060b16;
    margin: 0 0 var(--watch-gap-y);
}

.watch-head--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.video-player-container .player-shell,
.watch-main .player-shell {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-player-container .player-shell video,
.watch-main .player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.recommendation-area {
    width: min(100%, var(--watch-content-max));
    padding: 15px;
    background: var(--watch-panel);
    border: 1px solid var(--watch-line);
}

.recommendation-area h2 {
    margin: 0 0 12px;
    color: var(--watch-text);
    font-size: 20px;
    line-height: 1.2;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.recommendation-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--watch-line);
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.recommendation-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #334155, #7c3aed);
    color: #fff;
    font-weight: 900;
}

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

.recommendation-duration {
    position: absolute;
    left: 6px;
    right: auto;
    bottom: 6px;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 1.2;
}

.recommendation-duration:empty {
    display: none;
}

.recommendation-card p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0;
    padding: 8px;
    overflow: hidden;
    color: var(--watch-muted);
    font-size: 13px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 1023px) and (min-width: 768px) {
    .adv-top-large,
    .adv-bottom-large {
        width: 100%;
    }

    .recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .watch-shell.detail-page {
        padding: 12px;
    }

    .adv-top-large,
    .adv-bottom-large {
        width: 100%;
        min-height: 250px;
        height: auto;
    }

    .adv-above-video,
    .adv-below-video {
        width: 100%;
        height: 50px;
        min-height: 50px !important;
    }

    .video-player-container,
    .watch-main,
    .recommendation-area {
        width: 100%;
    }

    .recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 340px) {
    .watch-shell.detail-page {
        padding-left: 10px;
        padding-right: 10px;
    }
}
