/* ========================================
   致简工具库 · 全局样式
   Domain: lessformore.cn
   Style: 极简 / 粗野主义 (Everything & 7-zip)
   Zero JS · Zero external dependencies
   ======================================== */

/* ----------------------------------------
   1. CSS 变量 & 重置
   ---------------------------------------- */
:root {
  --color-bg: #fafbfc;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-muted: #888888;
  --color-link: #2563eb;
  --color-link-hover: #1d4ed8;
  --color-download-bg: #2d8a4e;
  --color-download-hover: #1e6b38;
  --color-border: #e5e7eb;
  --color-accent: #2563eb;
  --color-accent-light: #eff6ff;
  --color-code-bg: #f1f5f9;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI",
                "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", "Source Code Pro", monospace;
  --max-width: 680px;
  --content-padding: 1.5rem;
}

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

/* ----------------------------------------
   2. 基础排版
   ---------------------------------------- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: radial-gradient(circle, #d4d8dd 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部科技装饰线 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), #6366f1, #06b6d4);
  z-index: 9999;
  pointer-events: none;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  color: var(--color-text);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* 产品类别小字标识 */
.sub-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}

h1 .sub-label {
  font-size: 1rem;
}

/* ----------------------------------------
   3. 布局
   ---------------------------------------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--content-padding);
}

/* 首页使用居中对齐 */
main.centered {
  text-align: center;
}

/* 产品页使用左对齐（默认） */

/* ----------------------------------------
   4. 页头 & 导航
   ---------------------------------------- */
header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--content-padding);
  border-bottom: 1px solid var(--color-border);
}

header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

header .brand:hover {
  color: var(--color-link);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

nav .separator {
  color: var(--color-border);
  font-weight: 400;
  user-select: none;
}

nav a {
  font-size: 1rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover {
  color: var(--color-link);
  text-decoration: none;
}

nav a.active {
  color: var(--color-accent);
  font-weight: 600;
  border-bottom-color: var(--color-accent);
}

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

/* ----------------------------------------
   5. 首页：品牌名称 & 标语
   ---------------------------------------- */
/* 品牌故事 & 使命 */
.brand-story {
  max-width: 580px;
  margin: 2.5rem auto 3rem;
  text-align: left;
  text-wrap: pretty;
}

.nowrap {
  white-space: nowrap;
}

.brand-heading {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-accent);
}

.brand-story p {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 2;
  margin-bottom: 0;
}

.brand-mission {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* ----------------------------------------
   6. 产品列表（首页）
   ---------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Icon 占位区域 */
.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

a:hover .product-icon {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}

.product-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

a:hover .product-name {
  color: var(--color-link);
}

.product-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ----------------------------------------
   7. 产品页：标题区
   ---------------------------------------- */
.product-hero {
  margin: 1rem 0 1.5rem;
}

.product-hero h1 {
  margin-bottom: 0.25rem;
}

.product-hero .subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.product-hero .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-hero .tags span {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 4px;
}

/* ----------------------------------------
   8. 下载按钮
   ---------------------------------------- */
.download-area {
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-align: center;
}

.download-btn {
  display: inline-block;
  background: var(--color-download-bg);
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.download-btn:hover {
  background: var(--color-download-hover);
  color: #ffffff;
  text-decoration: none;
}

.download-info {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

/* ----------------------------------------
   9. 特性列表
   ---------------------------------------- */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.features-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.5rem;
  color: var(--color-text-secondary);
}

.features-list li::before {
  content: "·";
  position: absolute;
  left: 0.5rem;
  color: var(--color-text-muted);
  font-weight: 700;
}

/* ----------------------------------------
   10. 截图区域
   ---------------------------------------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.screenshot-grid figure {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
}

.screenshot-grid .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.screenshot-grid figcaption {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  padding: 0.5rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

/* ----------------------------------------
   11. 更新日志
   ---------------------------------------- */
.changelog {
  margin: 1rem 0 2rem;
}

.changelog .version {
  margin-bottom: 1rem;
}

.changelog .version h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.changelog .version .date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.changelog .version ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.changelog .version li {
  position: relative;
  padding: 0.15rem 0 0.15rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.changelog .version li::before {
  content: "·";
  position: absolute;
  left: 0.35rem;
  color: var(--color-text-muted);
}

/* ----------------------------------------
   12. 页脚
   ---------------------------------------- */
footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--content-padding);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

footer p {
  margin: 0.2rem 0;
}

footer .beian {
  font-size: 0.75rem;
}

/* ----------------------------------------
   13. 404 页面
   ---------------------------------------- */
.page-404 {
  text-align: center;
  padding: 4rem 0;
}

.page-404 h1 {
  font-size: 4rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.page-404 p {
  color: var(--color-text-secondary);
}

/* ----------------------------------------
   14. 响应式：平板 (≤768px)
   ---------------------------------------- */
@media (max-width: 768px) {
  :root {
    --content-padding: 1.25rem;
  }

  html {
    font-size: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
  }

  .product-grid {
    gap: 1.5rem;
  }

  .product-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
}

/* ----------------------------------------
   15. 响应式：手机 (≤480px)
   ---------------------------------------- */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

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

  .download-area {
    padding: 1.25rem 1rem;
  }

  .download-btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .product-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .product-hero .tags {
    gap: 0.35rem;
  }
}
