/* ============================================================
   强度研究院（Genshin Impact SRI）— 全局样式表
   设计风格：深色背景 + 液态玻璃效果 + 响应式布局
   参考：DeepSeek 网页版字体排版风格
   UI 基准缩放：150%（html font-size: 24px）
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS 自定义变量（设计令牌）
   ---------------------------------------------------------- */
:root {
  /* 背景色系 */
  --bg-primary: #0a0a10;
  --bg-secondary: #12121a;

  /* 文字色系 */
  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.55);
  /* 描述文字提亮，更明显可见 */
  --text-tertiary: rgba(240, 240, 245, 0.5);

  /* 强调色 */
  --accent: #6ea8fe;
  --accent-hover: #8db9ff;

  /* 液态玻璃效果 */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  --glass-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 模糊量 */
  --blur-amount: 14px;

  /* 间距（使用 rem，随根字号缩放） */
  --navbar-height: 3.5rem;

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ----------------------------------------------------------
   2. 全局重置与基础样式
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* 180% UI 缩放基准（默认 16px → 28.8px，150% × 1.20） */
  font-size: 28.8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  /* 统一字体栈：Noto Sans SC 作为主字体，确保所有平台与 Windows 端一致 */
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  /* 禁止 emoji 字体渲染 */
  font-variant-emoji: text;
}

/* 链接重置 */
a {
  color: inherit;
  text-decoration: none;
}

/* 图片重置 */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 按钮重置 */
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

/* ----------------------------------------------------------
   3. 液态玻璃效果工具类
   ---------------------------------------------------------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-inner-shadow);
  transition: background var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-normal);
}

/* 导航栏专用玻璃效果（更透明） */
.glass-nav {
  background: rgba(10, 10, 18, 0.4);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-bottom: 1px solid var(--glass-border);
}

/* ----------------------------------------------------------
   4. 背景图片层
   ---------------------------------------------------------- */
.background-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

/* 桌面端背景 */
.background-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("png/index-background-7.0.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* 背景图片在浏览器缩放时保持固定 */
  background-attachment: fixed;
  opacity: 0.4;
}

/* 半透明遮罩层，增强文字对比度 */
.background-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.35);
}

/* ----------------------------------------------------------
   5. 导航栏（电脑端显示，手机端隐藏）
   ---------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  padding: 0 1.5rem;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 导航链接通用样式 */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.44rem 0.88rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast),
    background var(--transition-fast);
  user-select: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link:active {
  background: rgba(255, 255, 255, 0.03);
}

/* 主页链接在主页时的禁用状态 */
.nav-link.disabled {
  color: var(--text-tertiary);
  pointer-events: none;
  cursor: default;
}

/* 当前页面对应的导航链接高亮 */
.nav-link.active {
  color: var(--accent);
}

/* 音乐控制按钮 */
.nav-music {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.44rem 0.88rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast),
    background var(--transition-fast);
  user-select: none;
}

.nav-music:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-music:active {
  background: rgba(255, 255, 255, 0.03);
}

/* 音乐播放中状态 */
.nav-music.playing {
  color: var(--accent);
}

/* 音乐图标 */
.nav-music-icon {
  font-size: 0.95rem;
  width: 1rem;
  text-align: center;
}

/* ----------------------------------------------------------
   6. 主内容区（垂直居中偏上）
   ---------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--navbar-height) + 2.5rem) 1.5rem 2.5rem;
  /* 视觉上偏上约 5% */
  padding-bottom: 10vh;
}

/* ----------------------------------------------------------
   7. 标题区域
   ---------------------------------------------------------- */
.title-area {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* 网站图标 */
.gensri-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

/* 标题文字容器 */
.title-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* 主标题 */
.title-main {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* 副标题 */
.title-sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

/* ----------------------------------------------------------
   8. QQ 交流群板块
   ---------------------------------------------------------- */
.qq-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.qq-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
}

.qq-cards {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.qq-card {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.qq-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.qq-card i {
  color: #12B7F5;
  font-size: 1rem;
  flex-shrink: 0;
}

/* 二维码图片 */
.qq-qr {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 20;
  background: #fff;
  padding: 6px;
}

/* 桌面端：hover 显示二维码 */
@media (hover: hover) {
  .qq-card:hover .qq-qr { display: block; }
}

/* 手机端：点击显示二维码 */
.qq-card .qq-qr.show { display: block; }

/* ----------------------------------------------------------
   9. 版本信息区域（同一行横向排列，玻璃边框包裹）
   ---------------------------------------------------------- */
.version-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding: 0.6rem 1.5rem;
  /* 统一字号和字体样式 */
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* 分隔符 */
.version-separator {
  color: var(--glass-border);
  user-select: none;
}

/* 版本信息内的动态值 */
.version-info .version-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ----------------------------------------------------------
   9. 跳转按钮区域（电脑端 2列×2行，手机端垂直排列）
   ---------------------------------------------------------- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
}

/* 单个跳转按钮卡片：电脑端 2列布局 */
.btn-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 calc(50% - 0.5rem);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
}

.btn-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25),
    var(--glass-inner-shadow);
  transform: translateY(-3px);
}

