/* ==========================================================================
   VooUer 风格介绍站 — 全站样式
   --------------------------------------------------------------------------
   想快速改主题？只改下面 :root 里的变量即可（主色、背景、字体、字号、圆角）。
   容器最大宽度：在「通用内容容器」一节调整四档 max-width
                 （720 / 960 / 1150 / 1330，保持从小到大即可）。
   页面结构：固定顶部导航 + 内容区 + 页脚。
   断点：手机 <= 767px；平板 768–991px；桌面 992px 起。
   ========================================================================== */

:root {
  /* ---- 品牌色 / 文字颜色 ---- */
  --color-brand: #16baaa;              /* 主色：Hero 大标题、强调文字 */
  --color-brand-underline: #16b777;    /* 导航当前项的下划线颜色 */
  --color-logo: #00a2e8;               /* logo 蓝色底 */
  --color-logo-mark: #f2f2f2;          /* logo 里的 V 形 */
  --color-flame: rgba(248, 9, 9, 0.7); /* 首页火焰图标颜色 */
  --color-text: rgba(0, 0, 0, 0.85);   /* 正文颜色 */
  --color-text-muted: #999;            /* 卡片正文等次要文字 */
  --color-text-footer: #777;           /* 页脚文字 */
  --color-link: #3399cc;               /* 介绍页高亮词 */
  --color-link-hover: #1e9fff;         /* 页脚链接悬停 */

  /* ---- 背景 / 边框 ---- */
  --color-bg: #ffffff;
  --color-bg-soft: #fafafa;            /* 手机端页脚背景 */
  --color-header-bg: #2f363c;          /* 顶部导航背景 */
  --color-header-text: rgba(255, 255, 255, 0.7);
  --color-header-text-active: #ffffff;
  --color-border: #eeeeee;             /* 卡片、下拉、分隔线 */
  --color-border-strong: #cccccc;      /* 介绍页标题下划线 */

  /* ---- 字体 ---- */
  --font-sans: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Tahoma, Arial, sans-serif;
  --font-size-base: 14px;
  --line-height-base: 1.8;

  /* ---- 尺寸 / 间距 ---- */
  --nav-height: 60px;                  /* 顶部导航高度 */
  --container-padding: 15px;           /* 内容左右留白 */
  --hero-title-size: 68px;             /* Hero 主标题字号 */
  --hero-subtitle-size: 32px;          /* Hero 副标题字号 */
  --feature-gap: 30px;                 /* 三张卡片之间的间距 */
  --card-padding: 24px;                /* 卡片内边距 */
  --section-gap: 40px;                 /* 主要区块间距 */
  --radius: 2px;                       /* 圆角 */

  /* ---- 阴影 / 动效 ---- */
  --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-dropdown: 0 2px 4px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ==========================================================================
   1. 基础重置
   ========================================================================== */

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--nav-height);       /* 给固定导航让出高度 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* 屏幕阅读器专用文字 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 跳到主要内容的链接（键盘 Tab 时出现） */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--color-brand);
  color: #fff;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 8px;
}

/* 通用内容容器：宽度规则与原站 layui-container 对齐
   想改整体版心宽度，直接改下面四档 max-width（保持从小到大） */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1150px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1330px;
  }
}

/* ==========================================================================
   2. 顶部导航
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-header-bg);
  box-shadow: var(--shadow-nav);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-border);
  opacity: 0.35;
}

.header-inner {
  position: relative;
  height: 100%;
}

.brand {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: var(--nav-height);
}

.brand-mark {
  width: 60px;
  height: 60px;
}

.brand-text {
  display: none;
}

.nav {
  position: absolute;
  top: 0;
  right: 16px;
  display: flex;
  align-items: center;
  height: var(--nav-height);
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
  margin-left: 16px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0 16px;
  line-height: var(--nav-height);
  font-size: 14px;
  color: var(--color-header-text);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-header-text-active);
}

.nav-item.current > .nav-link {
  color: var(--color-header-text-active);
}

/* 当前页的青色下划线，与原站一致 */
.nav-item.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-brand-underline);
}

/* 带下拉的导航项 */
.nav-item.has-children > .nav-link {
  padding-right: 28px;
}

.nav-chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  transform: translateY(-50%);
  transition: transform var(--transition-fast);
}

.nav-item.open .nav-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown {
  display: none;
  position: absolute;
  top: var(--nav-height);
  right: 0;
  min-width: 100%;
  padding: 5px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-dropdown);
  white-space: nowrap;
  z-index: 100;
}

.dropdown a {
  display: block;
  padding: 0 20px;
  line-height: 36px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: #f8f8f8;
  color: #000;
}

.nav-item.open > .dropdown {
  display: block;
}

/* 桌面端鼠标悬停也能展开（触摸设备不生效，避免误触） */
@media (hover: hover) and (min-width: 768px) {
  .nav-item.has-children:hover > .dropdown {
    display: block;
  }

  .nav-item.has-children:hover .nav-chevron {
    transform: translateY(-50%) rotate(180deg);
  }
}

