/* templates/assets/style.css */
:root{
    --bg:#0b1220;
    --bg-soft:#121a2b;
    --bg-card:#131c2e;
    --line:#24304a;
    --text:#e7edf7;
    --text-soft:#9aa8bf;
    --primary:#3b82f6;
    --primary-strong:#2563eb;
    --accent:#22c55e;
    --danger:#ef4444;
    --shadow:0 12px 36px rgba(0,0,0,.25);
    --radius-lg:18px;
    --radius-md:14px;
    --radius-sm:10px;
    --container:1200px;
}

*{
    box-sizing:border-box;
}

html{
    -webkit-text-size-adjust:100%;
}

body{
    margin:0;
    background:linear-gradient(180deg,#0b1220 0%,#0f172a 100%);
    color:var(--text);
    font:14px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
    word-break:break-word;
}

img{
    display:block;
    max-width:100%;
}

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

button,
input{
    font:inherit;
}

.site-wrapper{
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

.site-main{
    flex:1;
}

.container{
    width:100%;
    max-width:calc(var(--container) + 32px);
    margin:0 auto;
    padding:0 16px;
}

.site-header{
    position:relative;
    z-index:20;
    background:rgba(11,18,32,.92);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(255,255,255,.06);
}

.header-inner{
    padding:16px 16px 14px;
}

.header-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:14px;
}

.site-brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.site-brand__logo{
    width:40px;
    height:40px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--primary),#60a5fa);
    color:#fff;
    font-size:18px;
    box-shadow:var(--shadow);
    flex:0 0 40px;
}

.site-brand__text{
    font-size:24px;
    font-weight:800;
    letter-spacing:.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.search-form{
    width:100%;
    max-width:460px;
    display:flex;
    gap:10px;
}

.search-input{
    min-width:0;
    flex:1;
    height:44px;
    padding:0 16px;
    border:none;
    outline:none;
    border-radius:999px;
    background:#fff;
    color:#111827;
}

.search-input::placeholder{
    color:#6b7280;
}

.search-btn{
    border:none;
    outline:none;
    cursor:pointer;
    height:44px;
    padding:0 20px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--primary),var(--primary-strong));
    color:#fff;
    font-weight:700;
    white-space:nowrap;
}

.main-nav{
    overflow:hidden;
}

.nav-scroll{
    display:flex;
    align-items:center;
    gap:10px;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
}

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

.nav-item{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:74px;
    height:38px;
    padding:0 16px;
    border-radius:999px;
    background:rgba(255,255,255,.05);
    color:var(--text);
    border:1px solid rgba(255,255,255,.06);
    white-space:nowrap;
}

.nav-item:hover{
    background:rgba(59,130,246,.18);
    border-color:rgba(59,130,246,.35);
}

.hero-section{
    padding:18px 0 8px;
}

.hero-slider{
    overflow:hidden;
    border-radius:24px;
    box-shadow:var(--shadow);
}

.hero-track{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:0;
}

.hero-slide{
    position:relative;
    min-height:320px;
    background:#0f172a;
    overflow:hidden;
}

.hero-slide__image{
    position:absolute;
    inset:0;
}

.hero-slide__image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.hero-slide__overlay{
    position:relative;
    z-index:2;
    height:100%;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    gap:10px;
    padding:24px;
    background:linear-gradient(180deg,rgba(0,0,0,.08) 0%,rgba(0,0,0,.78) 100%);
}

.hero-slide__meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.hero-slide__meta span{
    display:inline-flex;
    align-items:center;
    height:28px;
    padding:0 10px;
    border-radius:999px;
    background:rgba(255,255,255,.14);
    font-size:12px;
}

.hero-slide h2{
    margin:0;
    font-size:28px;
    line-height:1.3;
}

.hero-slide p{
    margin:0;
    color:rgba(255,255,255,.82);
    font-size:14px;
    max-width:720px;
}

.section-block{
    padding:20px 0;
}

.section-alt{
    background:rgba(255,255,255,.02);
}

