/* ============================================
 * 记日官官网 · 共享样式
 * 设计语言：克制、温暖、可读性优先
 * ============================================ */

:root {
  --color-bg: #fdfbf7;
  --color-bg-alt: #f5f0e8;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-text-faint: #999999;
  --color-brand: #d97757;
  --color-brand-dark: #c45f3f;
  --color-border: #e8e2d6;
  --color-card: #ffffff;
  --color-link: #b8623d;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --max-width: 880px;
  --font-system: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1816;
    --color-bg-alt: #232020;
    --color-text: #e8e4dc;
    --color-text-muted: #a8a39a;
    --color-text-faint: #6b6660;
    --color-brand: #e08967;
    --color-brand-dark: #c97050;
    --color-border: #3a3633;
    --color-card: #252220;
    --color-link: #e8a282;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
  }
}

* {
  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-system);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 导航栏 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(26, 24, 22, 0.85);
  }
}

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

.nav-brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-brand);
}

@media (max-width: 600px) {
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 0.85rem;
  }
}

/* ===== 主容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ===== Hero ===== */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-brand);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.9rem;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-brand);
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(217, 119, 87, 0.25);
}

.hero-cta:hover {
  background: var(--color-brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 119, 87, 0.35);
}

.hero-cta-note {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--color-text-faint);
}

/* ===== 特性卡片 ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.feature-icon {
  font-size: 1.3rem;
}

/* ===== 章节 ===== */
.section {
  margin: 80px 0;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

/* ===== 对话示例 ===== */
.chat-demo {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.chat-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  max-width: 80%;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-user {
  background: var(--color-brand);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.chat-ai {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-bottom-left-radius: 6px;
}

.chat-event-card {
  background: linear-gradient(135deg, #fff5ed 0%, #ffe8d6 100%);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 4px;
  display: inline-block;
}

@media (prefers-color-scheme: dark) {
  .chat-event-card {
    background: linear-gradient(135deg, #2d2520 0%, #3a2e23 100%);
  }
}

.chat-event-card .event-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.chat-event-card .event-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== 文档页 ===== */
.doc-header {
  text-align: center;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.doc-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.doc-meta {
  color: var(--color-text-faint);
  font-size: 0.9rem;
}

.doc-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 48px 0 16px;
  padding-top: 8px;
}

.doc-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--color-text);
}

.doc-content p {
  margin: 12px 0;
  color: var(--color-text);
}

.doc-content ul,
.doc-content ol {
  margin: 12px 0;
  padding-left: 28px;
}

.doc-content li {
  margin: 6px 0;
  color: var(--color-text);
}

.doc-content a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: rgba(184, 98, 61, 0.3);
  text-underline-offset: 3px;
}

.doc-content a:hover {
  text-decoration-color: var(--color-link);
}

.doc-content code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.doc-content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc-content th,
.doc-content td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.doc-content th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

.doc-content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--color-brand);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border-radius: 0 6px 6px 0;
}

.callout {
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-brand);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.callout-title {
  font-weight: 600;
  margin-bottom: 6px;
}

/* ===== Footer ===== */
.footer {
  margin-top: 80px;
  padding: 40px 24px 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-brand);
}

.footer-beian {
  font-size: 0.82rem;
  color: var(--color-text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.footer-beian a {
  color: var(--color-text-faint);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-beian a:hover {
  color: var(--color-brand);
}

.footer-beian img {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--color-text-faint);
}

/* ===== 工具类 ===== */
.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.mt-md {
  margin-top: 24px;
}

.mt-lg {
  margin-top: 48px;
}
