/* ============================================================
   透明人间 (Invisible Man) — Invisibility Theme
   Ethereal, transparent-glass, shimmer-refraction design
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Palette: pale blues + barely-there opacity whites */
  --bg: #f2f4f8;
  --bg-card: rgba(255, 255, 255, 0.55);
  --bg-glass: rgba(255, 255, 255, 0.35);
  --bg-glass-hover: rgba(255, 255, 255, 0.55);
  --bg-glass-deep: rgba(210, 222, 240, 0.50);

  --text-primary: #3a4458;
  --text-secondary: #6b7590;
  --text-muted: #909bb5;
  --text-ghost: #b0bad0;

  --accent: #7e96b8;
  --accent-light: #9ab0cc;
  --accent-pale: #c5d4e6;
  --accent-glow: #b8cde0;

  --border: rgba(160, 180, 210, 0.25);
  --border-focus: rgba(130, 155, 190, 0.45);

  --shadow-sm: 0 1px 3px rgba(140, 160, 190, 0.08);
  --shadow-md: 0 4px 16px rgba(140, 160, 190, 0.10);
  --shadow-glass: 0 8px 32px rgba(150, 170, 200, 0.12);
  --shadow-shimmer: 0 0 40px rgba(180, 200, 225, 0.15);

  --header-bg: #3b4a60;
  --header-border: #7e96b8;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-serif: "Noto Serif SC", "STSong", "SimSun", "Songti SC", serif;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.75;
  min-height: 100vh;
  /* Subtle glass-refraction body pattern */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(180, 200, 225, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(190, 210, 235, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(200, 220, 240, 0.08) 0%, transparent 70%);
  background-attachment: fixed;
}

/* --- Header --- */
header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #e8eef6;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.header-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  opacity: 0.85;
}

/* --- Navigation --- */
nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  color: #c0cbd8;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  transition: all 0.25s ease;
  position: relative;
}

nav a:hover,
nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--accent-light);
  border-radius: 1px;
}

/* --- CTA Button --- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  color: #2d3648;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.93rem;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-cta:hover {
  background: #c8d8ee;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass-deep);
  color: var(--accent);
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.btn-cta-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-shimmer);
}

/* --- Main Content --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-glass);
  background: var(--bg-glass);
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(200, 215, 235, 0.15) 0%,
    rgba(210, 222, 240, 0.30) 40%,
    rgba(220, 230, 245, 0.45) 100%
  );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}

/* --- Section Titles --- */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent-light);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-pale);
  box-shadow: var(--shadow-glass);
  transform: translateY(-2px);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-light);
  border-radius: 3px 0 0 3px;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* --- Feature Cards Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* --- Game Info Card --- */
.info-card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin-bottom: 32px;
}

.info-card dt {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.info-card dd {
  color: var(--text-primary);
  font-size: 0.93rem;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.gallery-grid a {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-grid a:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-glass);
  transform: translateY(-2px);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Reviews --- */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.review-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.review-card::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 14px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--accent-pale);
  line-height: 1;
}

.review-card blockquote {
  font-style: italic;
  color: var(--text-secondary);
  margin: 0 0 12px 20px;
  font-size: 0.93rem;
  line-height: 1.7;
}

.review-card cite {
  display: block;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: normal;
  margin-left: 20px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-glass-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(200, 220, 240, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  position: relative;
}

.cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  position: relative;
}

/* --- Guide Steps --- */
.guide-steps {
  counter-reset: step;
  margin-bottom: 40px;
}

.guide-step {
  counter-increment: step;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 24px 24px 72px;
  margin-bottom: 16px;
  position: relative;
  transition: all 0.25s ease;
}

.guide-step:hover {
  background: var(--bg-glass-hover);
}

.guide-step::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 24px;
  width: 36px;
  height: 36px;
  background: var(--accent-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-step p,
.guide-step ul {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

.guide-step ul {
  padding-left: 20px;
}

.guide-step li {
  margin-bottom: 4px;
}

/* --- Tip Box --- */
.tip-box {
  background: var(--bg-glass-deep);
  border: 1px solid var(--accent-pale);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
  position: relative;
}

.tip-box::before {
  content: "💡";
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 1.1rem;
}

.tip-box p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  margin-left: 28px;
}

/* --- Story Sections --- */
.story-section {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
}

.story-section h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.story-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.story-section p:last-child {
  margin-bottom: 0;
}

/* --- Character Cards --- */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.character-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.character-card:hover {
  border-color: var(--accent-pale);
  box-shadow: var(--shadow-glass);
  transform: translateY(-3px);
}

.character-card img {
  width: 100%;
  height: auto;
  display: block;
}

.character-info {
  padding: 18px 20px;
}

.character-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.character-info .role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.character-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.character-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.character-traits span {
  background: var(--bg-glass-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Relationship Section --- */
.relationship-map {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 40px;
}

.relationship-map h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.relationship-map ul {
  list-style: none;
  padding: 0;
}

.relationship-map li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.relationship-map li:last-child {
  border-bottom: none;
}

.relationship-map li strong {
  color: var(--text-primary);
}

/* --- FAQ Accordion --- */
.faq-list {
  margin-bottom: 40px;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.2);
}

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 20px 20px;
}

.faq-answer-inner p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* --- System Requirements Table --- */
.sysreq-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
}

.sysreq-table th,
.sysreq-table td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

.sysreq-table th {
  background: var(--bg-glass-deep);
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-serif);
  width: 30%;
}

.sysreq-table td {
  color: var(--text-secondary);
}

.sysreq-table tr:last-child th,
.sysreq-table tr:last-child td {
  border-bottom: none;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb span {
  color: var(--text-muted);
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 38, 52, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Screen Reader Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 28px 24px;
  background: var(--header-bg);
  border-top: 2px solid var(--header-border);
  margin-top: 48px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Page Header (non-index) --- */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 2px;
  }

  nav a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  main {
    padding: 20px 14px 36px;
  }

  .feature-grid,
  .gallery-grid,
  .character-grid,
  .reviews {
    grid-template-columns: 1fr;
  }

  .hero {
    border-radius: var(--radius-md);
  }

  .cta-banner {
    padding: 24px 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

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

  .btn-cta {
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  .card,
  .guide-step,
  .story-section {
    padding: 16px;
  }

  .guide-step {
    padding-left: 56px;
  }
}