.section-inner{
    padding:10px 0 0;
}

.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

.section-head h2{
    margin:0;
    font-size:24px;
    line-height:1.3;
}

.section-more{
    color:#93c5fd;
    font-size:14px;
}

.vod-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:18px;
}

.vod-card{
    display:flex;
    flex-direction:column;
    min-width:0;
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,.06);
    border-radius:var(--radius-lg);
    overflow:hidden;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.vod-card:hover{
    transform:translateY(-4px);
    border-color:rgba(59,130,246,.35);
    box-shadow:0 16px 36px rgba(0,0,0,.28);
}

.vod-card__thumb{
    position:relative;
    aspect-ratio:2 / 3;
    overflow:hidden;
    background:#0f172a;
}

.vod-card__thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.vod-badge{
    position:absolute;
    left:10px;
    right:10px;
    bottom:10px;
    min-height:28px;
    padding:5px 10px;
    border-radius:999px;
    background:rgba(0,0,0,.68);
    color:#fff;
    font-size:12px;
    line-height:18px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    text-align:center;
}

.vod-card__body{
    padding:14px;
    min-width:0;
}

.vod-title{
    margin:0 0 8px;
    font-size:16px;
    line-height:1.5;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    min-height:48px;
}

.vod-desc{
    margin:0 0 10px;
    color:var(--text-soft);
    font-size:13px;
    line-height:1.7;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
    min-height:66px;
}

.vod-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    color:var(--text-soft);
    font-size:12px;
}

.vod-meta span{
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    padding:2px 0;
}

.page-banner{
    padding:24px 0 8px;
}

.page-banner__content{
    padding:28px 24px;
    border-radius:24px;
    background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(34,197,94,.12));
    border:1px solid rgba(255,255,255,.08);
}

.page-banner__content h1{
    margin:0 0 8px;
    font-size:30px;
    line-height:1.3;
}

.page-banner__content p{
    margin:0;
    color:var(--text-soft);
}

.highlight{
    color:#fcd34d;
}

.search-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:20px;
}

.sidebar{
    min-width:0;
}

.side-card{
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,.06);
    border-radius:var(--radius-lg);
    padding:18px;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.side-card__title{
    margin-bottom:14px;
    font-size:18px;
    font-weight:800;
}

.tag-cloud{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.tag-cloud a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:8px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    color:var(--text);
    border:1px solid rgba(255,255,255,.06);
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.tag-cloud.large a{
    min-height:42px;
    padding:10px 16px;
}

.pagination{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:24px;
}

.page-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:42px;
    padding:0 14px;
    border-radius:12px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.06);
    color:var(--text);
}

.page-link:hover{
    background:rgba(59,130,246,.15);
    border-color:rgba(59,130,246,.35);
}

.play-page{
    padding:20px 0;
}

.play-layout{
    display:block;
}

.play-main{
    min-width:0;
}

.player-card,
.detail-card,
.episode-card{
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,.06);
    border-radius:24px;
    padding:20px;
    margin-bottom:20px;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.player-head{
    margin-bottom:16px;
}

.player-head h1{
    margin:0 0 10px;
    font-size:30px;
    line-height:1.35;
}

.player-submeta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    color:var(--text-soft);
    font-size:13px;
}

.player-submeta span{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:0 12px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
}

.player-box{
    overflow:hidden;
    border-radius:18px;
    background:#000;
}

.video-shell{
    position:relative;
    width:100%;
    aspect-ratio:16 / 9;
    background:#000;
}

.video-shell video{
    width:100%;
    height:100%;
    background:#000;
    display:block;
}

.video-fallback{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:15px;
    pointer-events:none;
}

.detail-card{
    display:grid;
    grid-template-columns:260px minmax(0,1fr);
    gap:20px;
}

.detail-poster{
    border-radius:18px;
    overflow:hidden;
    background:#0f172a;
    aspect-ratio:2 / 3;
}

.detail-poster img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.detail-content{
    min-width:0;
}

.detail-content h2{
    margin:0 0 14px;
    font-size:28px;
    line-height:1.35;
}

