/* === 变态监狱 (Hentai Prison) - Prison / Contrast Theme ===
   Dark bars vs soft warm light, orange/amber accents, bold typography */

/* === CSS Custom Properties === */
:root {
  /* Base palette — pale background with warm light */
  --bg: #faf8f5;
  --bg-alt: #f3efe8;
  --bg-card: #ffffff;
  --text: #2d2a26;
  --text-muted: #6b6359;
  --text-light: #8c847a;

  /* Prison accent — orange/amber */
  --accent: #e8734a;
  --accent-hover: #d4613a;
  --accent-light: #fef0ea;
  --accent-glow: rgba(232, 115, 74, 0.15);

  /* Dark bars — prison motif */
  --bar-dark: #1e1b18;
  --bar-dark-hover: #2e2a25;
  --bar-text: #e8e3da;
  --bar-text-muted: #a0988c;
  --bar-accent: #f59e0b;

  /* Borders & shadows */
  --border: #e0dbd3;
  --border-light: #ede8e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-bar: 0 2px 16px rgba(0, 0, 0, 0.30);

  /* Typography */
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-display: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

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

/* === Header === */
.site-header {
  background: var(--bar-dark);
  color: var(--bar-text);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-bar);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
}

/* Dark bar pattern stripes on left edge */
.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    var(--accent) 0px,
    var(--accent) 4px,
    transparent 4px,
    transparent 12px
  );
  z-index: 2;
}

/* Logo / Site title */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--bar-text);
  letter-spacing: 0.03em;
}

.site-logo:hover {
  color: var(--bar-accent);
}

.site-logo-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--bar-accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--bar-accent);
  flex-shrink: 0;
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--bar-text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--bar-text);
  background: rgba(255,255,255,0.06);
}

.nav-links a.active {
  color: var(--bar-accent);
  font-weight: 600;
}

/* Nav CTA button */
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 115, 74, 0.4);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--bar-text);
  font-size: 1.5rem;
  line-height: 1;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, var(--bar-dark) 0%, #2a231c 50%, #33241a 100%);
  color: var(--bar-text);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Bar pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.015) 40px,
    rgba(255,255,255,0.015) 44px
  );
  pointer-events: none;
}

/* Amber glow */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero .hero-accent {
  color: var(--bar-accent);
}

.hero .hero-subtitle {
  font-size: 1.2rem;
  color: var(--bar-text-muted);
  margin-bottom: 10px;
  font-weight: 400;
}

.hero .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.hero .hero-tags span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--bar-text-muted);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.hero .hero-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 48px;
  border-radius: var(--radius-md);
  transition: all 0.25s;
  text-shadow: none;
  letter-spacing: 0.02em;
}

.hero .hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 115, 74, 0.45);
  color: #fff;
}

/* === Section Common === */
.section {
  padding: 72px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

/* Section header amber underline */
.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === Info Grid === */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.info-card:hover {
  box-shadow: var(--shadow-md);
}

.info-card .info-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.info-card .info-value {
  font-size: 0.95rem;
  color: var(--text);
}

/* === Feature Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--bar-accent);
}

.feature-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* === Screenshot Gallery === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-grid a {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  position: relative;
  border: 2px solid var(--border-light);
}

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

.gallery-grid a::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.gallery-grid a:hover::after {
  opacity: 1;
}

.gallery-grid a:hover img {
  filter: brightness(0.6);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: filter 0.3s;
  display: block;
}

/* Lazy loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 2;
}

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

/* === Story / Content Blocks === */
.story-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Horizontal bar accent at top */
.story-block::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--bar-accent));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.story-block h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

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

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

/* === Guide Steps === */
.guide-steps {
  counter-reset: step;
  list-style: none;
}

.guide-step {
  counter-increment: step;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px 28px 28px 80px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.guide-step:hover {
  box-shadow: var(--shadow-md);
}

.guide-step::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 24px;
  width: 40px;
  height: 40px;
  background: var(--bar-dark);
  color: var(--bar-accent);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 2px solid var(--bar-accent);
}

.guide-step h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-step p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* === Character Cards === */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.char-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.char-card-header {
  background: var(--bar-dark);
  color: var(--bar-text);
  padding: 20px 24px;
  position: relative;
}

.char-card-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.char-card-header .char-role {
  font-size: 0.8rem;
  color: var(--bar-accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Bar stripes on card header */
.char-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 8px,
    var(--bar-accent) 8px,
    var(--bar-accent) 12px
  );
}

.char-card-body {
  padding: 20px 24px;
}

.char-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.char-card-body .char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.char-traits span {
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* === FAQ Accordion === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

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

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

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.925rem;
}

/* === CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--bar-dark), #2a231c);
  color: var(--bar-text);
  text-align: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 50px,
    rgba(255,255,255,0.01) 50px,
    rgba(255,255,255,0.01) 54px
  );
  pointer-events: none;
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-banner p {
  color: var(--bar-text-muted);
  margin-bottom: 24px;
}

.cta-banner .btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 48px;
  border-radius: var(--radius-md);
  transition: all 0.25s;
}

.cta-banner .btn-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 115, 74, 0.45);
  color: #fff;
}

/* === Breadcrumb === */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 6px;
}

/* === Page Title Bar === */
.page-title-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.page-title-bar h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-title-bar p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === Page Title Logo === */
.page-title-logo {
  display: block;
  max-width: 300px;
  height: auto;
  margin: 0 auto 16px;
}

/* === Tags === */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.tags-row span {
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* === Description Block === */
.desc-block {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.9;
}

.desc-block p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 0.98rem;
}

/* === Blockquote === */
blockquote {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  margin: 24px 0;
  padding: 20px 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* === Ending Cards === */
.ending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.ending-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.ending-card:hover {
  box-shadow: var(--shadow-md);
}

.ending-card .ending-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.ending-card h4 {
  font-weight: 700;
  margin-bottom: 8px;
}

.ending-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === Footer === */
.site-footer {
  background: var(--bar-dark);
  color: var(--bar-text-muted);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
  line-height: 1.8;
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--bar-accent));
}

.site-footer p {
  margin: 0;
}

/* === Utility Classes === */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fs-sm { font-size: 0.85rem; }
.mx-auto { max-width: 800px; margin-left: auto; margin-right: auto; }

/* === Responsive === */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 56px 20px;
  }

  .section {
    padding: 48px 20px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bar-dark);
    flex-direction: column;
    padding: 16px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-cta {
    margin-top: 4px;
  }

  .guide-step {
    padding: 24px 20px 24px 64px;
  }

  .guide-step::before {
    left: 12px;
    top: 20px;
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .char-grid,
  .ending-grid {
    grid-template-columns: 1fr;
  }
}
