/* mother-diversity · site 11 · teal-wave · 潮汐青瓷
   釉彩拼色：霁青 #0e7490 · 梅子青 #2a9d8f · 天青 #48cae4 · 暖砂 #d4a373 · 居中首屏 */
/* 细调见 site-craft.css */

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

html {
  scroll-behavior: smooth;
}

body.tw-site {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(720px 380px at 8% -8%, rgba(72, 202, 228, 0.14), transparent 55%),
    radial-gradient(640px 360px at 92% 6%, rgba(42, 157, 143, 0.12), transparent 52%),
    radial-gradient(520px 300px at 50% 100%, rgba(212, 163, 115, 0.1), transparent 55%),
    var(--tw-bg, #f4faf8);
  color: var(--tw-ink, #264653);
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.55;
}

body.tw-site img {
  display: block;
  max-width: 100%;
}

body.tw-site a {
  color: var(--tw-primary, #14b8a6);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.tw-site a:hover {
  color: var(--tw-cta, #f59e0b);
}

.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;
}

.tw-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header: 单行居中品牌 + 右侧搜索 ── */
.tw-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tw-surface, #fff);
  box-shadow: 0 4px 24px var(--tw-glow);
}

.tw-top__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 12px 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
}

.tw-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tw-primary) !important;
  font-weight: 900;
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
}

.tw-logo__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--tw-primary), var(--tw-deep, #0e7490));
  color: #fff;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.45);
}

.tw-logo__text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.tw-nav a {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--tw-muted) !important;
  border: 1px solid transparent;
}

.tw-nav a:hover,
.tw-nav a[aria-current="page"] {
  color: #fff !important;
  background: var(--tw-primary);
  border-color: var(--tw-primary);
}

.tw-nav a[aria-current="page"] {
  box-shadow: 0 0 0 2px var(--tw-cta);
}

.tw-search {
  display: flex;
  align-items: stretch;
  min-width: 160px;
  max-width: 220px;
}

.tw-search input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--tw-line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  background: #ecfdf5;
  color: var(--tw-ink);
}

.tw-search input:focus {
  border-color: var(--tw-primary);
  background: #fff;
}

.tw-search__go {
  border: 0;
  padding: 0 14px;
  border-radius: 0 999px 999px 0;
  background: var(--tw-cta);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
}

.tw-search__go:hover {
  background: #d97706;
}

.tw-top__hot {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(135deg, var(--tw-cta), #fbbf24);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38);
  white-space: nowrap;
}

.tw-top__hot:hover {
  color: #fff !important;
  transform: translateY(-1px);
}

.tw-top__wave {
  height: 6px;
  background: linear-gradient(90deg, var(--tw-primary) 0%, #2dd4bf 35%, var(--tw-cta) 70%, var(--tw-primary) 100%);
  background-size: 200% 100%;
  animation: tw-wave-shift 8s ease-in-out infinite;
}

@keyframes tw-wave-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.tw-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 2px solid var(--tw-line);
  border-radius: 10px;
  background: var(--tw-surface);
  cursor: pointer;
}

.tw-menu-btn span {
  display: block;
  height: 2px;
  background: var(--tw-primary);
  border-radius: 2px;
}

/* ── Main ── */
.tw-main {
  flex: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

/* ── Hero: 居中品牌首屏 ── */
.tw-hero {
  position: relative;
  text-align: center;
  margin-bottom: 28px;
  padding: 36px 24px 28px;
  border-radius: 20px;
  background: linear-gradient(160deg, #ccfbf1 0%, #fff 45%, #fffbeb 100%);
  border: 2px solid var(--tw-line);
  overflow: hidden;
}

.tw-hero__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 280px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), transparent 68%);
  pointer-events: none;
}

.tw-hero__body {
  position: relative;
  max-width: 680px;
  margin: 0 auto 22px;
}

.tw-hero__kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tw-cta);
}

.tw-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--tw-ink);
}

.tw-hero__intro {
  margin: 0 auto 20px;
  max-width: 560px;
  color: var(--tw-muted);
  font-size: 15px;
  line-height: 1.75;
}

