/* Boomb6's Storage — 2000s 橙白 + 原子灰 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;800;900&family=Noto+Sans+SC:wght@400;600;800;900&family=Noto+Sans:wght@400;600;800;900&display=swap');

:root {
  --bg: #ffffff;
  --bg-soft: #fff8f2;
  --bg-card: #ffffff;
  --text: #2a2a2a;
  --text-muted: #6b635c;
  --orange: #ff7a1a;
  --orange-deep: #e85d00;
  --orange-light: #ffb347;
  --orange-pale: #ffe8d4;
  --atomic-gray: #b8b8c0;
  --atomic-gray-deep: #7a7a85;
  --atomic-gray-pale: #ececee;
  --border: #ffc99a;
  --shadow: 0 4px 0 rgba(232, 93, 0, 0.12), 0 8px 24px rgba(255, 122, 26, 0.08);
  --radius: 10px;
  --nav-height: 88px;
  --nav-max-width: 1600px;
  --nav-inline: 4.5rem;
  --nav-link-gap: 4.5rem;
  --max-width: 1280px;
  --space-section: 5rem;
  --space-block: 3rem;
  --space-inline: 3.5rem;
  --font-ja: 'Noto Sans JP', 'MS PGothic', sans-serif;
  --font-zh: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-en: 'Noto Sans', 'Trebuchet MS', sans-serif;
  --fw-logo: 900;
  --fw-nav: 600;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  font-weight: 400;
  background: var(--bg);
  background-image:
    linear-gradient(180deg, var(--atomic-gray-pale) 0%, transparent 28%),
    linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 45%, #fff 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.85;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.lang-zh { font-family: var(--font-zh); }
body.lang-en { font-family: var(--font-en); }

/* 顶部导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--orange);
  box-shadow: 0 2px 0 var(--atomic-gray-pale);
}
.nav-inner {
  width: 100%; max-width: var(--nav-max-width); margin: 0 auto;
  padding: 0 var(--nav-inline); min-height: var(--nav-height);
  display: flex; align-items: center; justify-content: flex-start; gap: 5rem;
}
.site-logo {
  font-size: 1.55rem; font-weight: var(--fw-logo); color: var(--orange-deep);
  text-decoration: none; letter-spacing: -0.02em; white-space: nowrap;
  flex-shrink: 0; margin-right: auto; line-height: 1.15; -webkit-font-smoothing: antialiased;
}
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem var(--nav-link-gap); list-style: none; margin-left: auto;
}
.nav-links a {
  color: var(--text); text-decoration: none; font-size: 1rem; font-weight: var(--fw-nav);
  padding: 0.6rem 0.15rem; border-bottom: 3px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--orange); }
.nav-links a.active { color: var(--orange-deep); border-bottom-color: var(--atomic-gray-deep); }
.lang-switcher { display: flex; gap: 0.5rem; flex-shrink: 0; margin-left: 3.5rem; }
.lang-switcher button {
  background: var(--bg); border: 2px solid var(--border); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 600; padding: 0.35rem 0.65rem; border-radius: 6px;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.lang-switcher button:hover, .lang-switcher button.active {
  background: var(--orange); border-color: var(--orange-deep); color: #fff;
}

/* 主内容 */
main {
  flex: 1; max-width: var(--max-width); width: 100%; margin: 0 auto;
  padding: var(--space-section) var(--space-inline) 6rem;
}
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: 0.03em; color: var(--orange-deep); }
.page-desc { color: var(--text-muted); font-size: 1rem; margin-bottom: var(--space-section); max-width: 48rem; line-height: 1.95; }

/* =========================================
   ✅ 首页专属样式（轻盈中心橙色渐变 + 小标题灰色描边）
   ========================================= */
body[data-page="home"] {
  background-image: 
    url('../assets/images/home-overlay-light.png'),
    url('../assets/images/home-bg.jpg') !important;
  background-size: cover, cover !important;
  background-position: center, center !important;
  background-attachment: fixed, fixed !important;
  background-repeat: no-repeat, no-repeat !important;
  background-color: var(--bg);
}

