/* 糖心vlog APP - 全局样式 */
:root {
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --secondary: #1a1a2e;
  --accent: #16213e;
  --text: #333;
  --text-light: #666;
  --bg: #f8f9fa;
  --white: #fff;
  --border: #e9ecef;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --max-width: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-link img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-desktop {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-desktop a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary);
  padding: 4px 8px;
}

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--white);
  padding: 24px;
  overflow-y: auto;
}

.nav-mobile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  float: right;
  color: var(--text);
}

.nav-mobile ul {
  list-style: none;
  margin-top: 40px;
}

.nav-mobile li {
  border-bottom: 1px solid var(--border);
}

.nav-mobile a {
  display: block;
  padding: 14px 0;
  color: var(--text);
  font-size: 1rem;
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: 48px 20px;
  text-align: center;
  margin: 0 -20px 32px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 24px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* Sections */
.section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.section h2 {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

.section h3 {
  font-size: 1.15rem;
  color: var(--secondary);
  margin: 24px 0 12px;
}

.section p {
  margin-bottom: 14px;
  color: var(--text-light);
}

.section ul,
.section ol {
  margin: 12px 0 16px 20px;
  color: var(--text-light);
}

.section li {
  margin-bottom: 8px;
}

.section strong {
  color: var(--text);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--primary);
}

.feature-card h4 {
  color: var(--secondary);
  margin-bottom: 8px;
  font-size: 1rem;
}

.feature-card p {
  font-size: 0.9rem;
  margin: 0;
}

/* Screenshots */
.screenshot {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.screenshot img {
  width: 100%;
}

.screenshot figcaption {
  background: var(--bg);
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

.screenshot-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--secondary);
}

.faq-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* TOC */
.toc {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.toc h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--secondary);
  border: none;
  padding: 0;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc a {
  color: var(--text);
  font-size: 0.95rem;
}

.toc a:hover {
  color: var(--primary);
}

/* Legal Pages */
.legal-page .section h2 {
  display: block;
  border-bottom: none;
  margin-top: 32px;
}

.legal-page .section h2:first-child {
  margin-top: 0;
}

.legal-page .update-date {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-page h1 {
  font-size: 5rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h2 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-light);
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.8);
  padding: 32px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  list-style: none;
  margin-bottom: 20px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .section {
    padding: 24px 18px;
  }

  .hero {
    padding: 36px 16px;
    margin: 0 -20px 24px;
  }
}
