﻿/**
 * Shoutu48 首页 + 列表页共用样式（body.st48）
 * 与 list-page-addon.css（排序标签、分页）配合使用。
 */
:root {
  --st48-bg: #f4f4f1;
  --st48-surface: #ffffff;
  --st48-text: #1a1a1a;
  --st48-muted: #5c5c56;
  --st48-border: rgba(26, 26, 26, 0.08);
  --st48-top: #141414;
  --st48-top-text: #f5f5f3;
  --st48-accent: #e85d04;
  --st48-accent-soft: rgba(232, 93, 4, 0.12);
  --st48-radius: 12px;
  --st48-radius-sm: 8px;
  --st48-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --st48-max: 1200px;
}

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

body.st48 {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--st48-text);
  background: var(--st48-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: only light;
}

.st48 a {
  color: inherit;
  -webkit-tap-highlight-color: rgba(26, 26, 26, 0.06);
}

.st48 button,
.st48 summary {
  -webkit-tap-highlight-color: rgba(26, 26, 26, 0.08);
}

.st48-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- 顶栏 ----- */
.st48-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--st48-top);
  color: var(--st48-top-text);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.st48-top__inner {
  max-width: var(--st48-max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.st48-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.st48-logo__ico {
  display: flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ff8c42 0%, var(--st48-accent) 55%, #c2410c 100%);
  box-shadow: 0 2px 10px rgba(232, 93, 4, 0.45);
}

.st48-logo__ico svg {
  width: 18px;
  height: 18px;
}

.st48-logo__name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 移动端抽屉菜单 */
.st48-mnav {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.st48-mnav__btn {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.st48-mnav__btn::-webkit-details-marker {
  display: none;
}

.st48-mnav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
}

.st48-mnav__burger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.st48-mnav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.st48-mnav__drop {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 86vw);
  height: 100vh;
  z-index: 70;
  background: #1c1c1c;
  padding: max(0.65rem, env(safe-area-inset-top, 0px)) 1.25rem 1.5rem;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.st48-mnav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.st48-mnav__hint {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 245, 243, 0.45);
}

.st48-mnav__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.5rem -0.35rem 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 243, 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.st48-mnav__close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.st48-mnav__close:focus {
  outline: none;
}

.st48-mnav__close:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.85);
  outline-offset: 2px;
}

.st48-mnav__drop a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--st48-radius-sm);
  color: var(--st48-top-text);
  text-decoration: none;
  font-weight: 500;
}

.st48-mnav__drop a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* PC 主导航 */
.st48-nav-wrap {
  display: none;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.st48-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
}

.st48-nav__a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(245, 245, 243, 0.82);
  white-space: nowrap;
}

.st48-nav__a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.st48-nav__a.is-on {
  color: #111;
  background: #fff;
}

/* 搜索 */
.st48-search {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 220px;
  max-width: 280px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
}

.st48-search__ico {
  display: flex;
  color: rgba(245, 245, 243, 0.55);
  flex-shrink: 0;
}

.st48-search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
}

.st48-search input::placeholder {
  color: rgba(245, 245, 243, 0.38);
}

.st48-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--st48-accent);
  color: #111;
  cursor: pointer;
}

.st48-search button:hover {
  filter: brightness(1.08);
}

@media (min-width: 720px) {
  .st48-mnav {
    display: none;
  }

  .st48-nav-wrap {
    display: flex;
  }

  .st48-search {
    display: flex;
  }

  .st48-logo__name {
    max-width: 14rem;
  }
}

@media (min-width: 960px) {
  .st48-top__inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .st48-search {
    flex: 0 1 260px;
    max-width: 320px;
  }
}

/* ----- 主容器 ----- */
.st48-wrap {
  max-width: var(--st48-max);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

/* ----- 首页区块 ----- */
.st48-sec {
  margin-bottom: 2rem;
}

.st48-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--st48-border);
}

.st48-sec-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.st48-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.st48-subnav a {
  font-size: 0.8125rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--st48-muted);
  border: 1px solid transparent;
}