/* 手机端汉堡按钮：三根白色横线，展开后变 X */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  padding: 0 10px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   3. 首页 Hero
   ========================================================================== */

.hero {
  padding: 20px 12px 0;
  text-align: center;
}

.hero-icon-wrap {
  display: flex;
  justify-content: center;
  color: var(--color-flame);
}

.hero-icon {
  width: 160px;
  height: 160px;
}

.hero-title {
  padding-top: 58px;
  font-size: var(--hero-title-size);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-brand);
  text-align: center;
  letter-spacing: 0;
}

.hero-subtitle {
  padding: 16px 0;
  font-size: var(--hero-subtitle-size);
  font-weight: 500;
  line-height: 52px;
  color: var(--color-brand);
  text-align: center;
}

.hero-note {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

/* ==========================================================================
   4. 首页三张特性卡片
   ========================================================================== */

.features {
  margin-top: var(--section-gap);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--feature-gap);
}

.feature {
  padding: var(--card-padding);
  border: 1px solid var(--color-border);
  line-height: 24px;
}

.feature-title {
  margin: 0 0 24px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
}

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

/* ==========================================================================
   5. 介绍页
   ========================================================================== */

.about-panel {
  padding-top: 32px;
  padding-bottom: 60px;
}

.about-inner {
  width: 50%;
  margin: 0 auto;
  text-align: left;
}

.about-title {
  margin: 0 0 20px;
  padding: 0 4px 0 0;
  border-bottom: 2px solid var(--color-border-strong);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.about-text {
  margin: 0;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: var(--line-height-base);
  color: var(--color-text);
}

.about-text .hl {
  color: var(--color-link);
}

.about-divider {
  height: 0;
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

/* 介绍页或短页面时把页脚推到底部 */
.site-footer {
  flex-shrink: 0;
}

/* ==========================================================================
   6. 页脚
   ========================================================================== */

.site-footer {
  padding: 30px 15px;
  font-size: 14px;
  line-height: 30px;
  color: var(--color-text-footer);
  text-align: center;
}

.site-footer a {
  padding: 0 5px;
  color: var(--color-text-footer);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.site-footer strong {
  font-weight: 700;
}

.footer-line {
  margin: 0;
}

/* ==========================================================================
   7. 滚动淡入（由 main.js 添加，JS 不可用时内容照常显示）
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 尊重系统的“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   8. 平板：卡片改单列
   ========================================================================== */

@media (max-width: 991.98px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .about-inner {
    width: 100%;
  }
}

/* ==========================================================================
   9. 手机：导航收起、字号缩小
   ========================================================================== */

@media (max-width: 767.98px) {
  .brand {
    left: 50%;
    transform: translateX(-50%);
  }

  .nav {
    right: 8px;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1004;
  }

  .nav-list {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    display: block;
    width: 100%;
    padding: 8px 0;
    background: var(--color-header-bg);
    box-shadow: var(--shadow-dropdown);
    transition: right var(--transition-base);
    z-index: 1002;
  }

  body.nav-open .nav-list {
    right: 0;
  }

  .nav-item {
    margin-left: 0;
  }

  .nav-link {
    padding: 0 24px;
    line-height: 48px;
  }

  .nav-item.current::after {
    display: none;
  }

  .nav-item.current > .nav-link {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-item.has-children > .nav-link {
    padding-right: 48px;
  }

  .nav-chevron {
    right: 24px;
  }

  /* 手机端下拉改为菜单内展开，避免浮层溢出屏幕 */
  .dropdown {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: none;
  }

  .dropdown a {
    padding: 0 24px 0 44px;
    line-height: 44px;
    color: var(--color-header-text);
  }

  .dropdown a:hover,
  .dropdown a:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  @media (hover: hover) {
    .nav-item.has-children:hover > .dropdown {
      display: none;
    }

    .nav-item.has-children.open > .dropdown {
      display: block;
    }
  }

  .hero-title {
    font-size: clamp(30px, 11vw, 52px);
  }

  .hero-subtitle {
    font-size: 24px;
    line-height: 38px;
  }

  .hero-icon {
    width: 140px;
    height: 140px;
  }

  .hero-title {
    padding-top: 40px;
  }

  .about-panel {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .about-title {
    font-size: 26px;
  }

  .site-footer {
    background: var(--color-bg-soft);
  }

  .footer-line {
    padding-bottom: 16px;
  }
}

/* 超小屏：只收紧副标题，主标题已用 clamp 自适应 */
@media (max-width: 400px) {
  .hero-subtitle {
    font-size: 20px;
    line-height: 32px;
  }
}

/* ==========================================================================
   10. 无 JS 提示
   ========================================================================== */

.noscript {
  margin: 40px auto;
  max-width: 640px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  text-align: center;
}