/* 首页大标题/描述：白色+轻微阴影 */
.hero h1, .hero p, 
body[data-page="home"] .page-title, 
body[data-page="home"] .page-desc {
  color: #ffffff !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25) !important;
}

/* ✅ 新增：首页小标题灰色描边，提升清晰度 */
.quick-card h3 {
  color: var(--orange-deep) !important;
  text-shadow: none !important;
  /* 使用 paint-order 让描边在文字下层，不侵蚀字形 */
  -webkit-text-stroke: 0.8px var(--atomic-gray-deep);
  paint-order: stroke fill;
}
/* ========================================= */

/* 首页布局 */
.main-home {
  position: relative; flex: 1; width: 100%; max-width: none; margin: 0; padding: 0;
  min-height: calc(100svh - var(--nav-height) - 5.5rem);
  display: flex; flex-direction: column; align-items: stretch; overflow: hidden;
}
.hero {
  position: relative; z-index: 1; flex: 1; width: 100%; max-width: var(--max-width);
  margin: 0 auto; padding: 5rem var(--space-inline) 6rem; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-content { position: relative; width: 100%; }
.hero-avatar {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--orange); box-shadow: 0 0 0 4px var(--atomic-gray-pale), var(--shadow);
  margin-bottom: 2.5rem; background: var(--orange-pale);
}
.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1.25rem; }
.hero p { max-width: 48rem; margin: 0 auto 4rem; font-size: 1.05rem; line-height: 1.95; }
.quick-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-block); margin-top: 3rem; max-width: 960px; margin-left: auto; margin-right: auto;
}
.quick-card {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  border: 2px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem;
  min-height: 9.5rem; text-decoration: none; color: var(--text); text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.92) !important; backdrop-filter: blur(4px);
}
.quick-card:hover {
  transform: translateY(-4px); border-color: var(--atomic-gray-deep);
  box-shadow: 0 6px 0 rgba(122, 122, 133, 0.25), 0 12px 28px rgba(255, 122, 26, 0.12);
}
.quick-card .icon {
  display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  margin: 0 0 0.75rem; font-size: 1.75rem; line-height: 1; color: var(--orange); flex-shrink: 0;
}
.quick-card .icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.quick-card h3 { margin: 0; font-size: 0.95rem; font-weight: 600; line-height: 1.4; }

/* 卡片通用 */
.card {
  background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 3.25rem; margin-bottom: var(--space-block); box-shadow: var(--shadow);
}
.card h2 {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: 0.75rem;
  border-bottom: 2px dashed var(--atomic-gray); color: var(--orange-deep);
}

/* 音源页 */
.voicebank-info { display: flex; flex-wrap: wrap; gap: 4rem; align-items: flex-start; }
.voicebank-cover {
  width: 220px; height: 220px; border-radius: var(--radius); object-fit: cover;
  background: var(--orange-pale); flex-shrink: 0; border: 3px solid var(--orange);
  box-shadow: 0 0 0 3px var(--atomic-gray-pale);
}
.voicebank-meta { flex: 1; min-width: 240px; }
.voicebank-char-name { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 1.5rem; color: var(--orange-deep); }
.voicebank-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 1rem 2.5rem; font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.8; }
.voicebank-meta dt { color: var(--text-muted); font-weight: 600; }
.voicebank-meta dd { font-weight: 500; }
.audio-preview { margin: 2rem 0; }
.audio-preview audio { width: 100%; max-width: 420px; height: 44px; }
.audio-preview label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--orange-deep); margin-bottom: 0.75rem; }
.btn-download {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 100%);
  color: #fff; text-decoration: none; padding: 0.85rem 1.5rem; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; border: 2px solid var(--orange-deep); cursor: pointer;
  transition: filter 0.2s, transform 0.2s; box-shadow: 0 3px 0 var(--orange-deep);
}
.btn-download:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-download:active { transform: translateY(2px); box-shadow: none; }
.btn-download svg { width: 18px; height: 18px; }
.usage-note {
  font-size: 0.85rem; color: var(--text-muted); margin-top: 1.5rem; line-height: 1.85;
  padding: 1rem 1.25rem; background: var(--atomic-gray-pale);
  border-left: 4px solid var(--atomic-gray-deep); border-radius: 0 var(--radius) var(--radius) 0;
}

