/* ═══════════════════════════════════════════
   ImAlive (我还行) — Shared Styles
   ═══════════════════════════════════════════ */

:root {
  --bg: #f1f5f9;
  --bg-hero: #0c1929;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #e2e8f0;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-light: #38bdf8;
  --accent-glow: rgba(14, 165, 233, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ─── Navigation ────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.site-nav--hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav--hero .nav-brand {
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

.site-nav--hero .nav-links a {
  color: rgba(255, 255, 255, 0.7);
}

.site-nav--hero .nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Hero Section (Landing) ────────────── */

.hero {
  background: linear-gradient(160deg, #0c1929 0%, #0f2a4a 40%, #0c3155 70%, #0a2744 100%);
  padding: 120px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.hero-en {
  font-size: 16px;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}

.hero-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.45);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
}

/* ─── Features Grid ─────────────────────── */

.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px;
}

.features-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.feature-icon--checkin {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.feature-icon--habit {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
}

.feature-icon--safety {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
}

.feature-icon--social {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── Page Header (Subpages) ────────────── */

.page-header {
  background: linear-gradient(160deg, #0c1929 0%, #0f2a4a 50%, #0c3155 100%);
  padding: 80px 24px 40px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-header-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header .date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
}

/* ─── Content Card ──────────────────────── */

.content-wrap {
  max-width: 960px;
  margin: -20px auto 0;
  padding: 0 24px 60px;
  position: relative;
  z-index: 2;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
}

.content-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.content-card h2:first-of-type {
  margin-top: 20px;
  padding-top: 0;
  border-top: none;
}

.content-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.content-card p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.8;
}

.content-card ul {
  margin: 8px 0 16px;
  padding-left: 20px;
}

.content-card li {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.8;
}

.content-card li strong {
  color: var(--text);
}

/* ─── Notice Box ────────────────────────── */

.notice {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.notice strong {
  color: var(--text);
}

/* ─── Table ─────────────────────────────── */

.content-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 15px;
}

.content-card th,
.content-card td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.content-card tr:last-child th,
.content-card tr:last-child td {
  border-bottom: none;
}

.content-card th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--text);
  width: 28%;
  white-space: nowrap;
}

/* ─── FAQ ────────────────────────────────── */

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-q::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.faq-a {
  font-size: 15px;
  color: var(--text-muted);
  padding-left: 30px;
  line-height: 1.75;
}

/* ─── Footer ────────────────────────────── */

.site-footer {
  background: var(--bg-hero);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.footer-copyright {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Responsive ────────────────────────── */

@media (max-width: 640px) {
  .hero {
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-tagline {
    font-size: 17px;
  }

  .hero-desc {
    font-size: 14px;
  }

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

  .page-header {
    padding: 72px 20px 32px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .content-card {
    padding: 24px 20px;
  }

  .content-card h2 {
    font-size: 18px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .nav-links {
    gap: 2px;
  }
}
