/* 星星影院 · Horizon Signal 主题（与黑金模板差异化） */

:root {
  --xx-bg: #e8eef4;
  --xx-bg-deep: #dce5ee;
  --xx-surface: #f7fafc;
  --xx-ink: #121a24;
  --xx-ink-soft: #3a4656;
  --xx-muted: #6b7788;
  --xx-line: rgba(18, 26, 36, 0.1);
  --xx-accent: #e11d48;
  --xx-accent-deep: #be123c;
  --xx-brand: #16324f;
  --xx-rank: #0f766e;
  --xx-radius: 2px;
  --xx-font-display: "Syne", "Noto Sans SC", sans-serif;
  --xx-font-body: "Noto Sans SC", "IBM Plex Sans", sans-serif;
  --xx-shadow: 0 18px 40px rgba(18, 26, 36, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--xx-font-body);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(225, 29, 72, 0.08), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(15, 118, 110, 0.07), transparent 50%),
    linear-gradient(180deg, var(--xx-bg) 0%, var(--xx-bg-deep) 100%);
  background-attachment: fixed;
  color: var(--xx-ink);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

body.xx-nav-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: repeating-linear-gradient(
    -18deg,
    #121a24 0 1px,
    transparent 1px 14px
  );
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--xx-line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  min-height: 72px;
  padding: 10px 0;
}

.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  flex: 0 0 auto;
}

.logo__mark {
  font-family: var(--xx-font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--xx-brand);
}

.logo__mark i {
  font-style: normal;
  color: var(--xx-accent);
}

.logo__sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--xx-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--xx-ink-soft);
  border-radius: var(--xx-radius);
  transition: color 0.2s ease;
  line-height: 1.2;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--xx-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--xx-ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--xx-accent);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  width: 220px;
  max-width: 100%;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--xx-line);
  border-radius: var(--xx-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-box .icon {
  color: var(--xx-muted);
  font-size: 15px;
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--xx-ink);
  font-size: 13px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: #9aa6b5;
}

/* ========== Hero (full-bleed) ========== */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #f8fafc;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: xx-hero-drift 18s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 16, 24, 0.88) 0%, rgba(10, 16, 24, 0.55) 48%, rgba(10, 16, 24, 0.25) 100%),
    linear-gradient(0deg, rgba(10, 16, 24, 0.92) 0%, transparent 55%);
}

.hero-inner {
  width: 100%;
  padding: 48px 0 56px;
}

.hero-text {
  max-width: 560px;
}

.hero-brand {
  font-family: var(--xx-font-display);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.95;
  margin-bottom: 18px;
  animation: xx-rise 0.7s ease both;
}

.hero-brand span {
  color: var(--xx-accent);
}

.hero-text h1 {
  font-family: var(--xx-font-display);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  animation: xx-rise 0.7s 0.08s ease both;
}

.hero-text .desc {
  font-size: 15px;
  color: rgba(248, 250, 252, 0.82);
  max-width: 420px;
  margin-bottom: 26px;
  animation: xx-rise 0.7s 0.16s ease both;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: xx-rise 0.7s 0.24s ease both;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--xx-radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--xx-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--xx-accent-deep);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ========== Sections ========== */
.featured,
.categories,
.hotlist,
.updates,
.testimonials {
  padding: 56px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: var(--xx-font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--xx-brand);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.section-header h2 .accent {
  display: block;
  margin-top: 6px;
  font-family: var(--xx-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--xx-accent);
}

.section-header .more {
  font-size: 13px;
  font-weight: 700;
  color: var(--xx-ink-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-header .more:hover {
  color: var(--xx-accent);
  border-color: var(--xx-accent);
}

/* Featured rail: compact poster shelf */
.grid-featured {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 12px;
  align-items: start;
}

.xx-pick {
  display: block;
  min-width: 0;
  transition: transform 0.2s ease;
}

.xx-pick:hover {
  transform: translateY(-3px);
}

.xx-pick .xx-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--xx-radius);
  background: #c5d0db;
  box-shadow: 0 6px 14px rgba(18, 26, 36, 0.08);
}

.xx-pick .xx-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.xx-pick:hover .xx-poster img {
  transform: scale(1.03);
}

.xx-pick .xx-poster__score {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  background: rgba(18, 26, 36, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 5px;
  border-radius: var(--xx-radius);
}

.xx-pick .info {
  padding: 8px 1px 0;
}

.xx-pick .info h3,
.xx-pick .info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--xx-ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xx-pick .info span {
  font-size: 11px;
  color: var(--xx-muted);
}

/* Categories — text band, not icon cards */
.categories {
  border-block: 1px solid var(--xx-line);
  background: rgba(255, 255, 255, 0.35);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--xx-line);
  border-bottom: 1px solid var(--xx-line);
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 22px;
  border-right: 1px solid var(--xx-line);
  background: transparent;
  transition: background 0.25s ease;
}

.cat-card:last-child {
  border-right: none;
}

.cat-card:hover {
  background: rgba(225, 29, 72, 0.04);
}

.cat-card .icon-box {
  display: none;
}

.cat-card h3 {
  font-family: var(--xx-font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--xx-brand);
}

.cat-card p {
  font-size: 13px;
  color: var(--xx-muted);
  line-height: 1.55;
  flex: 1;
}

.cat-card .count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--xx-accent);
}

