/* ===== UndoMOD 官方官网样式 ===== */
/* 简洁清新风格 · 浅色主题 · 响应式 · 动态模糊背景 */

:root {
  --primary: #4f8cff;
  --primary-dark: #356aee;
  --accent: #34d399;
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 12px;
  /* 背景模糊度（JS 会动态修改） */
  --bg-blur: 0px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== 动态背景层 ===== */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* 背景图片 - 替换为你自己的图片路径 */
  background-image: url('background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: blur(var(--bg-blur)) brightness(0.85);
  transition: filter 0.3s ease-out;
}
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(247,248,250,0.1) 0%,
    rgba(247,248,250,0.25) 40%,
    rgba(247,248,250,0.55) 100%
  );
  pointer-events: none;
}

/* ===== 流畅滚动 ===== */
html {
  scroll-behavior: smooth;
}

/* ===== 滚动淡入动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ===== 导航栏 ===== */
.navbar {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(226,232,240,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.75);
  box-shadow: var(--shadow);
}
.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--text); }
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: #eef3ff;
}

/* ===== 通用容器 ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
  position: relative;
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  background: transparent;
  position: relative;
}
.hero::before {
  content: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(79,140,255,0.2);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(255,255,255,0.8);
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  text-shadow: 0 1px 10px rgba(255,255,255,0.6);
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,140,255,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79,140,255,0.4);
}
.btn-outline {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(238,243,255,0.65);
  transform: translateY(-3px);
}

/* ===== 功能卡片 ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.feature-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226,232,240,0.4);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.7);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-icon.blue { background: #eef3ff; }
.feature-icon.green { background: #e8fdf3; }
.feature-icon.purple { background: #f3eeff; }
.feature-icon.orange { background: #fff3e0; }
.feature-icon.red { background: #ffeef0; }
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== 版本支持 ===== */
#versions {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  margin: 0 24px;
}
.versions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.version-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(226,232,240,0.4);
  border-radius: var(--radius);
  padding: 20px 32px;
  text-align: center;
  min-width: 160px;
  transition: all 0.3s ease;
}
.version-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(79,140,255,0.15);
}
.version-card .mc-version {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}
.version-card .loader {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== 快速开始 ===== */
#quickstart {
  background: transparent;
}
.tip-box {
  background: rgba(232,253,243,0.5);
  backdrop-filter: blur(8px);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  padding: 16px 20px 16px 60px;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.steps li:hover {
  background: rgba(255,255,255,0.65);
  transform: translateX(8px);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ===== 下载表格 ===== */
.download-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.download-table th {
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}
.download-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.download-table tr:last-child td { border-bottom: none; }
.download-table tr:hover { background: rgba(238,243,255,0.5); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-fabric {
  background: rgba(238,243,255,0.6);
  color: var(--primary);
}
.badge-stable {
  background: rgba(232,253,243,0.6);
  color: #059669;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(79,140,255,0.2);
}
.btn-download:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,140,255,0.3);
}

/* ===== 文档目录 ===== */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.doc-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226,232,240,0.4);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  background: rgba(255,255,255,0.7);
}
.doc-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}
.doc-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ===== 文档内容页 ===== */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 60px 0;
}
.docs-sidebar {
  position: sticky;
  top: 84px;
  height: fit-content;
}
.docs-sidebar ul {
  list-style: none;
}
.docs-sidebar li {
  margin-bottom: 4px;
}
.docs-sidebar a {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.25s ease;
}
.docs-sidebar a:hover,
.docs-sidebar a.active {
  color: var(--primary);
  background: rgba(238,243,255,0.6);
}
.docs-content {
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.4);
}
.docs-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 24px 0 12px;
}
.docs-content p {
  margin-bottom: 14px;
  color: #334155;
}
.docs-content code {
  background: rgba(238,243,255,0.6);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.9rem;
}
.docs-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.docs-content ul, .docs-content ol {
  padding-left: 24px;
  margin-bottom: 14px;
}
.docs-content li {
  margin-bottom: 6px;
  color: #334155;
}
.docs-content .tip-box {
  background: rgba(232,253,243,0.5);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}
.docs-content .warn-box {
  background: rgba(255,247,237,0.5);
  border-left: 4px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}

/* ===== FAQ ===== */
.faq-item {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226,232,240,0.4);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item:hover {
  box-shadow: var(--shadow);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }
.faq-answer {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-toggle {
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

/* ===== Footer ===== */
.footer {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border-top:1px solid rgba(226,232,240,0.4);
  padding: 48px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
}
.footer-brand span { color: var(--text); }
.footer p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.footer h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ===== 页面切换动画 ===== */
.page-transition {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 按钮点击涟漪效果 ===== */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}
.btn:active::after {
  width: 300px;
  height: 300px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; height: auto; padding: 12px 24px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 0.9rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 80px 0 60px; }
  .section { padding: 50px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .docs-content { padding: 24px; }
  #versions { margin: 0; border-radius: 16px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}