.tw-hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.tw-btn--primary {
  background: linear-gradient(135deg, var(--tw-cta), #fbbf24);
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.tw-btn--primary:hover {
  color: #fff !important;
  transform: translateY(-2px);
}

.tw-btn--ghost {
  border: 2px solid var(--tw-primary);
  color: var(--tw-primary) !important;
  background: #fff;
}

.tw-btn--ghost:hover {
  background: #ecfdf5;
}

.tw-btn--block {
  width: 100%;
}

.tw-quick {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.tw-quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--tw-surface);
  border: 1px solid var(--tw-line);
  color: var(--tw-ink) !important;
  font-size: 12px;
  font-weight: 700;
}

.tw-quick__item:hover {
  border-color: var(--tw-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px var(--tw-glow);
  color: var(--tw-primary) !important;
}

.tw-quick__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tw-primary);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

/* ── Sections ── */
.tw-section {
  margin: 30px 0;
}

.tw-section--alt {
  padding: 22px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--tw-line);
}

.tw-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--tw-primary);
}

.tw-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tw-section__title h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--tw-ink);
}

.tw-section__more {
  font-weight: 800;
  font-size: 14px;
  color: var(--tw-primary) !important;
}

.tw-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(20, 184, 166, 0.14);
  color: var(--tw-deep);
}

.tw-tag--hot {
  background: var(--tw-cta);
  color: #fff;
}

.tw-tag--new {
  background: var(--tw-primary);
  color: #fff;
}

/* ── Grids ── */
.tw-grid {
  display: grid;
  gap: 16px;
}

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

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

/* ── Cards: 横版 16:9 渐变标题叠加 ── */
.tw-fcard {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.tw-fcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px var(--tw-glow);
}

.tw-fcard__link {
  display: block;
  color: inherit !important;
}

.tw-fcard__cover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid var(--tw-line);
  background: #134e4a;
}

.tw-fcard__cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.tw-fcard:hover .tw-fcard__cover img {
  transform: scale(1.06);
}

.tw-fcard__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  background: var(--tw-cta);
  color: #fff;
  z-index: 2;
}

.tw-fcard__hd {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(20, 184, 166, 0.92);
  color: #fff;
  z-index: 2;
}

.tw-fcard__play {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  font-size: 14px;
  z-index: 2;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tw-fcard:hover .tw-fcard__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.tw-fcard__shade {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, rgba(19, 78, 74, 0.92));
  z-index: 1;
}

.tw-fcard__shade h3 {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tw-fcard__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.tw-fcard__meta span:first-child {
  color: #5eead4;
  font-weight: 700;
}

/* Mini row card */
.tw-fcard--mini {
  background: var(--tw-surface);
  border: 1px solid var(--tw-line);
  border-radius: 12px;
}

.tw-fcard__link--row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 10px;
}

.tw-fcard__cover--mini {
  border: 0;
}

.tw-fcard__cover--mini img {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
}

.tw-fcard__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 6px;
}

.tw-fcard__text h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--tw-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tw-fcard--mini .tw-fcard__meta {
  color: var(--tw-muted);
}

.tw-fcard--mini .tw-fcard__meta span:first-child {
  color: var(--tw-primary);
}

/* ── Category page ── */
.tw-channel__banner {
  margin-bottom: 20px;
  padding: 22px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #ccfbf1, #fff);
  border-left: 5px solid var(--tw-primary);
}

.tw-channel__banner h1 {
  margin: 8px 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--tw-ink);
}

.tw-channel__desc {
  margin: 0;
  color: var(--tw-muted);
  max-width: 640px;
  line-height: 1.65;
}

.tw-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--tw-muted);
  margin-bottom: 6px;
}

.tw-crumb a {
  color: var(--tw-primary) !important;
  font-weight: 700;
}

.tw-filters {
  margin-bottom: 20px;
}

.tw-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--tw-surface);
  border: 2px dashed var(--tw-primary);
}

.tw-filters__row input,
.tw-filters__row select {
  flex: 1;
  min-width: 140px;
  padding: 9px 14px;
  border: 2px solid var(--tw-line);
  border-radius: 10px;
  background: #ecfdf5;
  color: var(--tw-ink);
  font-weight: 600;
  outline: none;
}

.tw-filters__row input:focus,
.tw-filters__row select:focus {
  border-color: var(--tw-primary);
  background: #fff;
}

.tw-empty {
  padding: 32px;
  text-align: center;
  border-radius: 12px;
  background: #ecfdf5;
  color: var(--tw-muted);
  font-weight: 700;
}

/* ── Play page: 左播放器 + 右侧栏 ── */
.tw-play {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 22px;
  align-items: start;
  margin-bottom: 28px;
}

.tw-play__screen {
  border-radius: 14px;
  overflow: hidden;
  background: #134e4a;
  box-shadow: 0 16px 48px rgba(20, 184, 166, 0.28);
}

