/* ========== M6娱乐 全站共享样式 /assets/site.css ========== */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 300;
  line-height: 1.75;
  color: #F0EAD6;
  background-color: #0A1128;
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(157, 78, 221, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 5%, rgba(212, 175, 55, 0.06) 0%, transparent 40%),
    linear-gradient(rgba(163, 172, 191, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 172, 191, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}

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

a {
  color: inherit;
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #F0EAD6;
}

/* ---------- CSS 变量 ---------- */
:root {
  --bg-primary: #0A1128;
  --bg-card: #162A45;
  --bg-deep: #060D1F;
  --gold: #D4AF37;
  --gold-bright: #F0D77B;
  --purple: #9D4EDD;
  --purple-deep: #4A0E4E;
  --text-primary: #F0EAD6;
  --text-secondary: #A3ACBF;
  --border-fine: #2A3F5F;
  --glow-purple: rgba(157, 78, 221, 0.4);
  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --container-max: 1200px;
  --transition-base: 0.2s ease;
  --radius: 2px;
}

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---------- 容器 ---------- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 500;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: #0A1128;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- 滚动进度条 ---------- */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 400;
  pointer-events: none;
  background: transparent;
}

.page-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--purple) 100%);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 17, 40, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-fine);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(157, 78, 221, 0.3);
}

/* 刊头 */
.masthead {
  border-bottom: 1px solid var(--border-fine);
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.08) 0%, transparent 100%);
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  transition: padding 0.2s ease;
}

.site-header.is-scrolled .masthead-grid {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.masthead-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.masthead-side-right {
  justify-content: flex-end;
}

.masthead-issue {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  white-space: nowrap;
  border-left: 2px solid var(--purple);
  padding-left: 0.625rem;
  line-height: 1.6;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  text-decoration: none;
  line-height: 1;
}

.brand-logo-mark {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
  transition: font-size 0.2s ease;
}

.site-header.is-scrolled .brand-logo-mark {
  font-size: 2.25rem;
}

.brand-logo-text {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text-primary);
  line-height: 1;
  transition: font-size 0.2s ease;
}

.site-header.is-scrolled .brand-logo-text {
  font-size: 1.375rem;
}

.brand-tagline {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.4em;
  white-space: nowrap;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.brand-tagline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--gold);
}

/* 导航条 */
.nav-bar {
  position: relative;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.875rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--purple) 100%);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.05);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold);
  font-weight: 500;
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 3rem;
  height: 3rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-fine);
  margin-top: 4rem;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 25%, var(--purple) 75%, transparent 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  text-decoration: none;
  line-height: 1;
}

.footer-logo-mark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.25em;
  line-height: 1;
}

.footer-tagline {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}

.footer-tagline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.75rem;
  height: 1px;
  background: var(--purple);
}

.footer-meta {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-left: 2px solid var(--purple);
  padding-left: 0.875rem;
  margin-top: 0.5rem;
}

.footer-col-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.22em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.625rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1.75rem;
  height: 2px;
  background: var(--purple);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-list a {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.6;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-list a:hover {
  color: var(--gold-bright);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid var(--border-fine);
  background: rgba(0, 0, 0, 0.25);
  padding: 1.25rem 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-copyright {
  margin: 0;
}

.footer-icp {
  margin: 0;
  color: var(--text-secondary);
}

.footer-icp::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--gold);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.footer-trust {
  margin: 0;
  flex-basis: 100%;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  opacity: 0.7;
  line-height: 1.6;
  max-width: 720px;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 42, 69, 0.85);
  border: 1px solid var(--border-fine);
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  z-index: 90;
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
}

.back-to-top-icon {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.125rem;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid var(--border-fine);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.06);
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #0A1128;
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #0A1128;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.btn-secondary {
  border-color: var(--purple);
  color: var(--purple);
}

.btn-secondary:hover {
  border-color: var(--purple);
  background: rgba(157, 78, 221, 0.1);
  color: #B879E8;
  box-shadow: 0 0 16px rgba(157, 78, 221, 0.2);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0.875rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-fine);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 0.75rem;
  color: rgba(157, 78, 221, 0.6);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--gold-bright);
}

.breadcrumb-item[aria-current="page"] {
  color: var(--gold);
}

/* ---------- 正文容器 ---------- */
.content-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
  min-height: 60vh;
}

.content-main {
  min-width: 0;
}

.content-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
}

.content-split .content-aside {
  position: sticky;
  top: 8rem;
}

/* ---------- 基础网格 ---------- */
.grid-base {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* ---------- 区域标题 ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--purple) 100%);
}

.section-annotation {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-fine);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-accent {
  border-top: 2px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(157, 78, 221, 0.1), 0 4px 24px rgba(157, 78, 221, 0.08);
}

.card-accent:hover {
  box-shadow: 0 0 0 1px rgba(157, 78, 221, 0.2), 0 4px 28px rgba(157, 78, 221, 0.15);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tag:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

/* ---------- 旁注 ---------- */
.note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--purple);
  padding: 0.625rem 1rem;
  margin: 1.5rem 0;
  line-height: 1.7;
  background: rgba(157, 78, 221, 0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- 分隔线 ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border-fine);
  margin: 2rem 0;
  position: relative;
}

.divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--purple);
}

.glow-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  margin: 2.5rem 0;
  box-shadow: 0 0 12px var(--glow-purple);
}

/* ---------- 响应式图片容器 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
    var(--bg-card);
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
}

.image-frame::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.image-frame-4x3::before {
  padding-top: 75%;
}

.image-frame-1x1::before {
  padding-top: 100%;
}

.image-frame > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame[data-placeholder] {
  background:
    linear-gradient(135deg, rgba(157, 78, 221, 0.08) 0%, transparent 50%),
    var(--bg-card);
}

/* ---------- 响应式断点 ---------- */
@media (max-width: 1024px) {
  .content-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content-split .content-aside {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .grid-base {
    grid-template-columns: repeat(6, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 860px) {
  .masthead-grid {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .site-header.is-scrolled .masthead-grid {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .nav-bar-inner {
    justify-content: flex-end;
    min-height: 3rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-top: 1px solid var(--border-fine);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.3s ease;
  }

  .site-nav[data-open] {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
  }

  .nav-link {
    padding: 0.875rem 1.5rem;
    border-left: 2px solid transparent;
    white-space: normal;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    border-left-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
  }

  .nav-link:hover {
    background: rgba(212, 175, 55, 0.08);
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }

  .masthead-grid {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }

  .masthead-side:first-child {
    display: none;
  }

  .masthead-side-right {
    justify-content: flex-end;
  }

  .brand-logo-mark {
    font-size: 2.125rem;
  }

  .site-header.is-scrolled .brand-logo-mark {
    font-size: 1.875rem;
  }

  .brand-logo-text {
    font-size: 1.375rem;
  }

  .site-header.is-scrolled .brand-logo-text {
    font-size: 1.125rem;
  }

  .brand-tagline {
    font-size: 0.625rem;
    letter-spacing: 0.25em;
    padding-left: 1rem;
  }

  .brand-tagline::before {
    width: 0.625rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-trust {
    flex-basis: auto;
  }

  .content-shell {
    padding: 1.5rem 1rem 3.5rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .grid-base {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* ---------- 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
