:root {
    --serene-bg: #f5f7fb;
    --serene-card: #ffffff;
    --serene-border: rgba(15, 23, 42, 0.07);
    --serene-accent: #4c7df0;
    --serene-accent-dark: #365fcc;
    --serene-text: #1d2433;
    --serene-muted: #5c6270;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.serene-body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8faff 0%, #f2f4fb 40%, #f5f7fb 100%);
    color: var(--serene-text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.serene-shell {
    width: min(1200px, 100% - 32px);
    margin: 0 auto;
}

.serene-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--serene-border);
}

.serene-header .serene-shell {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 0;
}

.serene-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--serene-text);
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, #7fa0ff, #365fcc);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 600;
    font-size: 20px;
}

.brand-text strong {
    display: block;
    font-size: 17px;
}

.brand-text span {
    font-size: 12px;
    color: var(--serene-muted);
}

.serene-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--serene-muted);
    border: 1px solid transparent;
    transition: all .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--serene-accent);
    border-color: rgba(76, 125, 240, 0.2);
    background: rgba(76, 125, 240, 0.08);
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--serene-card);
    border-radius: 999px;
    border: 1px solid var(--serene-border);
    padding: 4px;
    min-width: 240px;
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 14px;
    outline: none;
}

.search-form button {
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 14px;
    background: var(--serene-accent);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.search-form button:hover {
    background: var(--serene-accent-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    border: none;
    background: transparent;
    padding: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--serene-text);
}

.serene-main {
    padding: 32px 0 60px;
}

.serene-section {
    margin-bottom: 40px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
}

.section-head a {
    font-size: 14px;
    color: var(--serene-accent);
}

.hero-board {
    background: var(--serene-card);
    border-radius: 26px;
    padding: 36px;
    border: 1px solid var(--serene-border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
}

.hero-copy p {
    margin: 0 0 20px;
    color: var(--serene-muted);
    font-size: 15px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-actions a {
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    border: 1px solid var(--serene-border);
}

.hero-actions a.primary {
    background: var(--serene-accent);
    color: #fff;
    border-color: var(--serene-accent);
}

.hero-stats {
    background: rgba(76, 125, 240, 0.06);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(76, 125, 240, 0.15);
}

.hero-stats p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--serene-muted);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.video-card {
    background: var(--serene-card);
    border-radius: 18px;
    border: 1px solid var(--serene-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
}

.card-thumb {
    position: relative;
    display: block;
    padding-top: 140%;
    overflow: hidden;
}

.card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.video-card:hover .card-thumb img {
    transform: scale(1.04);
}

.card-remark {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.card-info {
    padding: 14px 16px 18px;
}

.card-info .title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--serene-text);
}

.card-info .meta {
    font-size: 13px;
    color: var(--serene-muted);
}

.serene-detail-hero {
    background: var(--serene-card);
    border-radius: 26px;
    border: 1px solid var(--serene-border);
    padding: 30px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 26px;
    margin-bottom: 24px;
}

.detail-poster img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.18);
}

.detail-meta h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.detail-tags span {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(76, 125, 240, 0.08);
    color: var(--serene-accent);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
    font-size: 14px;
    color: var(--serene-muted);
}

.detail-grid strong {
    display: block;
    color: var(--serene-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.serene-player {
    background: var(--serene-card);
    border-radius: 24px;
    border: 1px solid var(--serene-border);
    margin-bottom: 24px;
    overflow: hidden;
}

.serene-player .player-screen {
    background: #010a1c;
}

#artplayer-container {
    width: 100%;
    aspect-ratio: 16/9;
}

.serene-player .player-panel {
    padding: 20px 24px 26px;
}

.player-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.panel-block:not(:last-child) {
    margin-bottom: 18px;
}

.episode-list,
.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-btn,
.source-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid var(--serene-border);
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
}

.episode-btn.active,
.source-btn.active {
    background: var(--serene-accent);
    border-color: var(--serene-accent);
    color: #fff;
}

.serene-detail-content {
    background: var(--serene-card);
    border-radius: 24px;
    border: 1px solid var(--serene-border);
    padding: 24px;
    line-height: 1.8;
    color: var(--serene-muted);
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--serene-border);
    text-align: center;
    font-size: 14px;
}

.pagination .active {
    background: var(--serene-accent);
    border-color: var(--serene-accent);
    color: #fff;
}

.empty-state {
    padding: 60px;
    text-align: center;
    background: var(--serene-card);
    border-radius: 24px;
    border: 1px dashed var(--serene-border);
    color: var(--serene-muted);
}

.serene-footer {
    border-top: 1px solid var(--serene-border);
    background: #fff;
    padding: 24px 0 40px;
}

.serene-footer .serene-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--serene-muted);
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .serene-nav {
        position: absolute;
        top: 100%;
        right: 16px;
        flex-direction: column;
        background: #fff;
        padding: 18px;
        border-radius: 18px;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        border: 1px solid var(--serene-border);
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: all .2s ease;
    }

    .serene-nav[data-open="true"] {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .search-form {
        flex: 1;
    }

    .serene-header .serene-shell {
        flex-wrap: wrap;
    }

    .serene-detail-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-board {
        padding: 24px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .search-form {
        width: 100%;
        min-width: auto;
    }
}

