/* 星星影院 · extras: ABABSEO + 内页 + 分类页 + 移动导航 */

:root {
  --xx-gold: #e11d48;
  --xx-gold-deep: #be123c;
  --xx-bg: #e8eef4;
  --xx-panel: #ffffff;
  --xx-muted: #6b7788;
  --xx-ink: #121a24;
  --xx-brand: #16324f;
  --xx-line: rgba(18, 26, 36, 0.1);
  --xx-radius: 2px;
  --xx-font-display: "Syne", "Noto Sans SC", sans-serif;
}

/* ABABSEO */
.ababseo-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  user-select: none;
  -webkit-user-select: none;
}

.ababseo-mark__plane-wrap {
  position: relative;
  width: 36px;
  height: 28px;
  flex-shrink: 0;
  overflow: visible;
}

.ababseo-mark__plane {
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  color: #fda4af;
  animation: ababseo-fly 3.6s ease-in-out infinite;
  will-change: transform;
}

.ababseo-mark__plane svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ababseo-mark__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.05;
}

.ababseo-mark__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247, 250, 252, 0.45);
}

.ababseo-mark__name {
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.18em;
  background: linear-gradient(105deg, #fda4af 0%, #fff 45%, #99f6e4 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ababseo-shimmer 5s ease-in-out infinite;
}

@keyframes ababseo-fly {
  0% {
    transform: translate(0, 2px) rotate(-8deg);
  }
  20% {
    transform: translate(8px, -6px) rotate(4deg);
  }
  45% {
    transform: translate(16px, 1px) rotate(-2deg);
  }
  70% {
    transform: translate(6px, -8px) rotate(10deg);
  }
  100% {
    transform: translate(0, 2px) rotate(-8deg);
  }
}

@keyframes ababseo-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.footer-bottom__mark {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* Mobile nav */
.xx-nav-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--xx-line);
  color: var(--xx-brand);
  border-radius: var(--xx-radius);
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 768px) {
  .xx-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-height: 40px;
    min-width: 52px;
  }

  .search-box {
    margin-left: 0;
  }

  .nav-links:not(.is-open) {
    display: none;
  }

  .nav-links.is-open {
    display: flex;
    width: 100%;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    justify-content: flex-start;
    padding: 10px 0 4px;
    border-top: 1px solid var(--xx-line);
  }

  .nav-links.is-open a {
    padding: 12px 10px;
  }

  .nav-links.is-open a::after {
    display: none;
  }

  .nav-links.is-open a.active {
    background: rgba(225, 29, 72, 0.08);
    border-radius: var(--xx-radius);
  }
}

/* ========== 内页通用 ========== */
.xx-page {
  padding: 28px 0 56px;
  min-height: 50vh;
}

.xx-crumb {
  font-size: 13px;
  color: var(--xx-muted);
  margin-bottom: 18px;
}

.xx-crumb a:hover {
  color: var(--xx-gold);
}

.xx-crumb span {
  margin: 0 4px;
}

/* ========== 分类页（横向滤镜 + 竖海报栅格） ========== */
.xx-cat-banner {
  margin: 0 0 28px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--xx-line);
}

.xx-page-head h1 {
  font-family: var(--xx-font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--xx-brand);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.xx-page-head p {
  color: var(--xx-muted);
  font-size: 14px;
  max-width: 560px;
}

.xx-cat-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.xx-cat-channels a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--xx-ink-soft, #3a4656);
  background: #fff;
  border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.xx-cat-channels a:hover,
.xx-cat-channels a.active {
  color: #fff;
  background: var(--xx-brand);
  border-color: var(--xx-brand);
}

.xx-cat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 0;
  border-block: 1px solid var(--xx-line);
}

.xx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.xx-filters span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--xx-muted);
  margin-right: 4px;
}

.xx-filters button,
.xx-toolbar button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--xx-muted);
  padding: 6px 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-radius: 0;
}

.xx-filters button.active,
.xx-filters button:hover,
.xx-toolbar button.active,
.xx-toolbar button:hover {
  color: var(--xx-gold);
  border-bottom-color: var(--xx-gold);
  background: transparent;
}

.xx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.xx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 14px 10px;
}

@media (max-width: 768px) {
  .xx-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
}

@media (max-width: 420px) {
  .xx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.xx-empty {
  text-align: center;
  color: var(--xx-muted);
  padding: 48px 16px;
}

.xx-grid-section {
  margin-top: 40px;
}

.xx-section-title {
  font-family: var(--xx-font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--xx-brand);
  margin-bottom: 20px;
}

/* 播放页 */
.xx-play {
  padding-bottom: 60px;
}

.xx-play-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

.xx-player-box {
  border-radius: var(--xx-radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--xx-line);
  aspect-ratio: 16 / 9;
}

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

.xx-panel {
  background: #fff;
  border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius);
  padding: 20px;
  margin-top: 16px;
}

