/* ============================================================
   监狱战舰 (Prison Battleship) — Prison Battleship Theme
   Steel-gray hull, alarm-red accents, ship-bulkhead motifs
   Light metallic bg | sci-fi dark visual novel
   ============================================================ */

/* ========== CSS VARIABLES ========== */
:root {
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', Georgia, serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  /* Core palette: steel-gray hull + alarm-red */
  --steel-dark: #1c2127;
  --steel-mid: #2f3640;
  --steel-light: #4a5568;
  --steel-surface: #6b7d93;
  --hull-gray: #8b9aaf;
  --bulkhead: #c0c9d4;

  --alarm-red: #cc2233;
  --alarm-red-glow: #ff3344;
  --alarm-red-dark: #991122;
  --warning-amber: #d4a017;

  --bg-page: #ece9e4;
  --bg-card: #f5f4f1;
  --bg-warm: #faf8f5;
  --bg-section-alt: #f0ede8;

  --text-primary: #1a1d22;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-on-dark: #e8eaed;

  --border-light: #d5d0c8;
  --border-mid: #b8b0a8;

  --shadow-sm: 0 1px 3px rgba(28, 33, 39, 0.08);
  --shadow-md: 0 4px 12px rgba(28, 33, 39, 0.12);
  --shadow-lg: 0 8px 30px rgba(28, 33, 39, 0.15);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --max-width: 1200px;
  --header-height: 64px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(111, 125, 147, 0.03) 2px,
      rgba(111, 125, 147, 0.03) 4px
    );
}

/* ========== UTILITY CLASSES ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.prose {
  max-width: 800px;
  margin: 0 auto;
}

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

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chapter-title {
  font-size: 1.1rem;
  color: var(--alarm-red);
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--steel-dark);
  border-bottom: 3px solid var(--alarm-red);
  box-shadow: var(--shadow-md);
  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;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-on-dark);
  text-decoration: none;
  letter-spacing: 2px;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--alarm-red-glow);
}

/* ========== NAVIGATION ========== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--bulkhead);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

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

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--alarm-red);
  border-radius: 2px;
}

/* Header CTA button */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--alarm-red);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 18px !important;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(204, 34, 51, 0.3);
}

.header-cta:hover {
  background: var(--alarm-red-glow) !important;
  box-shadow: 0 0 20px rgba(204, 34, 51, 0.5);
  transform: translateY(-1px);
}

/* ========== HAMBURGER ========== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--steel-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0.45;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28,33,39,0.85) 0%, rgba(28,33,39,0.5) 50%, rgba(28,33,39,0.9) 100%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(204,34,51,0.04) 3px,
      rgba(204,34,51,0.04) 4px
    );
  z-index: 1;
}

/* Bulkhead rivet pattern overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(204,34,51,0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: 30px 30px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-on-dark);
  padding: 60px 24px;
}

.hero-content h1,
.hero-content .hero-title-visual {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(204,34,51,0.5);
  color: #fff;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--bulkhead);
  margin-bottom: 8px;
  font-weight: 400;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.hero-meta span {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--bulkhead);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

/* ========== PAGE-SPECIFIC HERO BACKGROUNDS ========== */
.hero-home .hero-bg { background-image: url('../img/header.jpg'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-03.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-02.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/header.jpg'); }

/* ========== SECTIONS ========== */
section {
  padding: 60px 24px;
}

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

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--steel-dark);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--alarm-red);
  margin: 12px auto 0;
  border-radius: 2px;
}

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

/* ========== INFO CARDS ========== */
.info-cards {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--alarm-red);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.info-card .card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

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

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

/* ========== FEATURE CARDS ========== */
.feature-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  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-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--steel-surface), var(--alarm-red));
}

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

.feature-card .feature-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--steel-dark);
  margin-bottom: 10px;
}

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

