/* ============================================
   不是魅魔 (Not a Succubus) - Main Stylesheet
   Cute demon theme: pink/purple gradients, anime aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --pink: #f472b6;
  --pink-light: #fbcfe8;
  --pink-dark: #db2777;
  --purple: #a78bfa;
  --purple-light: #ede9fe;
  --purple-dark: #7c3aed;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--pink-light) 50%, #fef3c7 100%);
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--purple-dark);
}

ul, ol {
  padding-left: 1.5rem;
}

/* --- Utility Classes --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.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;
}

/* --- Header & Navigation --- */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--pink-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pink-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo::before {
  content: '💜';
  font-size: 1.4rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 1px;
  transition: width 0.25s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.site-nav a.active {
  color: var(--pink-dark);
}

/* Header CTA button */
.nav-cta {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 999px;
  font-weight: 700 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: 0.25rem;
}

/* --- Hero Section (index.html) --- */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(244, 114, 182, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink-dark), var(--purple-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  background: rgba(244, 114, 182, 0.15);
  color: var(--pink-dark);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-image {
  max-width: 700px;
  margin: 2rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* --- Content Sections --- */
.content-section {
  padding: 3rem 0;
}

.content-section:nth-child(even) {
  background: rgba(255, 255, 255, 0.4);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Feature Grid (index) --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* --- Page Header --- */
.page-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}

.page-header::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 2px;
  margin: 1.5rem auto 0;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

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

/* --- Page Header Image (sub-pages) --- */
.page-header-image {
  max-width: 960px;
  margin: 1.5rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.page-header-image img {
  width: 100%;
  height: auto;
}

/* --- Story Page Image --- */
.story-image {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.story-image img {
  width: 100%;
  height: auto;
}

/* --- Character Avatar Image --- */
.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* --- Guide Image --- */
.guide-image {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.guide-image img {
  width: 100%;
  height: auto;
}

/* --- Article Content --- */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--pink-dark);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pink-light);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--gray-700);
  line-height: 1.85;
}

.article-content ul {
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

/* --- Character Cards --- */
.character-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

.character-avatar {
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
}

.character-avatar-icon {
  font-size: 5rem;
}

.character-info {
  padding: 2rem 2rem 2rem 0;
}

.character-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.character-role {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.character-desc {
  color: var(--gray-600);
  line-height: 1.8;
}

.character-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.character-trait {
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* --- Guide Steps --- */
.guide-step {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--pink);
  position: relative;
}

.guide-step-number {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.guide-step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.guide-step p {
  color: var(--gray-600);
  line-height: 1.8;
}

.guide-tip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fef3c7;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #92400e;
  border-left: 3px solid #f59e0b;
}

.guide-tip::before {
  content: '💡 ';
}

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

.faq-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gray-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--gray-50);
}

.faq-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  color: var(--pink);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.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 1.5rem 1.25rem;
  color: var(--gray-600);
  line-height: 1.85;
}

/* --- Story Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '💜';
  position: absolute;
  left: -2.5rem;
  top: 0;
  font-size: 1rem;
  background: var(--white);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.timeline-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: var(--gray-600);
  line-height: 1.8;
}

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

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

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

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.1), rgba(167, 139, 250, 0.1));
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}

.cta-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  padding: 0.85rem 2.5rem;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  border-top: 1px solid var(--gray-200);
  background: rgba(255, 255, 255, 0.5);
}

/* --- Game Info Table --- */
.info-table {
  width: 100%;
  max-width: 600px;
  margin: 1.5rem auto;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
}

.info-table th {
  color: var(--pink-dark);
  font-weight: 700;
  width: 120px;
  white-space: nowrap;
}

.info-table td {
  color: var(--gray-700);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

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

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 2px solid var(--pink-light);
    box-shadow: var(--shadow-md);
  }

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

  .menu-toggle {
    display: block;
  }

  .character-card {
    grid-template-columns: 1fr;
  }

  .character-info {
    padding: 0 1.5rem 1.5rem;
  }

  .character-avatar {
    min-height: 200px;
  }

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

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

/* --- Heart Accent Decorations --- */
.heart-bg {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  font-size: 4rem;
}

.heart-bg-1 { top: 5%; left: 5%; }
.heart-bg-2 { top: 15%; right: 8%; }
.heart-bg-3 { bottom: 20%; left: 10%; }
.heart-bg-4 { bottom: 10%; right: 5%; }
