@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #1a0d10;
  color: #26171a;
}

body {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.7;
  background: #fdf0f3;
  color: #26171a;
  min-height: 100vh;
  padding-bottom: 120px;
}

/* ===== 滚动锚点偏移（底部固定导航高度） ===== */
section[id] {
  scroll-margin-top: 20px;
}

/* ===== 公告条 ===== */
.announce-bar {
  background: #26171a;
  color: #ffb6c1;
  text-align: center;
  padding: 8px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  overflow: hidden;
  white-space: nowrap;
}

.announce-text {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(50vw); }
  100% { transform: translateX(-100%); }
}

/* ===== 站头 ===== */
.site-header {
  background: #26171a;
  padding: 12px 20px;
  text-align: center;
  border-bottom: 3px solid #eb879c;
}

.brand-link {
  text-decoration: none;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
}

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

.logo-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #ffb6c1;
  text-shadow: 2px 2px 0 #eb879c, 4px 4px 0 #26171a;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ===== Hero ===== */
.hero-wrap {
  position: relative;
  background: linear-gradient(135deg, #26171a 0%, #3d1f26 50%, #eb879c 100%);
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 40px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-deco {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.pixel-icon {
  font-size: 36px;
  display: block;
  text-align: center;
  filter: drop-shadow(0 0 8px #eb879c);
}

.hero-text {
  text-align: right;
  flex: 1;
}

.hero-h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(14px, 3vw, 22px);
  color: #ffb6c1;
  line-height: 1.6;
  text-shadow: 3px 3px 0 #eb879c, 6px 6px 0 rgba(38,23,26,0.5);
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.hero-tagline {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #ffd6de;
  max-width: 400px;
  margin-left: auto;
  line-height: 1.5;
}

.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 50px;
  background: #fdf0f3;
  clip-path: polygon(0 40px, 100% 0, 100% 50px, 0 50px);
}

/* ===== 主区域 ===== */
main {
  width: 100%;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* ===== 内容区布局：aside 在左，article 在右 ===== */
.content-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ===== 侧边栏 ===== */
.sidebar {
  flex: 0 0 200px;
  position: sticky;
  top: 20px;
}

.sidebar-inner {
  background: #fff5f7;
  border: 2px solid #eb879c;
  border-radius: 28px;
  padding: 20px 16px;
  box-shadow:
    0 2px 4px rgba(235,135,156,0.15),
    0 4px 12px rgba(235,135,156,0.1);
}

.sidebar-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #eb879c;
  margin-bottom: 6px;
  line-height: 1.6;
}

.sidebar .subtitle {
  font-size: 15px;
  color: #9c6070;
  margin-bottom: 14px;
  line-height: 1.4;
}

.sidebar-nav details {
  width: 100%;
}

.sidebar-summary {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #26171a;
  cursor: pointer;
  padding: 8px 4px;
  border-bottom: 1px solid #ffb6c1;
  margin-bottom: 10px;
  list-style: none;
  outline: none;
  transition: color 200ms;
}

.sidebar-summary:focus-visible {
  outline: 2px solid #eb879c;
  outline-offset: 2px;
  border-radius: 4px;
}

.sidebar-summary:hover {
  color: #eb879c;
}

.sidebar-nav menu,
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: #26171a;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 12px;
  transition: background 200ms, color 200ms;
  line-height: 1.3;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: #ffb6c1;
  color: #26171a;
  outline: 2px solid #eb879c;
}

/* ===== 主文内容 ===== */
.main-content {
  flex: 1;
  min-width: 0;
}

/* 正文排版 */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.6;
  margin-top: 2em;
  margin-bottom: 0.8em;
}

.main-content h2 {
  font-size: clamp(12px, 2.5vw, 16px);
  color: #eb879c;
  border-left: 4px solid #ffb6c1;
  padding-left: 14px;
  padding-top: 4px;
  padding-bottom: 4px;
  background: linear-gradient(90deg, rgba(255,182,193,0.2) 0%, transparent 100%);
  border-radius: 0 8px 8px 0;
}

.main-content h3 {
  font-size: clamp(10px, 2vw, 13px);
  color: #26171a;
}

.main-content p {
  font-size: 19px;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: #3d1f26;
}

.main-content ul,
.main-content ol {
  padding-left: 24px;
  margin-bottom: 1.2em;
}

.main-content li {
  font-size: 18px;
  line-height: 1.7;
  color: #3d1f26;
  margin-bottom: 0.4em;
}

.main-content a {
  color: #eb879c;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms;
}

.main-content a:hover,
.main-content a:focus-visible {
  color: #c95f7a;
  outline: 2px solid #eb879c;
  outline-offset: 2px;
  border-radius: 2px;
}

.main-content section {
  margin-bottom: 48px;
  padding: 28px 24px;
  background: #fff5f7;
  border: 2px solid #ffb6c1;
  border-radius: 28px;
  box-shadow:
    0 2px 4px rgba(235,135,156,0.12),
    0 6px 20px rgba(235,135,156,0.08);
  transition: transform 250ms, box-shadow 250ms;
  animation: revealUp 0.5s ease both;
}

.main-content section:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(235,135,156,0.18),
    0 10px 28px rgba(235,135,156,0.12);
}

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

