/* ============================================================
   Cute Lab/Science Theme — 萨妮羊研究室
   Soft pastels + lab coat white + microscope blue accents
   Playful scientific aesthetic on light background
   ============================================================ */

:root {
  /* Primary palette */
  --blue: #5b9bd5;
  --blue-dark: #3d7ec0;
  --blue-light: #d6e8f8;
  --blue-soft: #edf4fb;
  --pink: #f4a7b9;
  --pink-light: #fce4ec;
  --mint: #7ec8a0;
  --mint-light: #e8f5ee;

  /* Backgrounds */
  --bg: #fafafc;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(135deg, #edf4fb 0%, #f5f0f8 30%, #fce4ec 50%, #edf4fb 80%, #e8f5ee 100%);

  /* Text */
  --text-primary: #3a3548;
  --text-secondary: #6a6578;
  --text-muted: #9a94a8;

  /* Accents */
  --accent: #5b9bd5;
  --accent-hover: #3d7ec0;
  --accent-light: #d6e8f8;
  --accent-gradient: linear-gradient(135deg, #5b9bd5, #7eb8e8);
  --accent-pink: #f4a7b9;
  --accent-mint: #7ec8a0;

  /* Functional */
  --border: #e0dce8;
  --shadow-sm: 0 2px 8px rgba(91, 155, 213, 0.10);
  --shadow-md: 0 4px 16px rgba(91, 155, 213, 0.15);
  --shadow-lg: 0 8px 32px rgba(91, 155, 213, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.25s ease;
  --font-main: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main); font-size: 16px; line-height: 1.75;
  color: var(--text-primary); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.35; }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; line-height: 1.35; }
h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.35; }
p { margin-bottom: 1rem; }

/* Utility */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.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 — sticky, glassmorphism */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.header-logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.header-logo:hover { color: var(--accent); }
.header-logo-img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; }
.header-nav { display: flex; align-items: center; gap: 0.15rem; }
.header-nav a { display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; transition: color var(--transition), background var(--transition); }
.header-nav a:hover, .header-nav a.active { color: var(--accent); background: var(--accent-light); }
.nav-cta { margin-left: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 1.25rem; border-radius: 24px; background: var(--accent-gradient); color: #fff !important; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); opacity: 0.92; background: var(--accent-gradient) !important; color: #fff !important; }

/* Mobile toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text-primary); }
.menu-toggle:hover { color: var(--accent); }

/* Main */
main { flex: 1; }

/* Hero */
.hero { background: var(--bg-hero); padding: 4rem 0 3rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: '🔬'; position: absolute; top: 20px; right: 10%; font-size: 3rem; opacity: 0.15; pointer-events: none; }
.hero::after { content: '🐑'; position: absolute; bottom: 20px; left: 8%; font-size: 2.5rem; opacity: 0.12; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }
.hero-badge { display: inline-block; padding: 0.35rem 1.25rem; border-radius: 20px; background: var(--accent-light); color: var(--accent); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 1.25rem; }
.hero-inner h1 { font-size: 2.8rem; margin-bottom: 0.3rem; background: linear-gradient(135deg, #3d7ec0, #5b9bd5, #7ec8a0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; font-weight: 500; line-height: 1.8; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-visual { max-width: 600px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-visual img { width: 100%; border-radius: var(--radius-lg); }
.hero-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { padding: 4rem 0; background: var(--blue-soft); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { position: relative; display: inline-block; font-size: 1.8rem; padding-bottom: 0.75rem; }
.section-header h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; border-radius: 2px; background: var(--accent-gradient); }
.section-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.5rem; }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform var(--transition); }
.info-card:hover { transform: translateY(-2px); }
.info-card-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-card-value { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* Feature Cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.75rem; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--accent-light); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* Screenshots */
.screenshots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.screenshot-item { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); }
.screenshot-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.screenshot-item img { width: 100%; display: block; }
.screenshot-caption { padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text-muted); background: var(--bg-card); border-top: 1px solid var(--border); }

/* CTA */
.cta-section { background: var(--bg-hero); padding: 4rem 0; text-align: center; }
.cta-section h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.cta-section p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.85rem 2.5rem; border-radius: 28px; background: var(--accent-gradient); color: #fff; font-weight: 600; font-size: 1.05rem; box-shadow: var(--shadow-md); transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); opacity: 0.93; color: #fff; }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.75rem 2rem; border-radius: 28px; border: 2px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 1rem; background: transparent; transition: background var(--transition), color var(--transition), transform var(--transition); }
.btn-secondary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* Page hero (subpages) */
.page-hero { background: var(--bg-hero); padding: 3rem 0; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: '🧪'; position: absolute; top: 15px; left: 15%; font-size: 2.5rem; opacity: 0.12; pointer-events: none; }
.page-hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.page-hero p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* Content section (subpages) */
.content-section { padding: 3rem 0; }
.content-section .container { max-width: 860px; }
.content-section h2 { font-size: 1.6rem; color: var(--accent); margin-top: 2.5rem; margin-bottom: 0.75rem; padding-left: 1rem; border-left: 3px solid var(--accent); }
.content-section h2:first-child { margin-top: 0; }
.content-section h3 { font-size: 1.2rem; margin-top: 1.75rem; color: var(--text-primary); }
.content-section p { color: var(--text-secondary); line-height: 1.85; }
.content-section ul, .content-section ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--text-secondary); line-height: 1.85; }
.content-section ul li, .content-section ol li { position: relative; padding-left: 1.2rem; margin-bottom: 0.5rem; }
.content-section ul li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.content-section ol { counter-reset: item; }
.content-section ol li::before { content: counter(item) "."; counter-increment: item; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 600; }

