@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ===== CSS 自定义变量 ===== */
:root {
  --black: #000000;
  --dark: #121212;
  --darker: #0a0a0a;
  --card-bg: #1a1a1a;
  --card-border: #222222;
  --strawberry: #e8294a;
  --strawberry-dim: #b01f37;
  --strawberry-glow: rgba(232, 41, 74, 0.25);
  --midnight: #1a1f3a;
  --midnight-light: #252d4a;
  --accent-blue: #3d6aff;
  --accent-gold: #c9a84c;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --link-color: #e8294a;
  --link-hover: #ff4d6d;
  --border-subtle: #2a2a2a;
  --radius-card: 28px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --nav-h: 64px;
  --announce-h: 36px;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Raleway', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--announce-h) + 16px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--black);
  color: var(--text-primary);
}

body.dark-oled {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--black);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== 点阵底纹 ===== */
.site-wrapper {
  position: relative;
  min-height: 100vh;
}

/* ===== 公告条 ===== */
.announcement-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--announce-h);
  background: var(--strawberry);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.announcement-text {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(40px); }
  100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .announcement-text { animation: none; }
}

/* ===== 导航 ===== */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 100;
  background: rgba(0, 0, 0, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--nav-h);
}

.main-nav {
  height: 100%;
}

.nav-details {
  height: 100%;
}

.nav-details[open] > summary .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-details[open] > summary .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-details[open] > summary .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-details > summary {
  list-style: none;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--nav-h);
  cursor: pointer;
  user-select: none;
  color: var(--text-primary);
  min-height: 40px;
}

.nav-details > summary::-webkit-details-marker { display: none; }

.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* Desktop menu */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  list-style: none;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  flex: 1;
}

.nav-right {
  justify-content: flex-end;
}

.nav-brand-center {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--strawberry);
  text-shadow: 0 0 10px var(--strawberry-glow);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-logo {
  max-height: 40px;
  width: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  min-height: 40px;
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--text-primary);
  background: rgba(232, 41, 74, 0.1);
  outline: none;
}

.nav-link:focus-visible {
  box-shadow: 0 0 0 2px var(--strawberry);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  background: var(--darker);
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(232,41,74,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.hero-collage {
  flex: 0 0 42%;
  position: relative;
  height: 280px;
}

.hero-img {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

.hero-img-1 {
  width: 65%;
  height: 75%;
  top: 0;
  left: 0;
  border: 1px solid var(--strawberry-dim);
  box-shadow: 0 0 20px rgba(232,41,74,0.2);
  z-index: 2;
}

.hero-img-2 {
  width: 58%;
  height: 68%;
  bottom: 0;
  right: 0;
  border: 1px solid var(--midnight-light);
  z-index: 1;
  opacity: 0.85;
}

.hero-collage-deco {
  position: absolute;
  width: 80px;
  height: 80px;
  bottom: 10px;
  left: 10px;
  background: radial-gradient(circle, var(--strawberry) 1.5px, transparent 1.5px);
  background-size: 10px 10px;
  opacity: 0.5;
  z-index: 0;
  border-radius: 50%;
}

.hero-copy {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--strawberry);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(232,41,74,0.2);
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.65;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--strawberry);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 30px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 0 16px var(--strawberry-glow);
  min-height: 48px;
}

.hero-cta:hover, .hero-cta:focus-visible {
  background: var(--strawberry-dim);
  box-shadow: 0 0 24px var(--strawberry-glow);
  transform: translateY(-1px);
  outline: none;
}

.hero-cta:focus-visible {
  box-shadow: 0 0 0 3px var(--strawberry), 0 0 16px var(--strawberry-glow);
}

/* ===== 内容主区 ===== */
.content-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

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

.page-article {
  width: 100%;
}

.page-content-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===== 正文内容 section 样式 ===== */
.page-content-sections section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--nav-h) + var(--announce-h) + 24px);
}

.page-content-sections section:last-child {
  border-bottom: none;
}

.page-content-sections h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.page-content-sections h2 + hr {
  border: none;
  border-top: 2px solid var(--strawberry);
  margin-bottom: 24px;
  width: 60px;
  margin-left: 0;
}

.page-content-sections h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

.page-content-sections h3 + hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.page-content-sections p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.page-content-sections p:last-child {
  margin-bottom: 0;
}

.page-content-sections a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.page-content-sections a:hover {
  color: var(--link-hover);
}

