/* ============================================================
   黄果魔改档案 · 视觉系统 v2
   原则：语义清晰、流式布局、原生 HTML 内容、移动端无横向溢出
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #080b18;
  --surface: #11182b;
  --surface-soft: #171e34;
  --surface-raised: #202741;
  --line: #313a54;
  --text: #f6f5fb;
  --muted: #bac3d9;
  --accent: #c5a9ff;
  --teal: #85e9e0;
  --gold: #f4d4a0;
  --max: 1180px;
}

/* 1. 页面基础 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.8 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.skip { position: absolute; z-index: 50; left: -100vw; top: 8px; padding: 12px; background: white; color: #111; }
.skip:focus { left: 12px; }

/* 2. 页首及导航 */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #090e1bee;
  border-bottom: 1px solid #ffffff1e;
  backdrop-filter: blur(14px);
}
.top { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; white-space: nowrap; letter-spacing: .02em; }
.brandmark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #c8a6ff, #66dad0); color: #13152a; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.nav a { padding: 7px 10px; border-radius: 8px; font-size: 13px; color: #c6cbe0; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: #ffffff14; color: #fff; }

/* 3. 电影感首页首屏 */
.hero {
  padding: 74px 0 64px;
  background:
    radial-gradient(ellipse at 78% 8%, #6a4b9c40 0, transparent 45%),
    radial-gradient(ellipse at 0 75%, #1c566b38 0, transparent 42%),
    linear-gradient(#12182c, var(--bg));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); align-items: center; gap: clamp(28px, 5vw, 72px); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 750; color: var(--teal); letter-spacing: .13em; }
.hero h1 { margin: 18px 0 24px; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.23; letter-spacing: -.035em; }
.gradient { color: #e1ceff; }
@supports (background-clip: text) { .gradient { background: linear-gradient(95deg, #e2cbff, #a0e9e3); background-clip: text; -webkit-text-fill-color: transparent; } }
.lead { max-width: 590px; color: var(--muted); margin: 0 0 8px; font-size: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; margin-top: 22px; padding: 12px 21px; border-radius: 11px; font-size: 14px; font-weight: 750; color: #161326; background: #bea6ff; }
.button:hover { background: #d2c0ff; }
.button.ghost { margin-left: 10px; color: #f6f3ff; background: transparent; border: 1px solid #727795; }
.button.ghost:hover { background: #ffffff16; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.stats > div { min-width: 76px; }
.stats b { display: block; font-size: 24px; color: white; line-height: 1.3; }
.heroart { position: relative; min-width: 0; }
.heroart > img { width: 100%; height: min(43vw, 510px); min-height: 350px; object-fit: cover; border-radius: 24px; border: 1px solid #ffffff35; box-shadow: 0 25px 90px #7760b72d; }
.artnote { position: absolute; bottom: 18px; left: 18px; width: min(270px, calc(100% - 36px)); padding: 14px 16px; color: #d7dced; background: #111827ed; border: 1px solid #ffffff37; border-radius: 12px; font-size: 13px; }
.artnote b { display: block; color: white; font-size: 15px; }

/* 4. 栏目入口与档案卡 */
.section { padding: 68px 0; }
.section.alt { background: #0e1425; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.section-head h2 { margin: 7px 0 8px; font-size: clamp(24px, 3vw, 35px); line-height: 1.35; }
.section-head p { margin: 0; color: var(--muted); }
.more { font-size: 14px; color: var(--teal); }
.categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.cat { min-width: 0; min-height: 140px; padding: 19px; border: 1px solid #36415e; border-radius: 16px; background: linear-gradient(140deg, #202a4a, #12192d); }
.cat:hover, .story:hover { border-color: #b19bfa; transform: translateY(-3px); }
.cat span { display: block; color: var(--gold); font-size: 23px; line-height: 1.2; }
.cat strong { display: block; margin-top: 12px; font-size: 16px; }
.cat small { display: block; margin-top: 3px; color: #b6c0d6; font-size: 12px; }
.stories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.story { display: block; min-width: 0; overflow: hidden; border: 1px solid #323c55; border-radius: 16px; background: var(--surface); transition: transform .2s, border-color .2s; }
.story > img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.story-body { padding: 16px 17px 19px; }
.tag { color: var(--teal); font-size: 12px; }
.story h3 { margin: 5px 0 8px; font-size: 18px; line-height: 1.45; }
.story p { margin: 0; color: #b8c4db; font-size: 13px; line-height: 1.75; }

/* 5. 编辑精选及阅读指南 */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; overflow: hidden; border: 1px solid #4b4564; border-radius: 22px; background: linear-gradient(115deg, #292341, #151d34); }
.feature > img { width: 100%; height: 100%; min-height: 375px; object-fit: cover; }
.featurecopy { align-self: center; padding: 38px 38px 38px 0; }
.featurecopy h2 { font-size: clamp(24px, 3vw, 36px); line-height: 1.4; margin: 12px 0 16px; }
.featurecopy p { color: #c9d2e5; }
.pillrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 5px 12px; border: 1px solid #606984; border-radius: 30px; color: #d6dced; font-size: 12px; }
.editorial { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.editorial article { min-width: 0; padding: 26px; border: 1px solid #34405a; border-radius: 16px; background: #141d32; }
.editorial b { font-size: 27px; color: var(--gold); }
.editorial h3 { margin: 8px 0 10px; font-size: 19px; }
.editorial p { margin: 0; font-size: 14px; color: var(--muted); }

/* 6. 栏目页、详情页、页脚 */
.pagehero { padding: 42px 0 30px; background: radial-gradient(circle at 94% 0, #4e447c5c, transparent 45%); }
.pagehero h1 { margin: 8px 0 16px; font-size: clamp(30px, 4vw, 48px); line-height: 1.35; }
.pagehero p { max-width: 850px; color: var(--muted); }
.breadcrumbs { margin: 22px 0; font-size: 13px; color: #b7c2d9; }
.breadcrumbs a:hover, .internal a:hover, .aside a:hover { color: var(--teal); }
.articlelayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; padding: 22px 0 70px; }
.cover { width: 100%; max-height: 490px; object-fit: cover; border-radius: 18px; }
.prose { max-width: 820px; color: #d8e0ef; font-size: 16px; }
.prose h2 { margin: 36px 0 14px; font-size: clamp(21px, 2.5vw, 27px); line-height: 1.45; color: #fff; }
.prose p { margin: 0 0 19px; }
.articlelead { font-size: 17px; color: #d1d9eb; }
.aside { position: sticky; top: 105px; align-self: start; padding: 20px; border: 1px solid #34405a; border-radius: 15px; background: #151d31; }
.aside h2 { margin: 0 0 14px; font-size: 19px; }
.aside a { display: block; padding: 10px 0; border-bottom: 1px solid #364057; color: #c7d2e6; font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0 24px; color: var(--muted); font-size: 13px; }
.notice { padding: 13px 17px; border-left: 3px solid var(--teal); border-radius: 0 10px 10px 0; background: #152737; color: #c7d4e3; font-size: 13px; }
.empty { color: var(--muted); }
.conclusion { padding: 22px; border-radius: 14px; background: #1d263c; }
.internal { padding: 15px 0; border-bottom: 1px solid #34405a; }
.internal a { color: #e5dcff; }
.footer { padding: 40px 0; border-top: 1px solid #303a52; color: #b2bed2; font-size: 13px; }
.footgrid { display: flex; justify-content: space-between; gap: 32px; }
.footgrid > div { min-width: 0; }
.footgrid p { max-width: 600px; }
.footgrid a:hover { color: white; }

/* 7. 平板与手机适配：确保卡片、导航和横幅不越界 */
@media (max-width: 1100px) {
  .top { flex-wrap: wrap; padding: 14px 0; gap: 8px; }
  .nav { justify-content: flex-start; width: 100%; }
  .hero-grid { gap: 30px; }
  .categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 135px; }
  .container { width: min(calc(100% - 30px), var(--max)); }
  .top { display: block; min-height: 0; padding: 12px 0 8px; }
  .brand { font-size: 16px; }
  .brandmark { width: 33px; height: 33px; }
  .nav { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; overflow-x: auto; padding: 8px 0 5px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .nav a { flex: 0 0 auto; padding: 6px 9px; font-size: 12px; }
  .hero { padding: 42px 0 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero h1 { font-size: clamp(32px, 7vw, 46px); }
  .heroart > img { height: 330px; min-height: 0; }
  .section { padding: 43px 0; }
  .section-head { align-items: flex-start; }
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .story-body { padding: 12px; }
  .story h3 { font-size: 16px; }
  .story p { font-size: 12px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .feature > img { min-height: 0; max-height: 300px; }
  .featurecopy { padding: 24px; }
  .editorial { grid-template-columns: minmax(0, 1fr); }
  .articlelayout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 50px; }
  .aside { position: static; }
  .footgrid { display: block; }
}
@media (max-width: 390px) {
  .container { width: calc(100% - 24px); }
  .hero h1 { font-size: 31px; }
  .lead { font-size: 14px; }
  .button { padding: 10px 13px; font-size: 12px; }
  .button.ghost { margin-left: 4px; }
  .cat { min-height: 120px; padding: 13px; }
  .cat strong { font-size: 14px; }
  .cat small { font-size: 11px; }
  .story-body { padding: 10px; }
  .stats { gap: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cat, .story { transition: none; }
}