.btn-card:active {
  transform: translateY(0);
  box-shadow: var(--glass-shadow), var(--glass-inner-shadow);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

/* 按钮图标（放大） */
.btn-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* 按钮文字容器 */
.btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

/* 按钮标题 */
.btn-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

/* 按钮描述（颜色更明显） */
.btn-desc {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text-tertiary);
  /* 防止过长文字溢出 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------------------------------------
   10. 子页面占位样式
   ---------------------------------------------------------- */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--navbar-height) + 2.5rem) 1.5rem 2.5rem;
}

.glass-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2.5rem;
  text-align: center;
}

/* 占位图标 */
.glass-card .placeholder-icon {
  font-size: 2.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* 占位标题 */
.glass-card .placeholder-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 占位描述 */
.glass-card .placeholder-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   11. 页脚（子页面底部）
   ---------------------------------------------------------- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* 页脚两项之间的分隔点（仅桌面端单行模式） */
.site-footer span:first-child::after {
  content: "·";
  margin-left: 0.5rem;
  color: var(--text-tertiary);
  user-select: none;
}

/* ----------------------------------------------------------
   12. 响应式：平板端 (768px - 1024px)
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --navbar-height: 3.25rem;
  }

  .title-main {
    font-size: 2.2rem;
  }

  .btn-group {
    max-width: 900px;
    gap: 0.75rem;
  }

  .btn-card {
    padding: 1.25rem;
    gap: 0.75rem;
  }

  .btn-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .btn-title {
    font-size: 0.95rem;
  }

  .btn-desc {
    font-size: 0.8rem;
  }
}

/* ----------------------------------------------------------
   13. 响应式：手机端 (< 768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --navbar-height: 3rem;
    --blur-amount: 10px;
  }

  /* 手机端隐藏顶部导航栏 */
  .navbar {
    display: none;
  }

  /* 手机端使用竖版背景图 */
  .background-layer::before {
    background-image: url("png/index-background-7.0(phone).png");
    background-attachment: scroll;
  }

  /* 主内容区无导航栏，减少顶部间距 */
  .hero {
    padding: 2rem 1rem 2rem;
  }

  /* 子页面占位区同样调整 */
  .placeholder {
    padding: 2rem 1rem 2rem;
  }

  /* 标题图标缩小 */
  .gensri-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
  }

  .title-area {
    gap: 0.875rem;
  }

  .title-main {
    font-size: 1.8rem;
  }

  .title-sub {
    font-size: 0.9rem;
  }

  /* 版本信息 */
  .version-info {
    margin-bottom: 2.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* 按钮组：手机端恢复垂直排列 */
  .btn-group {
    flex-direction: column;
    max-width: 400px;
    gap: 0.75rem;
  }

  /* 手机端按钮恢复全宽 */
  .btn-card {
    flex: 1;
    padding: 1.25rem 1.25rem;
  }

  .btn-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .btn-title {
    font-size: 0.95rem;
  }

  .btn-desc {
    font-size: 0.8rem;
  }

  /* 子页面占位卡片 */
  .glass-card {
    padding: 2.25rem 1.75rem;
  }

  /* 手机端页脚恢复两行显示 */
  .site-footer {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-footer span:first-child::after {
    content: none;
  }
}

/* 小屏手机优化 (< 400px) */
@media (max-width: 400px) {
  .title-main {
    font-size: 1.5rem;
  }

  .title-sub {
    font-size: 0.8rem;
  }

  .gensri-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .btn-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .btn-icon {
    width: 2.375rem;
    height: 2.375rem;
  }

  .btn-title {
    font-size: 0.9rem;
  }

  .version-info {
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
  }
}

/* ----------------------------------------------------------
   14. 辅助工具类
   ---------------------------------------------------------- */
.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;
}

/* ----------------------------------------------------------
   15. 管理员登录入口 + 模态框
   ---------------------------------------------------------- */
.admin-login-entry {
  text-align: center;
  padding: 0.5rem 0 1.5rem 0;
}
.admin-login-entry a {
  font-size: 0.75rem; color: var(--text-tertiary); text-decoration: none;
  transition: color var(--transition-fast);
}
.admin-login-entry a:hover { color: var(--text-secondary); }
.admin-login-entry i { margin-right: 0.25rem; }

/* 模态框遮罩 */
.admin-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.admin-modal {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 2rem; width: 360px; max-width: 90vw;
  background: rgba(18,18,26,0.95); position: relative;
}
.admin-modal h3 {
  font-size: 1.1rem; font-weight: 600; color: var(--text-primary);
  text-align: center; margin-bottom: 0.25rem;
}
.admin-modal h3 i { color: var(--accent); margin-right: 0.3rem; }
.admin-modal input {
  padding: 0.55rem 0.8rem; border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); background: rgba(255,255,255,0.05);
  color: #fff; font-family: inherit; font-size: 0.9rem;
}
.admin-modal input:focus { outline: none; border-color: var(--accent); }
.admin-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none; font-size: 1.5rem; color: var(--text-tertiary);
  cursor: pointer; line-height: 1;
}
.admin-modal-close:hover { color: var(--text-primary); }
.admin-modal-error { font-size: 0.8rem; color: #ff6b6b; text-align: center; min-height: 1.2em; }
.admin-modal-login-btn {
  padding: 0.55rem; border: none; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-family: inherit;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: background var(--transition-fast);
}
.admin-modal-login-btn:hover { background: var(--accent-hover); }

@media (max-width: 768px) {
  .admin-modal { padding: 1.5rem; width: 320px; }
}