.st48-subnav a:hover {
  color: var(--st48-text);
  border-color: var(--st48-border);
  background: var(--st48-surface);
}

.st48-subnav a:last-child {
  font-weight: 600;
  color: var(--st48-accent);
}

.st48-subnav a:last-child:hover {
  background: var(--st48-accent-soft);
  border-color: transparent;
}

/* ----- 栅格 ----- */
.st48-grid,
.st48 .cq-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.85rem 0.65rem;
}

@media (min-width: 480px) {
  .st48-grid,
  .st48 .cq-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 1rem 0.75rem;
  }
}

@media (min-width: 900px) {
  .st48-grid,
  .st48 .cq-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.st48 .cq-card-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.75rem 0.55rem;
}

@media (min-width: 640px) {
  .st48 .cq-card-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
}

/* ----- 卡片 ----- */
.st48-card {
  position: relative;
}

.st48-card > a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--st48-radius);
  overflow: hidden;
  background: var(--st48-surface);
  box-shadow: var(--st48-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.st48-card > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.st48-card__pic {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #e8e8e4;
  overflow: hidden;
}

.st48-card__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.st48-card__remark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.45rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.25;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  max-height: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.st48-card__rating {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.st48-card__label {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  padding: 0.12rem 0.38rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border-radius: 4px;
}

.st48-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0, 0, 0, 0.25);
}

.st48-card > a:hover .st48-card__play {
  opacity: 1;
}

.st48-card__play-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.st48-card__play-inner svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.st48-card__body {
  padding: 0.5rem 0.55rem 0.65rem;
}

.st48-card__body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st48-card__cast {
  margin: 0;
  font-size: 0.72rem;
  color: var(--st48-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st48-empty {
  grid-column: 1 / -1;
  margin: 2rem 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--st48-muted);
  background: var(--st48-surface);
  border-radius: var(--st48-radius);
  border: 1px dashed var(--st48-border);
}

/* ----- 列表 / 栏目页 ----- */
.st48-cat {
  margin-bottom: 2rem;
}

.st48-cat__crumb {
  font-size: 0.8125rem;
  color: var(--st48-muted);
  margin-bottom: 1rem;
}

.st48-cat__crumb a {
  color: var(--st48-accent);
  text-decoration: none;
}

.st48-cat__crumb a:hover {
  text-decoration: underline;
}

.st48-cat__crumb-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.st48-cat__head {
  margin-bottom: 1.25rem;
}

.st48-cat__h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.st48-cat__intro {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--st48-muted);
  line-height: 1.55;
}

.st48-cat__meta {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--st48-muted);
}

/* 子分类（st48-subcats） */
.st48-subcats {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--st48-radius);
  background: var(--st48-surface);
  border: 1px solid var(--st48-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.st48-subcats__label {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--st48-muted);
  text-transform: uppercase;
}

.st48-subcats__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.st48-subcats__item a {
  display: inline-block;
  padding: 0.38rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--st48-text);
  border: 1px solid var(--st48-border);
  background: var(--st48-bg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.st48-subcats__item a:hover {
  border-color: rgba(232, 93, 4, 0.35);
  color: var(--st48-accent);
}

.st48-subcats__item.is-on a {
  font-weight: 600;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #fb923c, var(--st48-accent));
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.35);
}

.st48-sort-tabs {
  margin-top: 0.25rem;
}

.st48-pager__meta {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.875rem;
  color: var(--st48-muted);
  text-align: center;
}

.st48-pager-outer {
  margin-bottom: 0.5rem;
}

/* ----- 页脚 ----- */
.st48-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--st48-border);
  font-size: 0.8125rem;
  color: var(--st48-muted);
  text-align: center;
}

.st48-foot p {
  margin: 0 0 0.85rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.st48-foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.st48-foot__links a {
  color: var(--st48-accent);
  text-decoration: none;
  font-weight: 600;
}

.st48-foot__links a:hover {
  text-decoration: underline;
}