/* ===== 页脚 ===== */
.site-footer {
  background: #26171a;
  color: #ffb6c1;
  padding: 32px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  max-width: 100%;
  border-top: 3px solid #eb879c;
}

.site-footer > section {
  flex: 1 1 220px;
}

.footer-logo {
  margin-bottom: 10px;
}

.footer-logo .logo-text {
  font-size: 10px;
  color: #ffb6c1;
  text-shadow: 2px 2px 0 #eb879c;
}

.footer-desc {
  font-size: 17px;
  color: #c9909d;
  line-height: 1.6;
}

.footer-links {
  text-align: right;
}

.footer-copy {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #eb879c;
  margin-bottom: 10px;
  line-height: 1.7;
}

.footer-note {
  font-size: 15px;
  color: #9c6070;
  line-height: 1.5;
}

/* ===== 底部固定导航条 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #26171a;
  border-top: 3px solid #eb879c;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(235,135,156,0.25);
}

.bottom-nav-brand {
  background: #eb879c;
  text-align: center;
  padding: 0 8px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bnav-brand-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #26171a;
  letter-spacing: 0.05em;
  line-height: 1.4;
  word-break: break-all;
}

.bottom-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  padding: 4px 8px;
  margin: 0;
}

.bottom-nav-list li {
  flex: 0 0 auto;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: #ffb6c1;
  text-decoration: none;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: 8px;
  transition: background 200ms, color 200ms;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #eb879c;
  color: #26171a;
  outline: 2px solid #ffb6c1;
  outline-offset: -2px;
}

/* ===== 卡片描边圆角风格 ===== */
.card {
  background: #fff5f7;
  border: 2px solid #eb879c;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(235,135,156,0.1);
  transition: transform 250ms, box-shadow 250ms;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235,135,156,0.2);
}

/* ===== 像素风格小标签 ===== */
.pixel-badge {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: #eb879c;
  color: #26171a;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ===== 焦点可见性（全局） ===== */
:focus-visible {
  outline: 2px solid #eb879c;
  outline-offset: 2px;
}

/* ===== 图片响应式 ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ===== 时间标签 ===== */
time {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #9c6070;
  display: inline-block;
  margin-bottom: 6px;
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .announce-text {
    animation: none;
  }
  .hero-deco {
    animation: none;
  }
}

/* ===== 平板断点 ===== */
@media (max-width: 768px) {
  .content-section {
    flex-direction: column;
  }

  .sidebar {
    flex: none;
    width: 100%;
    position: static;
  }

  .sidebar-inner {
    border-radius: 16px;
    padding: 16px;
  }

  .sidebar-nav menu,
  .sidebar-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-link {
    font-size: 17px;
    padding: 5px 12px;
    border: 1px solid #ffb6c1;
    border-radius: 20px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-end;
    padding: 30px 16px 56px;
  }

  .hero-deco {
    flex-direction: row;
    gap: 16px;
  }

  .hero-tagline {
    font-size: 19px;
  }

  .site-footer {
    flex-direction: column;
    gap: 20px;
  }

  .footer-links {
    text-align: left;
  }

  .bottom-nav-list {
    gap: 2px;
    padding: 3px 4px;
  }

  .nav-link {
    font-size: 15px;
    padding: 6px 7px;
  }

  .main-content section {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .wrap {
    padding: 24px 12px 40px;
  }
}

/* ===== 移动端 375px ===== */
@media (max-width: 400px) {
  .hero-h1 {
    font-size: 12px;
  }

  .hero-tagline {
    font-size: 17px;
  }

  .announce-bar {
    font-size: 8px;
  }

  .nav-link {
    font-size: 14px;
    padding: 5px 5px;
    min-height: 40px;
  }

  .logo-text {
    font-size: 10px;
  }

  .bottom-nav-brand {
    min-height: 44px;
    padding: 4px 8px;
  }

  .bnav-brand-text {
    font-size: 7px;
  }

  .bottom-nav-list {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bottom-nav-list::-webkit-scrollbar {
    display: none;
  }
}
