/* templates/assets/style.css */
:root{
  --bg:#0b1120;
  --bg-soft:#111827;
  --card:#172033;
  --card-2:#0f172a;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);
  --text:#e5eefc;
  --text-soft:#9fb0d1;
  --text-faint:#7183a6;
  --primary:#22c55e;
  --primary-hover:#16a34a;
  --danger:#ef4444;
  --shadow:0 18px 40px rgba(0,0,0,.24);
  --radius:18px;
  --radius-sm:12px;
  --container:1200px;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

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

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34,197,94,.08), transparent 22%),
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 18%),
    var(--bg);
  color:var(--text);
  line-height:1.6;
}

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

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

button,
input{
  font:inherit;
}

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

.site-main{
  flex:1;
}

.container{
  width:min(var(--container), calc(100% - 32px));
  margin:0 auto;
}

.site-header{
  position:relative;
  z-index:20;
  border-bottom:1px solid var(--line);
  background:rgba(11,17,32,.92);
  backdrop-filter:blur(14px);
}

.header-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 0 14px;
}

.site-brand{
  min-width:0;
  flex:1;
}

.brand-link{
  display:inline-flex;
  align-items:center;
  gap:14px;
  max-width:100%;
}

.brand-logo{
  width:44px;
  height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#22c55e,#3b82f6);
  color:#fff;
  font-size:18px;
  box-shadow:var(--shadow);
  flex:0 0 auto;
}

.brand-text{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.brand-text strong{
  font-size:24px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand-text em{
  color:var(--text-faint);
  font-style:normal;
  font-size:13px;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.site-search{
  width:100%;
  max-width:420px;
  flex:0 0 420px;
}

.search-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  border-radius:999px;
}

.search-input{
  flex:1;
  min-width:0;
  height:42px;
  padding:0 14px;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
}

.search-input::placeholder{
  color:var(--text-faint);
}

.search-btn{
  border:none;
  min-width:92px;
  height:42px;
  padding:0 18px;
  border-radius:999px;
  background:var(--primary);
  color:#071018;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
}

.search-btn:hover{
  background:var(--primary-hover);
}

.site-nav{
  padding:0 0 16px;
}

.nav-scroll{
  display:flex;
  gap:10px;
  overflow-x:auto;
  scrollbar-width:none;
}

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

.nav-item{
  flex:0 0 auto;
  padding:10px 16px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid transparent;
  color:var(--text-soft);
  white-space:nowrap;
  transition:.2s ease;
}

.nav-item:hover{
  color:#fff;
  border-color:var(--line-strong);
  background:rgba(255,255,255,.08);
}

.section{
  padding:28px 0;
}

.section-first{
  padding-top:22px;
}

.section-last{
  padding-bottom:40px;
}

.section-inline{
  padding-top:10px;
}

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

.section-title{
  margin:0;
  font-size:24px;
  line-height:1.2;
  font-weight:800;
}

.section-title.small{
  font-size:18px;
}

.section-desc{
  color:var(--text-faint);
  font-size:14px;
}

.section-more{
  color:var(--text-soft);
  font-size:14px;
}

.section-more:hover{
  color:#fff;
}

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

.page-banner-inner{
  border:1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(34,197,94,.10), rgba(59,130,246,.06)),
    rgba(255,255,255,.03);
  border-radius:24px;
  padding:26px 24px;
  box-shadow:var(--shadow);
}

.page-banner-text h1{
  margin:0 0 10px;
  font-size:32px;
  line-height:1.2;
}

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

.highlight{
  color:#fff;
  font-weight:700;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:22px;
}

.hero-main,
.hero-side,
.side-panel,
.player-card,
.episode-card,
.detail-card,
.rank-item,
.video-card,
.search-main,
.search-side,
.footer-links{
  min-width:0;
}

.hero-slider{
  position:relative;
}

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

.hero-card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:22px;
  background:var(--card-2);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  aspect-ratio:16/10;
}

.hero-cover,
.hero-cover img{
  width:100%;
  height:100%;
}

.hero-cover img{
  object-fit:cover;
}

.hero-mask{
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.05) 60%);
}

.hero-info{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
  z-index:2;
}

.hero-info strong{
  display:block;
  font-size:22px;
  line-height:1.35;
  margin-bottom:8px;
}

.hero-info em{
  display:block;
  font-style:normal;
  color:rgba(255,255,255,.78);
  font-size:14px;
}

.side-panel{
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow);
}

.sticky-panel{
  position:sticky;
  top:20px;
}

.keyword-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.keyword-item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:var(--text-soft);
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.keyword-item:hover{
  color:#fff;
  border-color:var(--line-strong);
}

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

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

.video-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
}

.video-thumb{
  position:relative;
  display:block;
  aspect-ratio:3/4;
  background:#0f172a;
  overflow:hidden;
}

.video-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.video-card:hover .video-thumb img{
  transform:scale(1.06);
}

.video-badge{
  position:absolute;
  top:10px;
  left:10px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:calc(100% - 20px);
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  color:#fff;
  background:rgba(15,23,42,.84);
  border:1px solid rgba(255,255,255,.12);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.video-play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:2;
  min-width:96px;
  height:40px;
  padding:0 18px;
  border-radius:999px;
  background:rgba(34,197,94,.92);
  color:#081018;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:.25s ease;
}

.video-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.42), transparent 60%);
}

.video-card:hover .video-play{
  opacity:1;
}

.video-body{
  padding:14px 14px 16px;
  min-width:0;
}

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