.page-content-sections ul,
.page-content-sections ol {
  padding-left: 1.5em;
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-content-sections li {
  margin-bottom: 6px;
}

.page-content-sections strong {
  color: var(--text-primary);
  font-weight: 600;
}

.page-content-sections em {
  color: var(--strawberry);
  font-style: normal;
}

/* 卡片风格 —— 底部强调线 + 28px 圆角 */
.page-content-sections .card,
.page-content-sections [class*="card"] {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-content-sections .card::after,
.page-content-sections [class*="card"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--strawberry), var(--accent-blue));
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

th {
  background: var(--dark);
  color: var(--text-primary);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--strawberry);
  font-weight: 600;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }

/* ===== 侧边栏 ===== */
.site-sidebar {
  flex: 0 0 260px;
  position: sticky;
  top: calc(var(--nav-h) + var(--announce-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - var(--announce-h) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-block {
  background: var(--dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.sidebar-block::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--strawberry), transparent);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.sidebar-heading {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.sidebar-block hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
  min-height: 40px;
}

.sidebar-link:hover, .sidebar-link:focus-visible {
  color: var(--text-primary);
  background: rgba(232, 41, 74, 0.08);
  outline: none;
}

.sidebar-link:focus-visible {
  box-shadow: 0 0 0 2px var(--strawberry);
}

.sidebar-tip p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.sidebar-dots {
  background: radial-gradient(circle, rgba(232,41,74,0.3) 1px, transparent 1px);
  background-size: 12px 12px;
  height: 80px;
  border-radius: var(--radius-card);
  opacity: 0.5;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--darker);
  border-top: 1px solid var(--border-subtle);
  margin-top: 0;
}

.footer-top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--strawberry);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-brand-col .footer-brand {
  margin-bottom: 14px;
}

.footer-brand-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--strawberry);
  text-shadow: 0 0 8px var(--strawberry-glow);
}

.footer-tagline {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-col ul,
.footer-contact-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-link:hover, .footer-link:focus-visible {
  color: var(--strawberry);
  outline: none;
}

.footer-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact-col address {
  font-style: normal;
  margin-bottom: 14px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy, .footer-policy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== 通用工具 ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
}

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--strawberry);
  outline-offset: 2px;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .nav-link,
  .sidebar-link,
  .footer-link,
  .hero-cta {
    transition-duration: 0.2s;
  }

  .nav-list li {
    animation: fadeSlideIn 0.4s ease both;
  }

  .nav-list li:nth-child(1) { animation-delay: 0.05s; }
  .nav-list li:nth-child(2) { animation-delay: 0.10s; }
  .nav-list li:nth-child(3) { animation-delay: 0.15s; }
  .nav-list li:nth-child(4) { animation-delay: 0.20s; }

  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .sidebar-block {
    animation: fadeIn 0.5s ease both;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .sidebar-block:hover {
    border-color: var(--strawberry-dim);
    transition: border-color 0.25s ease;
  }
}

/* ===== 移动端断点 ===== */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  .nav-details > summary {
    display: flex;
  }

  .nav-details > menu {
    display: none;
  }

  .nav-details[open] > menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: calc(var(--announce-h) + var(--nav-h));
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.98);
    border-bottom: 2px solid var(--strawberry);
    padding: 12px 0 20px;
    z-index: 99;
    height: auto;
    max-height: calc(100vh - var(--announce-h) - var(--nav-h));
    overflow-y: auto;
  }

  .nav-brand-center {
    order: -1;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    justify-content: flex-start;
  }

  .nav-left, .nav-right {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    padding: 14px 24px;
    font-size: 0.92rem;
    border-radius: 0;
    min-height: 48px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    padding: 32px 20px;
    gap: 28px;
  }

  .hero-collage {
    flex: none;
    width: 100%;
    height: 200px;
  }

  .hero-copy {
    text-align: left;
    align-items: flex-start;
    width: 100%;
  }

  .content-wrap {
    flex-direction: column;
    padding: 32px 20px;
    gap: 32px;
  }

  .site-sidebar {
    position: static;
    max-height: none;
    width: 100%;
    flex: none;
  }

  .footer-top {
    grid-template-columns: 1fr;
    padding: 40px 20px 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 6px;
  }

  .footer-link {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: auto;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-collage {
    height: 160px;
  }

  .announcement-bar {
    height: auto;
    min-height: 36px;
    padding: 6px 12px;
  }

  .announcement-text {
    animation: none;
    white-space: normal;
    text-align: center;
    font-size: 0.72rem;
  }

  .page-content-sections h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 375px) {
  .hero-inner {
    padding: 24px 16px;
  }

  .content-wrap {
    padding: 24px 16px;
  }

  .nav-link {
    padding: 14px 16px;
  }
}