.detail-meta{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 16px;
    margin-bottom:16px;
}

.detail-meta span{
    color:var(--text-soft);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.detail-meta strong{
    color:var(--text);
    font-weight:700;
}

.detail-desc{
    color:#d3dceb;
    line-height:1.9;
}

.episode-list{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.episode-item{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:100px;
    max-width:100%;
    min-height:42px;
    padding:0 14px;
    border-radius:12px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.06);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.episode-item:hover{
    background:rgba(59,130,246,.15);
    border-color:rgba(59,130,246,.35);
}

.rank-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:18px;
}

.rank-item{
    display:grid;
    grid-template-columns:220px minmax(0,1fr);
    gap:18px;
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,.06);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.rank-item__thumb{
    background:#0f172a;
    aspect-ratio:2 / 3;
}

.rank-item__thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.rank-item__body{
    padding:20px 20px 20px 0;
    min-width:0;
}

.rank-item__body h3{
    margin:0 0 10px;
    font-size:24px;
    line-height:1.4;
}

.rank-item__body p{
    margin:0 0 14px;
    color:var(--text-soft);
    line-height:1.8;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
}

.rank-item__meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    color:var(--text-soft);
}

.hot-layout{
    display:block;
}

.hot-keywords-panel{
    margin-bottom:20px;
}

.site-footer{
    margin-top:24px;
    padding:30px 0 36px;
    border-top:1px solid rgba(255,255,255,.06);
    background:rgba(0,0,0,.18);
}

.footer-title{
    margin-bottom:12px;
    font-size:18px;
    font-weight:800;
}

.friend-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:18px;
}

.friend-links a{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:8px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    color:var(--text-soft);
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.footer-nav{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-bottom:14px;
}

.footer-nav a{
    color:#93c5fd;
}

.footer-copy{
    color:var(--text-soft);
    font-size:13px;
}

.footer-copy p{
    margin:6px 0;
}

@media (max-width:1100px){
    .vod-grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }

    .search-layout{
        grid-template-columns:1fr;
    }

    .detail-card{
        grid-template-columns:220px minmax(0,1fr);
    }
}

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

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

    .hero-slide{
        min-height:260px;
    }

    .hero-slide h2{
        font-size:22px;
    }

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

    .detail-card{
        grid-template-columns:1fr;
    }

    .detail-poster{
        max-width:240px;
    }

    .detail-meta{
        grid-template-columns:1fr;
    }

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

@media (max-width:640px){
    .container{
        padding:0 12px;
    }

    .header-inner{
        padding:14px 12px 12px;
    }

    .site-brand__text{
        font-size:20px;
    }

    .search-input,
    .search-btn{
        height:42px;
    }

    .hero-section{
        padding:14px 0 6px;
    }

    .hero-slide{
        min-height:220px;
    }

    .hero-slide__overlay{
        padding:16px;
    }

    .hero-slide h2{
        font-size:18px;
    }

    .section-block{
        padding:16px 0;
    }

    .section-head h2{
        font-size:20px;
    }

    .page-banner__content{
        padding:22px 18px;
        border-radius:18px;
    }

    .page-banner__content h1{
        font-size:24px;
    }

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

    .vod-card__body{
        padding:12px;
    }

    .vod-title{
        font-size:15px;
        min-height:44px;
    }

    .vod-desc{
        min-height:58px;
        -webkit-line-clamp:2;
    }

    .player-card,
    .detail-card,
    .episode-card{
        padding:14px;
        border-radius:18px;
    }

    .player-head h1{
        font-size:22px;
    }

    .detail-content h2{
        font-size:22px;
    }

    .episode-item{
        min-width:calc(50% - 6px);
    }

    .rank-item{
        grid-template-columns:1fr;
    }

    .rank-item__body{
        padding:0 14px 16px;
    }
}

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

    .search-form{
        gap:8px;
    }

    .search-btn{
        padding:0 16px;
    }

    .episode-item{
        min-width:100%;
    }
}