/* ========================================
   我的恶霸女友 中文官方网站
   School Romance Theme - Soft Pink / Coral
   Light Cream Background - Modern Clean Layout
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #e8788a;
  --primary-dark: #c75a6e;
  --primary-light: #fce4e9;
  --accent: #f4a0b0;
  --accent-soft: #fbe0e6;
  --bg-cream: #fefaf5;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --border-light: #f0e8e0;
  --border-card: #f2e8e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-main: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  padding-top: var(--header-height);
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

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

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

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Navigation CTA Button */
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 10px 22px !important;
  background: linear-gradient(135deg, var(--primary), #e98a9a) !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(232, 120, 138, 0.3);
  margin-left: 8px;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 120, 138, 0.4);
  background: linear-gradient(135deg, #f08a9a, #f4a0b0) !important;
}

.nav-cta .cta-arrow {
  font-size: 1rem;
}

/* --- Hamburger Menu (Mobile) --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  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);
}

/* --- Main Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #fef0f3 0%, #fdf5f7 40%, #fefaf5 100%);
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

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

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* --- Hero Image --- */
.hero-image {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

/* --- Section Common --- */
.section {
  padding: 64px 0;
}

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

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

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

/* --- Feature Cards --- */
.feature-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-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

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

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

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

.screenshot-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  aspect-ratio: 16 / 10;
  background: var(--bg-cream);
}

.screenshot-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Content Page Layout --- */
.content-page {
  padding: 48px 0 64px;
}

.page-title-area {
  text-align: center;
  padding: 48px 0 40px;
  background: linear-gradient(135deg, #fef0f3 0%, #fdf5f7 40%, #fefaf5 100%);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 48px;
}

.page-title-area h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.page-title-area p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.content-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}

.content-body p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.85;
}

.content-body ul,
.content-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.content-body ul {
  list-style: disc;
}

.content-body ol {
  list-style: decimal;
}

.content-body li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.75;
  font-size: 1rem;
}

.content-body strong {
  color: var(--text-primary);
}

/* --- Highlight Box --- */
.highlight-box {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-soft));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 32px 0;
}

.highlight-box h3 {
  margin-top: 0;
  color: var(--primary-dark);
}

.highlight-box p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* --- Tip Box --- */
.tip-box {
  background: #fffdf5;
  border: 1px solid #f0e8c0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
}

.tip-box::before {
  content: '💡 小提示：';
  font-weight: 700;
  color: #b8960f;
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.tip-box p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.95rem;
}

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

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

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

.char-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--primary-light), #fdf0f3);
  overflow: hidden;
}

.char-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.char-card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.char-card-body .char-role {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
}

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

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

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

.faq-question {
  padding: 20px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-question .faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #fff;
}

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

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

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

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

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 16px 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

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

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

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 32px 0;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

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

.lightbox-overlay.active {
  display: flex;
}

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

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

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

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #e88a95);
  padding: 64px 0;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 48px;
  background: #fff;
  color: var(--primary) !important;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 0;
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: 1rem;
}

.mt-md {
  margin-top: 2rem;
}

.mt-lg {
  margin-top: 3rem;
}

.mb-sm {
  margin-bottom: 1rem;
}

.mb-md {
  margin-bottom: 2rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

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

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

  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
  }

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

  .main-nav a {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    justify-content: center;
    width: 100%;
  }

  .section {
    padding: 40px 0;
  }

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

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

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

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

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

  .content-body h2 {
    font-size: 1.35rem;
  }

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

  .hero {
    padding: 48px 0 40px;
  }
}

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

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

  .content-body {
    padding: 0 4px;
  }
}