/* ========== SCREENSHOT GALLERY ========== */
.gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  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);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid a:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* ========== CTA BANNER (INDEX ONLY) ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--steel-dark) 0%, var(--steel-mid) 100%);
  text-align: center;
  padding: 50px 24px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(204,34,51,0.15) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 6px, rgba(255,255,255,0.02) 6px, rgba(255,255,255,0.02) 7px);
}

.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: var(--bulkhead);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--alarm-red);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  text-decoration: none;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 24px rgba(204,34,51,0.4);
}

.cta-btn:hover {
  background: var(--alarm-red-glow);
  box-shadow: 0 0 36px rgba(204,34,51,0.6);
  transform: translateY(-2px);
}

/* ========== PLAYER REVIEWS ========== */
.reviews-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--alarm-red);
  opacity: 0.15;
  line-height: 1;
}

.review-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.review-card .reviewer {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ========== GUIDE PAGE ========== */
.guide-steps {
  max-width: 800px;
  margin: 0 auto;
}

.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--steel-surface);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--steel-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--alarm-red);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.tip-box {
  background: linear-gradient(135deg, rgba(212,160,23,0.08), rgba(212,160,23,0.03));
  border: 1px solid rgba(212,160,23,0.2);
  border-left: 4px solid var(--warning-amber);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
}

.tip-box strong {
  color: var(--warning-amber);
  font-size: 0.9rem;
}

.tip-box p {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ========== STORY PAGE ========== */
.story-content {
  max-width: 800px;
  margin: 0 auto;
}

.story-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.story-block h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--steel-dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}

.story-block p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

.story-block ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.story-block ul li {
  margin-bottom: 6px;
}

/* ========== CHARACTERS PAGE ========== */
.char-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.char-card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  border-bottom: 3px solid var(--alarm-red);
}

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

.char-card-body h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--steel-dark);
  margin-bottom: 6px;
}

.char-card-body .char-title {
  font-size: 0.85rem;
  color: var(--alarm-red);
  font-weight: 600;
  margin-bottom: 12px;
}

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

.char-traits span {
  background: var(--bg-section-alt);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid var(--border-light);
}

.char-card-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

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

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

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 48px 18px 24px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--steel-dark);
  cursor: pointer;
  position: relative;
  line-height: 1.5;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--alarm-red);
  font-weight: 700;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--bg-warm);
}

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

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

/* ========== SYSTEM REQUIREMENTS TABLE ========== */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.specs-table th,
.specs-table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border-light);
}

.specs-table thead th {
  background: var(--steel-dark);
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.specs-table tbody tr:nth-child(even) {
  background: var(--bg-warm);
}

.specs-table tbody tr:nth-child(odd) {
  background: var(--bg-card);
}

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

/* ========== FOOTER ========== */
.site-footer {
  background: var(--steel-dark);
  border-top: 3px solid var(--alarm-red);
  text-align: center;
  padding: 24px;
}

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

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

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
}

.lightbox-caption {
  color: var(--bulkhead);
  margin-top: 16px;
  font-size: 0.9rem;
}

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

  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--steel-dark);
    flex-direction: column;
    padding: 16px 0;
    gap: 0;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    border-bottom: 3px solid var(--alarm-red);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .main-nav.open {
    transform: translateY(0);
  }

  .main-nav a {
    padding: 14px 24px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .main-nav a.active::after {
    display: none;
  }

  .header-cta {
    margin-top: 4px;
    justify-content: center;
  }

  .hero-content h1,
  .hero-content .hero-title-visual {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .hero {
    min-height: 380px;
  }

  section {
    padding: 40px 16px;
  }

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

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

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

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

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

  .specs-table {
    font-size: 0.8rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-content h1,
  .hero-content .hero-title-visual {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .hero {
    min-height: 320px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

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

  .cta-btn {
    font-size: 0.95rem;
    padding: 12px 24px;
  }

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

  .gallery-grid img {
    height: 180px;
  }

  .feature-card {
    padding: 24px 18px;
  }

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