/* Hot list */
.hot-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  width: 100%;
}

.xx-rank-list.hot-grid {
  max-width: none;
}

.hot-item {
  display: grid;
  grid-template-columns: 40px 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--xx-line);
  background: transparent;
  border-radius: 0;
  transition: color 0.2s ease;
}

.hot-item:hover .info .title {
  color: var(--xx-accent);
}

.hot-item .rank {
  font-family: var(--xx-font-display);
  font-size: 22px;
  font-weight: 800;
  color: rgba(18, 26, 36, 0.18);
  text-align: center;
  min-width: 0;
}

.hot-item .rank.top3 {
  color: var(--xx-accent);
}

.hot-item .cover {
  width: 48px;
  height: 68px;
  border-radius: var(--xx-radius);
  overflow: hidden;
  background: #c5d0db;
  flex-shrink: 0;
}

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

.hot-item .info .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--xx-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.hot-item .info .meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--xx-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-item .score {
  font-family: var(--xx-font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--xx-rank);
}

/* Updates — timeline rows */
.update-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--xx-line);
}

.update-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--xx-line);
  background: transparent;
  border-radius: 0;
  align-items: center;
  transition: background 0.2s ease;
}

.update-card:hover {
  background: rgba(255, 255, 255, 0.4);
}

.update-card .thumb {
  width: 56px;
  height: 80px;
  overflow: hidden;
  border-radius: var(--xx-radius);
  background: #c5d0db;
}

.update-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-card .info .title {
  font-size: 17px;
  font-weight: 700;
  color: var(--xx-ink);
  margin-bottom: 6px;
}

.update-card .info .desc {
  font-size: 13px;
  color: var(--xx-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.update-card .info .time {
  margin-top: 10px;
  font-size: 12px;
  color: var(--xx-ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-card .badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--xx-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--xx-radius);
}

/* Testimonials */
.test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.test-card {
  padding: 0;
  background: transparent;
  border: none;
  border-left: 3px solid var(--xx-accent);
  padding-left: 20px;
}

.test-card .user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.test-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #c5d0db;
}

.test-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.test-card .name {
  font-weight: 700;
  color: var(--xx-ink);
}

.test-card .role {
  font-size: 12px;
  color: var(--xx-muted);
}

.test-card .quote {
  font-size: 15px;
  color: var(--xx-ink-soft);
  line-height: 1.75;
}

.test-card .quote .highlight {
  color: var(--xx-accent);
  font-weight: 700;
}

/* ========== Footer ========== */
.footer {
  margin-top: 20px;
  background: var(--xx-brand);
  color: rgba(247, 250, 252, 0.78);
  padding: 48px 0 28px;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--xx-accent), #0f766e 55%, transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  font-family: var(--xx-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: rgba(247, 250, 252, 0.72);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col .social {
  display: flex;
  gap: 10px;
}

.footer-col .social span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--xx-radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  font-size: 12px;
  color: rgba(247, 250, 252, 0.55);
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-bottom__links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

@keyframes xx-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes xx-hero-drift {
  from {
    transform: scale(1.02) translateY(0);
  }
  to {
    transform: scale(1.06) translateY(-1.5%);
  }
}

@media (max-width: 960px) {
  .nav-links {
    order: 3;
    flex: 1 1 100%;
  }

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

  .cat-grid,
  .test-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .cat-card {
    border-right: none;
    border-bottom: 1px solid var(--xx-line);
  }

  .featured,
  .categories,
  .hotlist,
  .updates,
  .testimonials {
    padding: 40px 0;
  }
}

@media (max-width: 768px) {
  .header-inner {
    min-height: 60px;
    gap: 10px 12px;
  }

  .logo__mark {
    font-size: 22px;
  }

  .search-box {
    width: 100%;
    margin-left: 0;
    order: 2;
  }

  .xx-nav-toggle {
    margin-left: auto;
    order: 1;
  }

  .logo {
    order: 0;
  }

  .nav-links {
    order: 3;
  }

  .hero {
    min-height: 56vh;
  }

  .hero-inner {
    padding: 36px 0 40px;
  }

  .hero-text .desc br {
    display: none;
  }

  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    padding: 0 18px;
    font-size: 13px;
  }

  .grid-featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .cat-grid,
  .test-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .cat-card {
    padding: 20px 4px;
  }

  .update-card {
    grid-template-columns: 48px 1fr;
    gap: 12px;
  }

  .update-card .thumb {
    width: 48px;
    height: 68px;
  }

  .hot-item {
    grid-template-columns: 32px 44px 1fr auto;
    gap: 10px;
  }

  .hot-item .cover {
    width: 44px;
    height: 62px;
  }

  .hot-item .info .meta {
    gap: 6px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .footer {
    padding: 36px 0 24px;
  }
}

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

  .hero {
    min-height: 50vh;
  }

  .cta-group {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img,
  .hero-brand,
  .hero-text h1,
  .hero-text .desc,
  .cta-group {
    animation: none;
  }
}
