@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Patrick Hand', 'Kalam', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  background-color: #26171a;
  color: #f5e8ec;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: #eb879c;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease;
}

a:hover {
  color: #ffb6c1;
  opacity: 0.9;
}

a:focus-visible {
  outline: 2px solid #eb879c;
  outline-offset: 3px;
  border-radius: 4px;
}

ul {
  list-style: none;
}

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

/* ===== Announce Bar ===== */
.announce-bar {
  background: linear-gradient(90deg, #eb879c 0%, #ffb6c1 100%);
  color: #26171a;
  text-align: center;
  font-family: 'Kalam', cursive;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* ===== Header ===== */
.site-header {
  background: rgba(38, 23, 26, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 37px;
  z-index: 100;
  border-bottom: 1px solid rgba(235, 135, 156, 0.2);
  box-shadow: 0 2px 16px rgba(235, 135, 156, 0.12);
}

.header-brand-row {
  padding: 14px 5vw 10px;
  border-bottom: 1px solid rgba(255, 182, 193, 0.1);
}

.header-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffb6c1;
  font-family: 'Kalam', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 200ms ease;
}

.brand-link:hover {
  color: #eb879c;
}

.site-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #eb879c, #ffb6c1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #26171a;
  font-weight: 700;
}

.brand-name {
  letter-spacing: 0.02em;
}

.header-nav-row {
  padding: 6px 5vw;
}

/* ===== Nav Contract: header > nav > p > a ===== */
.site-nav {
  width: 100%;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  align-items: center;
}

.nav-links a {
  color: #f5e8ec;
  font-size: 0.9rem;
  font-family: 'Patrick Hand', cursive;
  padding: 10px 14px;
  border-radius: 20px;
  display: inline-block;
  min-height: 40px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(235, 135, 156, 0.18);
  color: #ffb6c1;
  transform: translateY(-1px);
}

.nav-links a:focus-visible {
  outline: 2px solid #eb879c;
  outline-offset: 2px;
}

/* ===== Main & Wrap ===== */
main {
  min-height: 60vh;
}

.wrap {
  width: 100%;
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(155deg, #2e1a1f 0%, #3a1e26 40%, #26171a 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(235, 135, 156, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-article {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 5vw 80px;
  position: relative;
}

.hero-bg-text {
  position: absolute;
  right: 3vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Kalam', cursive;
  font-size: clamp(120px, 22vw, 280px);
  font-weight: 700;
  color: rgba(235, 135, 156, 0.06);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.05em;
}

.hero-content {
  text-align: right;
  max-width: 700px;
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: 'Kalam', cursive;
  font-size: 0.95rem;
  color: #eb879c;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero-title {
  font-family: 'Kalam', cursive;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: #ffb6c1;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(235, 135, 156, 0.3);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(245, 232, 236, 0.75);
  line-height: 1.7;
  max-width: 480px;
  margin-left: auto;
}

/* ===== Content Section ===== */
.content-section {
  padding: 60px 5vw;
  background: #26171a;
}

.content-article {
  max-width: 1200px;
  margin: 0 auto;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

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

/* ===== Page Content (injected HTML) ===== */
.page-content {
  color: #f5e8ec;
}

.page-content h2 {
  font-family: 'Kalam', cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #ffb6c1;
  margin: 48px 0 16px;
  line-height: 1.3;
}

.page-content h3 {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  color: #eb879c;
  margin: 32px 0 12px;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(245, 232, 236, 0.88);
  margin-bottom: 16px;
}

.page-content ul,
.page-content ol {
  padding-left: 1.4em;
  margin-bottom: 16px;
}

.page-content li {
  line-height: 1.75;
  color: rgba(245, 232, 236, 0.85);
  margin-bottom: 8px;
}

.page-content ul {
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content a {
  color: #eb879c;
  text-decoration: underline;
  text-decoration-color: rgba(235, 135, 156, 0.4);
}

.page-content a:hover {
  color: #ffb6c1;
}

.page-content strong {
  color: #ffb6c1;
  font-weight: 700;
}

.page-content div {
  scroll-margin-top: 130px;
  padding: 32px;
  background: rgba(255, 182, 193, 0.05);
  border-radius: 28px;
  margin-bottom: 28px;
  border: 1px solid rgba(235, 135, 156, 0.12);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(235, 135, 156, 0.06);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.page-content div:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 12px 32px rgba(235, 135, 156, 0.12);
  transform: translateY(-2px);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.page-content th,
.page-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(235, 135, 156, 0.15);
}

.page-content th {
  color: #ffb6c1;
  font-family: 'Kalam', cursive;
  font-weight: 700;
}

.page-content blockquote {
  border-left: 3px solid #eb879c;
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(235, 135, 156, 0.08);
  border-radius: 0 12px 12px 0;
  color: rgba(245, 232, 236, 0.8);
  font-style: italic;
}

.page-content small {
  display: inline-block;
  font-size: 0.75rem;
  color: #eb879c;
  font-family: 'Kalam', cursive;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 4px;
}

/* h2 前 small 眉题 */
.page-content small + h2,
.page-content small + h3 {
  margin-top: 4px;
}

/* ===== Stagger animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .page-content div {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 300ms ease forwards;
  }

  .page-content div:nth-child(1) { animation-delay: 50ms; }
  .page-content div:nth-child(2) { animation-delay: 120ms; }
  .page-content div:nth-child(3) { animation-delay: 190ms; }
  .page-content div:nth-child(4) { animation-delay: 260ms; }
  .page-content div:nth-child(5) { animation-delay: 330ms; }
  .page-content div:nth-child(6) { animation-delay: 400ms; }
  .page-content div:nth-child(7) { animation-delay: 470ms; }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ===== Aside ===== */
.content-aside {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  background: rgba(255, 182, 193, 0.07);
  border: 1px solid rgba(235, 135, 156, 0.15);
  border-radius: 28px;
  padding: 24px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.18),
    0 6px 20px rgba(235, 135, 156, 0.08);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.aside-card:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.22),
    0 10px 28px rgba(235, 135, 156, 0.14);
  transform: translateY(-2px);
}

.aside-eyebrow {
  display: block;
  font-size: 0.72rem;
  color: #eb879c;
  font-family: 'Kalam', cursive;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.aside-title {
  font-family: 'Kalam', cursive;
  font-size: 1rem;
  color: #ffb6c1;
  margin-bottom: 14px;
  font-weight: 700;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-nav-list li a {
  display: block;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  color: rgba(245, 232, 236, 0.8);
  font-family: 'Patrick Hand', cursive;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
}

.aside-nav-list li a:hover {
  background: rgba(235, 135, 156, 0.15);
  color: #ffb6c1;
  transform: translateX(4px);
}

.aside-tip {
  background: rgba(235, 135, 156, 0.08);
}

.aside-tip p {
  font-size: 0.88rem;
  color: rgba(245, 232, 236, 0.75);
  line-height: 1.65;
  margin: 0;
}

/* ===== Footer ===== */
.site-footer {
  background: rgba(20, 10, 13, 0.95);
  border-top: 1px solid rgba(235, 135, 156, 0.15);
  padding: 20px 5vw;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo a {
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  color: #eb879c;
  display: flex;
  align-items: center;
  min-height: 40px;
}

.footer-logo a:hover {
  color: #ffb6c1;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer-nav a {
  color: rgba(245, 232, 236, 0.6);
  padding: 10px 8px;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 200ms ease;
  font-family: 'Patrick Hand', cursive;
}

.footer-nav a:hover {
  color: #eb879c;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(245, 232, 236, 0.4);
  font-family: 'Patrick Hand', cursive;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-card {
    flex: 1 1 240px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 120px;
  }

  .announce-bar {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  .site-header {
    top: 33px;
  }

  .header-brand-row {
    padding: 10px 16px 8px;
  }

  .header-nav-row {
    padding: 4px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .nav-links a {
    font-size: 0.82rem;
    padding: 10px 10px;
  }

  .hero-article {
    padding: 60px 16px 60px;
  }

  .hero-bg-text {
    font-size: clamp(80px, 35vw, 160px);
    opacity: 0.5;
  }

  .hero-content {
    text-align: right;
  }

  .content-section {
    padding: 40px 16px;
  }

  .page-content div {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .aside-card {
    border-radius: 20px;
    padding: 18px 16px;
  }

  .content-aside {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-nav {
    gap: 0;
  }
}

@media (max-width: 375px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 10px 8px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: #26171a;
}

::-webkit-scrollbar-thumb {
  background: rgba(235, 135, 156, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(235, 135, 156, 0.65);
}

/* ===== Focus visible global ===== */
:focus-visible {
  outline: 2px solid #eb879c;
  outline-offset: 3px;
}

/* ===== Selection ===== */
::selection {
  background: rgba(235, 135, 156, 0.35);
  color: #ffb6c1;
}

button[aria-expanded]{min-width:44px;min-height:44px}
