/* 站点 36 · copper-studio 补丁：播放器 / 筛选 / 移动端 / 模板修错 */
.page-main {
  min-height: 50vh;
}

[hidden] {
  display: none !important;
}

/* 登录 / 注册：固定行高居中 */
body.body-tpl-portal .header-link-login,
body.body-tpl-portal .header-reg,
body.body-tpl-portal .header-reg--portal {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 16px !important;
  line-height: 36px !important;
  vertical-align: middle;
  text-align: center;
}

body.body-tpl-portal .header-link-login {
  background: rgba(212, 200, 184, 0.08) !important;
  border-radius: 999px !important;
  color: #d4a574 !important;
}

body.body-tpl-portal .header-link-login span,
body.body-tpl-portal .header-reg--portal span {
  display: block;
  line-height: 1 !important;
  transform: translateY(1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(212, 200, 184, 0.08);
  color: #d4c8b8;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: rgba(212, 200, 184, 0.65);
  font-weight: 600;
  margin: 0 0 1rem;
}

.breadcrumb a {
  color: #d4a574;
}

.filter-panel,
.portal-filter {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin: 0 0 1.25rem;
}

.filter-panel input,
.filter-panel select,
.portal-filter input,
.portal-filter select {
  width: 100%;
  border: 1px solid rgba(212, 200, 184, 0.14);
  border-radius: 999px;
  background: rgba(44, 31, 18, 0.6);
  color: #d4c8b8;
  padding: 12px 16px;
  outline: none;
}

.filter-panel select,
.portal-filter select {
  cursor: pointer;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: rgba(212, 200, 184, 0.55);
  font-weight: 700;
}

/* 播放 / 详情页 */
body.body-tpl-portal .detail-page {
  padding: 1.5rem 0 2.5rem;
}

body.body-tpl-portal .page-panel.portal-panel,
body.body-tpl-portal .portal-panel {
  background: rgba(44, 31, 18, 0.55) !important;
  border: 1px solid rgba(184, 115, 51, 0.12) !important;
  border-radius: 18px !important;
  color: #d4c8b8;
  box-shadow: none !important;
}

body.body-tpl-portal .detail-hero {
  border-color: rgba(184, 115, 51, 0.12) !important;
  margin-bottom: 1.25rem;
}

body.body-tpl-portal .detail-hero__cta .primary-btn,
body.body-tpl-portal .primary-btn {
  background: linear-gradient(135deg, #b87333 0%, #d4a574 100%) !important;
  color: #14100a !important;
  border: none !important;
  border-radius: 999px !important;
  min-height: 44px;
  padding: 0 22px;
  box-shadow: 0 10px 24px -6px rgba(184, 115, 51, 0.45) !important;
}

body.body-tpl-portal .detail-hero__cta .ghost-btn,
body.body-tpl-portal .ghost-btn {
  background: rgba(212, 200, 184, 0.06) !important;
  border: 1px solid rgba(212, 200, 184, 0.2) !important;
  color: #d4c8b8 !important;
  border-radius: 999px !important;
  min-height: 44px;
  padding: 0 22px;
}

body.body-tpl-portal .detail-tags span {
  background: rgba(184, 115, 51, 0.1) !important;
  border: 1px solid rgba(184, 115, 51, 0.2) !important;
  color: #d4c8b8 !important;
}

body.body-tpl-portal .pill-badge {
  color: #d4a574 !important;
  background: rgba(184, 115, 51, 0.14) !important;
  border: 1px solid rgba(184, 115, 51, 0.32) !important;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  margin-top: 0.75rem;
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.video-error[hidden] {
  display: none !important;
}

.video-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-weight: 800;
}

.related-block {
  margin-top: 0.5rem;
}

.tuyona-features {
  margin: 2.5rem 0 3rem;
}

.tuyona-features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tuyona-features__card {
  padding: 1.25rem;
  border-radius: 18px;
  background: rgba(44, 31, 18, 0.45);
  border: 1px solid rgba(184, 115, 51, 0.1);
}

.tuyona-features__card h3 {
  margin: 0.5rem 0;
  color: #d4c8b8;
}

.tuyona-features__card p {
  margin: 0;
  color: rgba(212, 200, 184, 0.72);
  line-height: 1.7;
}

.tuyona-features__icon {
  color: #b87333;
  font-weight: 900;
}

.tuyona-features__lead {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--mc-text-dim, rgba(212, 200, 184, 0.65));
}

/* 搜索 / 榜单：四列筛选 */
.filter-panel--wide,
.portal-filter.filter-panel--wide {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* 卡片栅格移动端 */
@media (max-width: 900px) {
  .header-main-nav {
    display: none;
  }

  .header-main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(26, 18, 8, 0.97);
    border: 1px solid rgba(184, 115, 51, 0.14);
    z-index: 80;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .tuyona-features__grid,
  .filter-panel,
  .portal-filter,
  .filter-panel--wide {
    grid-template-columns: 1fr;
  }

  body.body-tpl-portal .detail-hero__inner {
    grid-template-columns: 1fr;
  }

  body.body-tpl-portal .detail-hero__cover {
    max-width: 200px;
  }

  body.body-tpl-portal .cq-block--featured {
    padding: 1rem;
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (max-width: 480px) {
  body.body-tpl-portal .header-inner--ref {
    gap: 8px;
    flex-wrap: wrap;
  }

  body.body-tpl-portal .header-tools {
    gap: 6px;
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  body.body-tpl-portal .header-search--with-btn {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  body.body-tpl-portal .header-link-login,
  body.body-tpl-portal .header-reg--portal {
    padding: 0 10px !important;
    font-size: 0.8125rem;
  }

  body.body-tpl-portal .hero-cq__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  body.body-tpl-portal .footer-tuy__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  body.body-tpl-portal .footer-tuy__mid-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