/* 立绘画廊 */
body[data-page="gallery"] main { max-width: 1100px; }
.gallery-stack { display: flex; flex-direction: column; align-items: center; gap: var(--space-section); width: 100%; }
.gallery-item { width: 100%; max-width: 1000px; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.gallery-item figcaption { font-size: 1.05rem; font-weight: 700; color: var(--orange-deep); padding: 0 0.25rem; letter-spacing: 0.03em; }
.gallery-figure-media {
  display: flex; justify-content: center; align-items: center; width: 100%; padding: 1.75rem;
  background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color 0.2s, box-shadow 0.2s; min-height: 160px;
}
.gallery-item:hover .gallery-figure-media { border-color: var(--atomic-gray-deep); box-shadow: 0 6px 0 rgba(122, 122, 133, 0.2), 0 12px 28px rgba(255, 122, 26, 0.1); }
.gallery-item img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(85vh, 1200px); object-fit: contain; background: transparent; cursor: zoom-in; }
.gallery-item.is-portrait img { max-height: min(90vh, 1400px); }
.gallery-item.is-landscape img { max-width: 100%; max-height: min(72vh, 900px); }
.gallery-item.is-square img { max-width: min(100%, 720px); max-height: min(85vh, 900px); }
.gallery-figure-media:has(img.is-broken) { min-height: 200px; background: linear-gradient(135deg, var(--orange-pale) 0%, var(--atomic-gray-pale) 100%); }
.gallery-figure-media:has(img.is-broken)::after { content: 'Image'; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }

/* 灯箱 */
.lightbox { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(232, 93, 0, 0.88); align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { width: auto; height: auto; max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: var(--radius); border: 4px solid #fff; box-shadow: 0 0 0 4px var(--atomic-gray); }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: #fff; border: 2px solid var(--orange-deep); color: var(--orange-deep); font-size: 1.5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; cursor: pointer; line-height: 1; font-weight: 700; }

/* 视频 */
.video-grid { display: grid; gap: var(--space-section); }
.video-item { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background: #1a1a1a; border-bottom: 3px solid var(--orange); }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-item .video-info { padding: 2rem 2.25rem; }
.video-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--orange-deep); }
.video-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }

/* 周边 */
.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-block); }
.merch-item { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: border-color 0.2s; }
.merch-item:hover { border-color: var(--atomic-gray-deep); }
.merch-item img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--orange-pale); border-bottom: 2px solid var(--border); }
.merch-item .merch-body { padding: 2rem 2.25rem; }
.merch-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--orange-deep); }
.merch-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }
.merch-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.65rem; background: var(--atomic-gray-pale); border: 1px solid var(--atomic-gray); border-radius: 6px; margin-top: 0.75rem; color: var(--atomic-gray-deep); }

/* 页脚 */
.site-footer { text-align: center; padding: 2rem; font-size: 0.8rem; color: var(--text-muted); border-top: 2px solid var(--orange-pale); background: var(--bg-soft); margin-top: 2rem; }

/* 占位图 */
.placeholder-img { background: linear-gradient(135deg, var(--orange-pale) 0%, var(--atomic-gray-pale) 100%); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }

/* 响应式 */
@media (max-width: 768px) {
  .nav-inner { flex-wrap: wrap; padding: 1.25rem 1.5rem; gap: 1.25rem; min-height: auto; }
  .site-logo { width: 100%; margin-right: 0; font-size: 1.35rem; }
  .nav-links { width: 100%; margin-left: 0; justify-content: flex-start; gap: 0.75rem 1.75rem; }
  .lang-switcher { margin-left: 0; }
  main { padding: 2.5rem 1.25rem 4rem; }
  .main-home { min-height: calc(100svh - var(--nav-height) - 6rem); }
  .hero { padding: 2.5rem 1.25rem 3.5rem; }
  .card { padding: 1.75rem; }
  .voicebank-cover { width: 100%; max-width: 220px; }
}