/* ==========================================
   KYBLL 个人存储空间 & 工具文档站 - 单页样式
   技术栈：PHP + HTML
   ========================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #0ea5e9;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(30, 64, 175, 0.08);
  --shadow-lg: 0 12px 40px rgba(30, 64, 175, 0.14);
  --radius: 12px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--text); }

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

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

.nav-links a {
  color: var(--text); padding: 8px 14px; border-radius: 8px; font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover { background: #eff6ff; color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 100%);
  color: #fff; padding: 84px 0 96px; text-align: center; position: relative; overflow: hidden;
}

.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.14), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(255,255,255,0.14), transparent 42%);
}

.hero .container { position: relative; z-index: 1; }

.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: 1px; margin-bottom: 16px; }

.hero p { font-size: 18px; opacity: 0.93; max-width: 700px; margin: 0 auto 26px; }

.hero-tags { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.hero-tags span {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32);
  padding: 6px 18px; border-radius: 999px; font-size: 14px;
}

/* ---------- 区块 ---------- */
.section { padding: 64px 0; }

.section-title { text-align: center; margin-bottom: 44px; }

.section-title h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }

.section-title p { color: var(--text-light); font-size: 16px; }

.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- 卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card .icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; margin-bottom: 18px;
}

.icon-blue { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.icon-green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.icon-orange { background: linear-gradient(135deg, #d97706, #f59e0b); }
.icon-indigo { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }

.card h3 { font-size: 20px; margin-bottom: 10px; }

.card p { color: var(--text-light); font-size: 15px; margin-bottom: 20px; flex: 1; }

.card ul { margin: 0 0 20px 18px; color: var(--text-light); font-size: 14px; flex: 1; }

.card ul li { margin-bottom: 6px; }

.btn {
  display: inline-block; padding: 10px 24px; border-radius: 8px;
  font-size: 15px; font-weight: 600; border: none; cursor: pointer; text-align: center;
  transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- 文档区（单页 Tab） ---------- */
.doc-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.doc-tabs { display: flex; border-bottom: 1px solid var(--border); background: #f8fafc; overflow-x: auto; }

.doc-tab {
  flex: 1; min-width: 200px; padding: 16px 20px; text-align: left;
  background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--text-light); border-bottom: 3px solid transparent;
  transition: all 0.2s; font-family: inherit;
}

.doc-tab:hover { color: var(--primary); background: #fff; }

.doc-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: #fff; }

.doc-body { padding: 36px 40px; display: none; }

.doc-body.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.doc-body h3 { font-size: 24px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #eff6ff; }

.doc-body h4 { font-size: 17px; margin: 26px 0 10px; color: var(--primary-dark); }

.doc-body p, .doc-body li { color: var(--text); font-size: 15px; }

.doc-body ul, .doc-body ol { margin: 0 0 14px 22px; }

.doc-body li { margin-bottom: 6px; }

.doc-body .note {
  background: #f0f9ff; border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 6px; font-size: 14px; color: #0c4a6e; margin: 16px 0;
}

.doc-body .warn {
  background: #fff7ed; border-left: 4px solid #f59e0b;
  padding: 12px 16px; border-radius: 6px; font-size: 14px; color: #7c2d12; margin: 16px 0;
}

.doc-body code {
  background: #f1f5f9; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 7px; font-size: 13px; color: #be123c; font-family: "SFMono-Regular", Consolas, monospace;
}

.step { display: flex; gap: 14px; margin-bottom: 18px; }

.step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; margin-top: 2px;
}

.step-body { flex: 1; }

.step-body strong { display: block; margin-bottom: 2px; }

.step-body p { color: var(--text-light); font-size: 14.5px; }

/* ---------- 关于区 ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

.about-item { text-align: center; padding: 24px; }

.about-item .icon { font-size: 34px; margin-bottom: 12px; }

.about-item h4 { font-size: 17px; margin-bottom: 8px; }

.about-item p { color: var(--text-light); font-size: 14px; }

/* ---------- 页脚（备案） ---------- */
.site-footer {
  background: #0f172a; color: #94a3b8; padding: 32px 0 26px; font-size: 13.5px;
}

.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1;
}

.footer-info a { color: #cbd5e1; margin: 0; }
.footer-info a:hover { color: #fff; }

.footer-info .dot { color: #475569; }

.beian-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #cbd5e1; transition: color 0.2s;
  height: 20px; line-height: 20px;
}

.beian-link:hover { color: #fff; }

.beian-link img { height: 20px; width: 20px; flex-shrink: 0; }

.footer-divider { width: 100%; max-width: 360px; border-top: 1px solid #1e293b; margin: 6px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-links a { padding: 8px 10px; font-size: 14px; }
  .hero h1 { font-size: 30px; }
  .doc-body { padding: 24px 20px; }
  .doc-tabs { flex-direction: column; }
  .doc-tab { border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
  .doc-tab.active { border-left-color: var(--primary); border-bottom-color: var(--border); }
}