.tw-play__screen video,
#movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
  display: block;
}

.tw-play__info {
  margin-top: 16px;
}

.tw-play__info h1 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 900;
  color: var(--tw-ink);
}

.tw-play__lead,
.tw-play__full {
  margin: 0 0 12px;
  color: var(--tw-muted);
  line-height: 1.75;
  font-size: 15px;
}

.tw-play__side {
  position: sticky;
  top: 96px;
  padding: 16px;
  border-radius: 14px;
  background: var(--tw-surface);
  border: 2px solid var(--tw-line);
}

.tw-play__poster {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 14px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.tw-play__facts {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.tw-play__facts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--tw-line);
  font-size: 13px;
}

.tw-play__facts em {
  color: var(--tw-muted);
  font-style: normal;
  font-weight: 600;
}

.tw-play__facts strong {
  color: var(--tw-ink);
  text-align: right;
}

/* ── Footer: 居中品牌 + 三列链接 ── */
.tw-foot {
  margin-top: auto;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-top: 3px solid var(--tw-primary);
}

.tw-foot__wave {
  height: 4px;
  background: linear-gradient(90deg, var(--tw-cta), var(--tw-primary), var(--tw-cta));
  opacity: 0.7;
}

.tw-foot__center {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 18px 16px;
  text-align: center;
}

.tw-foot__brand {
  display: block;
  font-size: 1.15rem;
  color: var(--tw-primary);
  margin-bottom: 10px;
}

.tw-foot__about {
  margin: 0;
  font-size: 13px;
  color: var(--tw-muted);
  line-height: 1.65;
}

.tw-foot__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 24px;
}

.tw-foot__label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tw-cta);
  margin-bottom: 10px;
}

.tw-foot__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tw-foot__col a {
  font-size: 14px;
  font-weight: 700;
  color: var(--tw-ink) !important;
}

.tw-foot__col a:hover {
  color: var(--tw-primary) !important;
}

.tw-foot__col p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--tw-muted);
  line-height: 1.6;
}

.tw-foot__tag {
  font-size: 12px !important;
  color: var(--tw-primary) !important;
  font-weight: 700;
}

.tw-foot__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px 20px;
  border-top: 1px solid var(--tw-line);
  font-size: 12px;
  color: var(--tw-muted);
  font-weight: 600;
}

/* ── Sub pages ── */
.tw-subhero {
  margin-bottom: 22px;
  padding: 28px 24px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(140deg, #ccfbf1, #fff);
  border: 2px solid var(--tw-line);
}

.tw-subhero h1 {
  margin: 10px 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--tw-ink);
}

.tw-subhero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--tw-muted);
  line-height: 1.65;
}

.tw-catgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tw-catgrid a,
.hc-cattile {
  display: block;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--tw-surface);
  border: 2px solid var(--tw-line);
  color: var(--tw-ink) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tw-catgrid a:hover,
.hc-cattile:hover {
  transform: translateY(-3px);
  border-color: var(--tw-primary);
}

.tw-catgrid strong,
.hc-cattile strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--tw-primary);
}

.tw-catgrid span,
.hc-cattile span {
  font-size: 13px;
  color: var(--tw-muted);
  line-height: 1.5;
}

/* ── Mobile ── */
@media (max-width: 1024px) {
  .tw-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tw-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tw-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tw-foot__links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .tw-top__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }

  .tw-menu-btn {
    display: flex;
  }

  .tw-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    flex-direction: column;
    padding: 12px;
    border-radius: 12px;
    background: var(--tw-surface);
    border: 2px solid var(--tw-line);
    box-shadow: 0 16px 40px var(--tw-glow);
    z-index: 110;
  }

  .tw-nav.open {
    display: flex;
  }

  .tw-search {
    grid-column: 1 / -1;
    max-width: none;
  }

  .tw-top__hot {
    display: none;
  }

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

  .tw-play {
    grid-template-columns: 1fr;
  }

  .tw-play__side {
    position: static;
  }

  .tw-foot__links {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  .tw-main {
    padding: 16px 14px 40px;
  }

  .tw-hero {
    padding: 28px 16px 22px;
  }

  .tw-quick {
    gap: 8px;
  }

  .tw-quick__item {
    min-width: 56px;
    padding: 8px 10px;
  }

  .tw-fcard__link--row {
    grid-template-columns: 100px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .tw-top__wave {
    animation: none;
  }
}