.video-title a:hover{
  color:#fff;
}

.video-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  color:var(--text-faint);
  font-size:13px;
  min-width:0;
}

.video-meta span{
  min-width:0;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

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

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

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

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

.page-btn:hover{
  color:#fff;
  border-color:var(--line-strong);
}

.play-section{
  padding:24px 0 40px;
}

.play-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:22px;
}

.player-card,
.episode-card,
.detail-card{
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:22px;
  padding:20px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
}

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

.player-title{
  margin:0 0 8px;
  font-size:30px;
  line-height:1.3;
  word-break:break-word;
}

.player-sub{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  color:var(--text-faint);
  font-size:14px;
}

.player-wrap{
  position:relative;
  width:100%;
}

.player-stage{
  position:relative;
  background:#000;
  border-radius:18px;
  overflow:hidden;
  aspect-ratio:16/9;
  border:1px solid rgba(255,255,255,.06);
}

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

.player-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  text-align:center;
  font-size:15px;
  color:#fff;
  background:linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.65));
  pointer-events:none;
  opacity:0;
  transition:.2s ease;
}

.player-overlay.is-show{
  opacity:1;
}

.player-tips{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  color:var(--text-faint);
  font-size:13px;
}

.episode-list{
  display:grid;
  grid-template-columns:repeat(6, minmax(0,1fr));
  gap:12px;
}

.episode-item{
  min-width:0;
  height:42px;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:12px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:var(--text-soft);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.episode-item:hover{
  color:#fff;
  border-color:var(--line-strong);
}

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

.detail-poster img{
  width:100%;
  aspect-ratio:3/4;
  object-fit:cover;
  border-radius:16px;
  border:1px solid var(--line);
}

.detail-title{
  margin:0 0 14px;
  font-size:26px;
  line-height:1.35;
}

.detail-meta{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px 18px;
}

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

.detail-meta li span{
  color:#fff;
}

.detail-desc{
  margin-top:16px;
  color:var(--text-soft);
  line-height:1.9;
  word-break:break-word;
}

.small-card .video-title{
  min-height:auto;
  margin-bottom:0;
  font-size:14px;
}

.side-video-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.side-video-item{
  display:flex;
  gap:12px;
  min-width:0;
  align-items:center;
}

.side-video-cover{
  width:84px;
  flex:0 0 84px;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:3/4;
  border:1px solid var(--line);
}

.side-video-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.side-video-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.side-video-text strong{
  font-size:14px;
  line-height:1.6;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  word-break:break-word;
}

.side-video-text em{
  font-style:normal;
  color:var(--text-faint);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.rank-list{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.rank-item{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:18px;
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.rank-cover{
  display:block;
  width:100%;
  overflow:hidden;
  border-radius:16px;
  aspect-ratio:3/4;
  background:#0f172a;
}

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

.rank-title{
  margin:0 0 10px;
  font-size:22px;
  line-height:1.4;
}

.rank-meta,
.rank-stats{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  color:var(--text-faint);
  font-size:14px;
}

.rank-desc{
  margin:14px 0;
  color:var(--text-soft);
  line-height:1.85;
  word-break:break-word;
}

.site-footer{
  border-top:1px solid var(--line);
  margin-top:16px;
  background:rgba(255,255,255,.03);
}

.footer-links{
  padding:22px 0 10px;
}

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

.friend-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
}

.friend-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:var(--text-soft);
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.friend-links a:hover{
  color:#fff;
}

.footer-meta{
  padding:10px 0 28px;
  color:var(--text-faint);
  font-size:13px;
}

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

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

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

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

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

  .play-side{
    order:2;
  }

  .episode-list{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }
}

@media (max-width: 860px){
  .container{
    width:min(var(--container), calc(100% - 24px));
  }

  .header-main{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
  }

  .site-search{
    max-width:none;
    flex:auto;
  }

  .brand-text strong{
    font-size:22px;
  }

  .page-banner-text h1{
    font-size:28px;
  }

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

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

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

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

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

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

  .section-title{
    font-size:20px;
  }

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

  .page-banner-inner{
    padding:20px 16px;
    border-radius:20px;
  }

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

  .hero-track{
    grid-template-columns:1fr;
  }

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

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

  .search-box{
    padding:6px;
  }

  .search-input{
    height:40px;
    padding:0 12px;
  }

  .search-btn{
    min-width:78px;
    height:40px;
    padding:0 14px;
  }

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

  .player-title{
    font-size:24px;
  }

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

  .episode-item{
    height:40px;
    font-size:13px;
  }

  .footer-links{
    padding-top:18px;
  }
}

@media (max-width: 480px){
  body{
    overflow-x:hidden;
  }

  .container{
    width:min(var(--container), calc(100% - 20px));
  }

  .brand-logo{
    width:40px;
    height:40px;
    border-radius:12px;
  }

  .brand-text strong{
    font-size:20px;
  }

  .site-nav{
    padding-bottom:14px;
  }

  .nav-item{
    padding:9px 14px;
    font-size:14px;
  }

  .video-grid,
  .compact-grid{
    grid-template-columns:1fr;
  }

  .video-thumb{
    aspect-ratio:16/9;
  }

  .hero-card{
    aspect-ratio:16/11;
  }

  .player-stage{
    border-radius:14px;
  }

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

  .keyword-list,
  .friend-links,
  .pagination{
    gap:8px;
  }

  .keyword-item,
  .friend-links a{
    max-width:100%;
  }
}