/* Info box */
.info-box { background: var(--accent-light); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.info-box h4 { color: var(--accent); margin-bottom: 0.5rem; font-size: 1rem; }
.info-box p { margin-bottom: 0; font-size: 0.95rem; }

/* Tip box */
.tip-box { background: #fff8e1; border: 1px solid #f0d86e; border-radius: var(--radius-md); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.tip-box h4 { color: #f9a825; margin-bottom: 0.35rem; font-size: 0.95rem; }
.tip-box p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.content-section table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.content-section table th, .content-section table td { padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left; }
.content-section table th { background: var(--accent-light); color: var(--text-primary); font-weight: 600; }
.content-section table td { color: var(--text-secondary); }
.content-section table tr:nth-child(even) td { background: var(--bg-card); }

/* FAQ Accordion */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden; background: var(--bg-card); transition: box-shadow var(--transition); }
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item.open { box-shadow: var(--shadow-sm); border-color: var(--accent); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: none; border: none; cursor: pointer; font-family: var(--font-main); font-size: 1rem; font-weight: 600; color: var(--text-primary); text-align: left; transition: color var(--transition); }
.faq-question:hover { color: var(--accent); }
.faq-icon { flex-shrink: 0; width: 24px; height: 24px; transition: transform 0.3s ease; color: var(--accent); font-size: 1.2rem; }
.faq-item.open .faq-icon { 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: 500px; }
.faq-answer-inner { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }

/* Character Cards */
.cv-label { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.character-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.character-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.character-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.character-avatar { width: 120px; height: 120px; border-radius: 50%; background: var(--accent-light); margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--accent); border: 3px solid var(--accent); overflow: hidden; }
.character-avatar img { width: 100%; height: 100%; object-fit: cover; }
.character-card h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.character-role { font-size: 0.85rem; color: var(--accent); font-weight: 500; margin-bottom: 0.75rem; }
.character-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* Guide Steps */
.guide-steps { max-width: 800px; margin: 0 auto; }
.guide-step { display: flex; gap: 1.25rem; margin-bottom: 2rem; align-items: flex-start; }
.guide-step-num { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.guide-step-content { flex: 1; }
.guide-step-content h3 { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--text-primary); }
.guide-step-content p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }

/* Story Blocks */
.story-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1.5rem; border-left: 4px solid var(--accent); box-shadow: var(--shadow-sm); }
.story-block h3 { color: var(--accent); margin-bottom: 0.5rem; font-size: 1.15rem; }
.story-block p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }
.story-tag { display: inline-block; padding: 0.2rem 0.75rem; border-radius: 14px; background: var(--accent-light); color: var(--accent); font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.tag { display: inline-block; padding: 0.25rem 0.85rem; border-radius: 14px; font-size: 0.8rem; font-weight: 500; }
.tag-blue { background: var(--accent-light); color: var(--accent); }
.tag-pink { background: var(--pink-light); color: var(--pink); }
.tag-mint { background: var(--mint-light); color: var(--mint); }

/* Breadcrumbs */
.breadcrumbs { padding: 0.75rem 0; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 0.4rem; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(58,53,72,0.92); justify-content: center; align-items: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox 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: 1.5rem; right: 2rem; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Footer */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; }
.site-footer .footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.site-footer .copyright { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; } h2 { font-size: 1.4rem; }
  .hero-inner h1 { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-value { font-size: 1.5rem; }
  .menu-toggle { display: flex; }
  .header-nav { position: fixed; top: var(--header-height); left: 0; right: 0; background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem 0; gap: 0.25rem; transform: translateY(-120%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; box-shadow: var(--shadow-md); }
  .header-nav.open { transform: translateY(0); opacity: 1; }
  .header-nav a { width: 100%; text-align: center; padding: 0.75rem 1rem; }
  .nav-cta { margin-left: 0; margin-top: 0.5rem; width: calc(100% - 2rem); text-align: center; justify-content: center; }
  .features-grid, .screenshots-grid, .character-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .section, .cta-section { padding: 2.5rem 0; }
}
@media (max-width: 480px) {
  .hero-inner h1 { font-size: 1.6rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .info-grid { grid-template-columns: 1fr; }
}