.xx-play-main .xx-panel:first-of-type {
  margin-top: 16px;
}

.xx-panel h1 {
  font-family: var(--xx-font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--xx-brand);
  margin-bottom: 12px;
}

.xx-panel h2,
.xx-panel h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--xx-brand);
  margin-bottom: 14px;
}

.xx-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--xx-muted);
  margin-bottom: 12px;
}

.xx-panel__desc {
  color: var(--xx-ink-soft, #3a4656);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
}

.xx-panel--side {
  position: sticky;
  top: 88px;
}

.xx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xx-tags a {
  background: var(--xx-bg);
  border: 1px solid var(--xx-line);
  padding: 4px 10px;
  border-radius: var(--xx-radius);
  font-size: 12px;
  color: var(--xx-ink-soft, #3a4656);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.xx-tags a:hover {
  color: var(--xx-gold);
  border-color: rgba(225, 29, 72, 0.35);
}

.xx-comment {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--xx-line);
}

.xx-comment:last-child {
  border-bottom: none;
}

.xx-comment img {
  border-radius: 50%;
  flex-shrink: 0;
}

.xx-comment strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--xx-ink);
  font-size: 14px;
}

.xx-comment time {
  font-weight: 400;
  font-size: 12px;
  color: var(--xx-muted);
}

.xx-comment p {
  font-size: 13px;
  color: var(--xx-ink-soft, #3a4656);
  margin-top: 4px;
  line-height: 1.6;
}

/* 榜单 */
.xx-rank-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 24px;
}

.xx-rank-aside {
  background: #fff;
  border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius);
  padding: 20px;
}

.xx-rank-aside h2,
.xx-rank-aside h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--xx-brand);
  margin-bottom: 12px;
}

.xx-rank-aside ol {
  list-style: none;
  counter-reset: rank;
}

.xx-rank-aside li {
  counter-increment: rank;
  margin-bottom: 8px;
}

.xx-rank-aside a {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--xx-ink-soft, #3a4656);
  align-items: center;
}

.xx-rank-aside a span {
  color: var(--xx-gold);
  font-weight: 700;
  min-width: 20px;
}

.xx-rank-aside a:hover {
  color: var(--xx-gold);
}

/* 搜索 / 登录 */
.xx-search-form {
  max-width: 560px;
  margin-bottom: 28px;
}

.xx-search-btn {
  flex-shrink: 0;
  padding: 8px 20px !important;
  font-size: 14px !important;
  margin-left: 8px;
  border-radius: var(--xx-radius) !important;
}

.xx-form-wrap {
  max-width: 440px;
  margin: 0 auto;
}

.xx-form-panel {
  margin-top: 0;
}

.xx-form-sub {
  color: var(--xx-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.xx-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.xx-form input {
  background: #fff;
  border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius);
  padding: 12px 16px;
  color: var(--xx-ink);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.xx-form input:focus {
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.08);
}

.xx-form__err {
  color: var(--xx-gold);
  font-size: 13px;
}

.xx-form-foot {
  margin-top: 16px;
  font-size: 14px;
  color: var(--xx-muted);
}

.xx-form-foot a:hover {
  color: var(--xx-gold);
}

.xx-not-found {
  text-align: center;
  padding: 48px 24px;
}

.xx-not-found p {
  color: var(--xx-muted);
  margin: 12px 0 24px;
}

@media (max-width: 768px) {
  .xx-page {
    padding: 20px 0 40px;
  }

  .xx-page-head h1 {
    font-size: 26px;
  }

  .xx-cat-banner {
    margin-bottom: 18px;
    padding: 16px 0 18px;
  }

  .xx-cat-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .xx-filters,
  .xx-toolbar,
  .xx-cat-channels {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .xx-filters button,
  .xx-toolbar button,
  .xx-cat-channels a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .xx-play-layout,
  .xx-rank-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .xx-panel--side {
    position: static;
  }

  .xx-panel h1 {
    font-size: 20px;
  }

  .xx-search-form {
    max-width: none;
    width: 100%;
  }

  .xx-search-btn {
    margin-left: 6px !important;
    padding: 8px 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ababseo-mark__plane,
  .ababseo-mark__name {
    animation: none;
  }

  .ababseo-mark__plane {
    transform: none;
  }
}
