/* =========================================================
   YSM 软件库 门户样式（v2 · 明暗双主题）
   亮色：偏粉白 · 暗色：深灰
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---------- Minecraft 字体 ---------- */
@font-face { font-family: 'MCFont'; src: url('../fonts/minecrafter.reg.ttf') format('truetype'); font-display: swap; font-weight: 400; }
@font-face { font-family: 'MCFont'; src: url('../fonts/mc-bold.otf') format('opentype'); font-display: swap; font-weight: 700; }
@font-face { font-family: 'MCCN'; src: url('../fonts/pixel11.ttf') format('truetype'); font-display: swap; }

/* ---------- 主题变量 ---------- */
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --primary: #ff8c42;
  --primary-2: #ffc24b;
  --primary-grad: linear-gradient(135deg, #ff7a18 0%, #ffc24b 100%);
  --primary-soft: rgba(255, 140, 66, 0.15);
  --accent: #ffc24b;
  --accent-soft: rgba(255, 194, 75, 0.15);
  --bg: #0a0b10;
  --bg-grad: #0a0b10;
  --card: #13151d;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf0;
  --text-2: #b8bece;
  --text-3: #8b91a3;
  --input-bg: #1a1d28;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 28px rgba(255, 140, 66, 0.28);
  --header-bg: rgba(10, 11, 16, 0.8);
  --tag-bg: rgba(255, 140, 66, 0.12);
  --comment-bg: #13151d;
}

html { background: #0a0b10; }
body {
  font-family: 'MCFont', 'MCCN', "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
/* 全屏极光背景 */


.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 4px 10px var(--primary-soft);
}
.logo-text { font-family: 'MCFont', 'PingFang SC', sans-serif; background: linear-gradient(90deg, #ff7a18 0%, #ff8c42 45%, #ffc24b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; font-synthesis: weight; letter-spacing: 1px; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}
.main-nav a {
  color: var(--text-2);
  text-decoration: none;
  margin: 0 12px;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--primary); }

/* 主题切换按钮 */
.theme-toggle {
  width: 38px; height: 38px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover { transform: rotate(20deg); box-shadow: var(--shadow); }

/* ---------- 主视觉 ---------- */
.hero {
  background: transparent;
  color: #fff;
  padding: 76px 0 68px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
}
.hero-eyes {
  position: absolute;
  inset: 0;
  background: url(../img/eyes2.png) no-repeat center 58%;
  background-size: min(560px, 78vw) auto;
  opacity: 0.13;
  filter: brightness(1.2) drop-shadow(0 0 24px rgba(255,170,70,0.5));
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-family: 'MCFont', 'MCCN', sans-serif; font-size: 42px; margin-bottom: 10px; letter-spacing: 3px; background: linear-gradient(90deg, #ff7a18 0%, #ff8c42 45%, #ffc24b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; font-synthesis: weight; }
.slogan { font-size: 16.5px; opacity: 0.95; margin-bottom: 30px; }
.search-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
.search-box input {
  flex: 1;
  padding: 13px 20px;
  border: none;
  border-radius: 26px;
  font-size: 15px;
  outline: none;
  background: rgba(255,255,255,0.96);
  color: #333;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.search-box button {
  padding: 13px 30px;
  border: none;
  border-radius: 26px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(255,140,66,0.35);
}
.search-box button:hover { opacity: 0.9; }

/* ---------- 功能入口（搜索栏下方一排） ---------- */
.feature-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.feature-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  color: #cfd6e6;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
}
.feature-item:hover { background: rgba(255,140,66,0.12); color: #fff; border-color: rgba(255,140,66,0.4); transform: translateY(-2px); }

/* ---------- 软件区域 ---------- */
#software { padding: 44px 0 24px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: 23px;
  display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
  content: "";
  width: 5px; height: 22px;
  border-radius: 3px;
  background: var(--primary-grad);
}
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.category-tabs button {
  padding: 7px 18px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  transition: all 0.2s;
}
.category-tabs button:hover { color: var(--primary); border-color: var(--primary); }
.category-tabs button.active {
  background: var(--primary-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-soft);
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

/* 卡片 */
.software-card {
  background: linear-gradient(rgba(8,6,20,0.42), rgba(8,6,20,0.5)), url('../img/star.jpg') center/cover no-repeat;
  border: 1px solid rgba(255, 215, 130, 0.22);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.software-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* 卡片图片 */
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* 皮肤贴图为正方形，改 1:1 避免 16:9 裁切头脚 */
  background: linear-gradient(135deg, #2b2b33, #3a3a44);
  overflow: hidden;
}
.card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.software-card:hover .card-image { transform: scale(1.05); }
.card-image-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px;
  background: var(--primary-grad);
  color: rgba(255,255,255,0.9);
}
.card-category-tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

/* 卡片内容 */
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-meta span {
  font-size: 12px;
  color: var(--text-2);
  background: var(--tag-bg);
  padding: 3px 10px;
  border-radius: 14px;
  display: inline-flex; align-items: center; gap: 4px;
}
.card-desc {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}
.card-actions { display: flex; gap: 10px; align-items: center; }
.btn-download {
  flex: 1;
  text-align: center;
  padding: 11px 0;
  background: var(--primary-grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 14px var(--primary-soft);
  letter-spacing: 1px;
}
.btn-download:hover { opacity: 0.92; box-shadow: 0 8px 20px var(--primary-soft); }
.btn-comment {
  padding: 11px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s;
}
.btn-comment:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 评论区 ---------- */
.comment-block {
  margin-top: 16px;
  border-top: 1px dashed var(--card-border);
  padding-top: 14px;
}
.comment-block h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }

/* Waline 暗色适配 */
[data-theme="dark"] .wl-panel,
[data-theme="dark"] .wl-comment,
[data-theme="dark"] .wl-card,
[data-theme="dark"] .wl-editor {
  background: var(--comment-bg);
  color: var(--text);
}
[data-theme="dark"] .wl-input,
[data-theme="dark"] .wl-editor {
  background: #2b2b33;
  color: var(--text);
  border-color: var(--card-border);
}
[data-theme="dark"] .wl-action,
[data-theme="dark"] .wl-btn {
  color: var(--text-2);
}

/* ---------- 关于 ---------- */
.about-section {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px;
  margin: 32px 0 44px;
  box-shadow: var(--shadow);
}
.about-section h2 {
  font-size: 20px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.about-section h2::before {
  content: "";
  width: 5px; height: 20px; border-radius: 3px;
  background: var(--primary-grad);
}
.about-section p { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--card-border);
  background: var(--header-bg);
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.empty-tip { text-align: center; color: var(--text-3); padding: 50px 0; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .software-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 8px; }
  .main-nav a { margin: 0 10px; }
}

/* ===== 作者文件夹卡片（v3） ===== */
.view-section { padding: 40px 0 20px; }
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.author-card {
  background: linear-gradient(rgba(8,6,20,0.42), rgba(8,6,20,0.5)), url('../img/star.jpg') center/cover no-repeat;
  border: 1px solid rgba(255, 215, 130, 0.28);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.author-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-hover); }
.author-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* 皮肤贴图为正方形，改 1:1 避免裁切 */
  background: var(--primary-grad);
  overflow: hidden;
}
.author-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-cover-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, #2b2b33, #3a3a44);
  color: rgba(255,255,255,0.85);
}
.author-badge {
  position: absolute;
  right: 12px; bottom: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.author-body { position: relative; z-index: 1; padding: 14px 18px 16px; display: flex; align-items: center; gap: 14px; }
.author-info { flex: 1; min-width: 0; }
.author-avatar-wrap {
  width: 64px; height: 64px; flex: 0 0 64px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--primary);
  box-sizing: border-box;
  background: var(--card-border);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.author-avatar-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 50%;
}
.author-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; border: 2px solid var(--primary); }
.author-title-row { display: flex; align-items: center; }
.author-title { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--primary); text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.author-desc {
  font-size: 12.5px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.author-hint {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
.author-count { font-size: 13px; color: var(--text-3); }

/* 面包屑 */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 0 0;
  font-size: 14px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-3); }

/* 作者无封面时计数 */
.author-model-count { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
/* 无图模型卡片紧凑化 */
.software-card .card-body { padding: 14px 16px; }
.software-card .card-title { font-size: 15px; margin-bottom: 8px; }

/* 排序控件 */
.head-right { display: flex; align-items: center; gap: 12px; }
.author-sort {
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.author-sort:focus { outline: none; border-color: var(--primary); }

/* ===== 用户系统 (v5) ===== */
.user-status { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-name { color: var(--primary); font-weight: 600; }
.user-quota { color: var(--text-3); }
.user-logout { color: var(--text-2); text-decoration: none; }
.user-logout:hover { color: var(--primary); }
.user-login-btn {
  padding: 7px 16px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 18px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.user-login-btn:hover { opacity: 0.9; }

/* 登录/注册模态框 */
.auth-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.auth-modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 26px 30px;
  width: 340px;
  max-width: 92vw;
  box-shadow: var(--shadow-hover);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 8px 0;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
}
.auth-tab.active {
  background: var(--primary-grad);
  border-color: transparent;
  color: #fff;
}
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.auth-field input:focus { border-color: var(--primary); }
.auth-msg { font-size: 13px; color: #e5484d; min-height: 18px; margin-bottom: 8px; }
.auth-submit {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.auth-close {
  margin-top: 12px;
  width: 100%;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
}

/* 邮箱+验证码行 */
.auth-email-row { display: flex; gap: 8px; }
.auth-email-row input { flex: 1; }
.auth-sendcode {
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.auth-sendcode:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 评论极简化（隐藏多余元素） ===== */
.wl-header, .wl-login-info, .wl-text-number,
.wl-sort, .wl-action, .wl-gif-popup, .wl-emoji-popup,
.wl-poweredby, .wl-captcha-container, .wl-reaction,
.wl-meta-head { display: none !important; }
.wl-comment .wl-panel { border: none !important; }
.wl-editor { min-height: 80px !important; }
.wl-footer .wl-info { justify-content: flex-end !important; }
.wl-btn.primary { margin-left: 0 !important; }

/* ===== 自研评论样式 ===== */
.comment-list { margin-bottom: 12px; max-height: 320px; overflow-y: auto; }
.comment-empty { color: var(--text-3); font-size: 13px; padding: 8px 0; }
.comment-item { padding: 10px 0; border-bottom: 1px dashed var(--card-border); }
.comment-item:last-child { border-bottom: none; }
.comment-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-nick { font-size: 13px; font-weight: 600; color: var(--primary); }
.comment-time { font-size: 12px; color: var(--text-3); }
.comment-content { font-size: 14px; color: var(--text); line-height: 1.6; word-break: break-word; }
.comment-input-row { display: flex; gap: 10px; align-items: flex-end; }
.comment-input {
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}
.comment-input:focus { border-color: var(--primary); }
.comment-send {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.comment-send:disabled { opacity: 0.6; cursor: not-allowed; }

/* 忘记密码 */
.auth-forgot { margin-top: 10px; text-align: center; }
.auth-forgot a { color: var(--text-3); font-size: 13px; text-decoration: none; }
.auth-forgot a:hover { color: var(--primary); }

/* 管理后台入口 */
.user-admin {
  padding: 5px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 14px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}
.user-admin:hover { background: var(--primary); color: #fff; }

/* =========================================================
   模型详情页（model.html）
   ========================================================= */
.detail-page { padding: 28px 20px 60px; }
.detail-loading, .detail-error { padding: 60px 0; text-align: center; color: var(--text-2); font-size: 16px; }
.detail-error { color: var(--primary); }

/* 顶部 hero：预览图 + 信息 */
.detail-hero {
  display: flex; gap: 32px; margin-bottom: 36px; flex-wrap: wrap;
  background: linear-gradient(rgba(8,6,20,0.42), rgba(8,6,20,0.5)), url('../img/star.jpg') center/cover no-repeat; border: 1px solid rgba(255, 215, 130, 0.22);
  border-radius: 18px; padding: 28px; box-shadow: var(--shadow);
}
.detail-preview-wrap { position: relative; flex-shrink: 0; width: 200px; }
.detail-preview {
  width: 200px; height: 340px; object-fit: contain; border-radius: 12px;
  background: #14141f; border: 1px solid var(--card-border);
}
.detail-ver-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--primary-grad); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; box-shadow: var(--shadow);
}
.detail-info { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 14px; }
.detail-title { font-size: 28px; font-weight: 800; line-height: 1.3; color: var(--primary); }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-meta-tag {
  font-size: 13px; padding: 4px 12px; border-radius: 16px;
  background: var(--tag-bg); color: var(--text-2); font-weight: 500;
}
.detail-meta-tag.detail-free { background: rgba(34,197,94,0.14); color: #16a34a; }
.detail-meta-tag.detail-paid { background: rgba(234,179,8,0.14); color: #ca8a04; }
.detail-author-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-author-chip {
  font-size: 12.5px; padding: 3px 11px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary); font-weight: 500;
}
.detail-actions { margin-top: 6px; }
.detail-dl-btn { padding: 13px 34px; font-size: 16px; border-radius: 14px; }

/* 分区 */
.detail-section { margin-bottom: 38px; }
.detail-section-title {
  font-size: 20px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--card-border);
}
.detail-tips p { margin-bottom: 10px; line-height: 1.85; color: var(--text); white-space: pre-wrap; }

/* 制作人员卡片 */
.detail-author-list { display: grid; gap: 12px; }
.detail-author-card {
  background: linear-gradient(rgba(8,6,20,0.42), rgba(8,6,20,0.5)), url('../img/star.jpg') center/cover no-repeat; border: 1px solid rgba(255, 215, 130, 0.22);
  border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow);
}
.detail-author-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-author-card-name { font-weight: 700; font-size: 15px; }
.detail-author-card-role {
  font-size: 12px; padding: 2px 10px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
}
.detail-author-card-comment { color: var(--text-2); font-size: 13.5px; margin-bottom: 8px; }
.detail-author-card-links { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-contact-link {
  font-size: 13px; padding: 4px 12px; border-radius: 12px;
  background: var(--tag-bg); color: var(--primary); text-decoration: none; transition: opacity .2s;
}
.detail-contact-link:hover { opacity: 0.8; }
.detail-contact-text { font-size: 13px; color: var(--text-2); padding: 4px 0; }
.detail-license-desc { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.detail-link-row { display: flex; gap: 10px; margin-top: 10px; }

/* 版本列表 */
.detail-ver-hint { color: var(--text-2); font-size: 13.5px; margin-bottom: 14px; }
.detail-version-list { display: grid; gap: 10px; }
.detail-version-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 20px; box-shadow: var(--shadow); transition: transform .15s;
}
.detail-version-row:hover { transform: translateY(-2px); }
.detail-version-latest {
  border-color: var(--primary); border-width: 2px;
  background: var(--primary-soft);
}
.detail-version-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-version-num { font-weight: 700; font-size: 16px; }
.detail-version-new {
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px;
  background: var(--primary-grad); color: #fff;
}
.detail-version-size { font-size: 13px; color: var(--text-2); }
.detail-version-btn { padding: 9px 24px; font-size: 14px; border-radius: 10px; }

/* 响应式 */
@media (max-width: 640px) {
  .detail-hero { flex-direction: column; padding: 20px; }
  .detail-preview-wrap { width: 100%; max-width: 200px; margin: 0 auto; }
  .detail-title { font-size: 22px; }
  .detail-version-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .detail-version-btn { width: 100%; }
}
/* 卡片版本角标 */
.card-image-wrap { position: relative; }
.card-ver-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--primary-grad);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.detail-meta-tag.detail-quality-s { background: rgba(234,179,8,0.2); color: #b45309; font-weight:700; }
.detail-meta-tag.detail-quality-a { background: rgba(34,197,94,0.16); color: #16a34a; font-weight:700; }
.detail-meta-tag.detail-quality-b { background: rgba(59,130,246,0.16); color: #2563eb; font-weight:600; }
.detail-meta-tag.detail-quality-c { background: rgba(234,179,8,0.14); color: #a16207; }
.detail-meta-tag.detail-quality-d { background: rgba(249,115,22,0.16); color: #c2410c; }
.detail-meta-tag.detail-quality-e { background: rgba(239,68,68,0.14); color: #b91c1c; }

.author-rating { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 12.5px; color: var(--text-2); margin-top: 2px; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }

.grade-SSS { color: #f97316; font-weight: 700; }
.grade-SS { color: #eab308; font-weight: 700; }
.grade-S { color: #22c55e; font-weight: 600; }
.grade-A { color: #3b82f6; font-weight: 600; }
.grade-B { color: #6b7280; font-weight: 500; }
.grade-C { color: #9ca3af; font-weight: 500; }


/* ---------- 站点公告弹窗（每天弹一次） ---------- */
.announce-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.announce-modal {
  background: linear-gradient(rgba(8,6,20,0.55), rgba(8,6,20,0.62)), url('../img/star.jpg') center/cover no-repeat;
  color: var(--text);
  border: 1px solid rgba(255, 215, 130, 0.25);
  border-radius: 18px;
  padding: 28px 30px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: announceIn 0.25s ease;
  max-height: 86vh;
  overflow-y: auto;
}
@keyframes announceIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.announce-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.announce-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}
.announce-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--text-3);
  padding: 2px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.announce-close:hover {
  color: var(--text);
  background: var(--primary-soft);
}
.announce-body p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 10px;
}
.announce-body strong {
  color: var(--text);
  font-weight: 600;
}
.announce-sub {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 12px;
  border-radius: 10px;
  margin: 14px 0 8px;
}
.announce-thanks {
  color: var(--text-3) !important;
  font-size: 13px !important;
  margin-top: 4px;
}
.announce-ok {
  display: block;
  margin: 18px 0 0 auto;
  padding: 9px 30px;
  border: none;
  border-radius: 22px;
  background: var(--primary-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.announce-ok:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
@media (max-width: 640px) {
  .announce-modal { padding: 22px 18px 18px; }
  .announce-title { font-size: 16px; }
  .announce-body p { font-size: 13.5px; line-height: 1.75; }
}


/* ---------- 撞色点缀（品红） ---------- */
.author-badge { background: var(--accent) !important; color: #fff; }
.author-model-count { color: var(--accent); }
.card-ver-badge { background: var(--primary-grad) !important; }
.rank-count { color: var(--accent); }
.q-grade { color: var(--accent) !important; }
.q-dl { color: var(--accent); }
.num, .q-num { color: var(--accent); }
/* ===== FutureYSM deep-space refresh: shared visual layer for every route ===== */
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #8cecff;
  --primary-2: #c5f7ff;
  --primary-grad: linear-gradient(135deg, #54c8f4 0%, #8cecff 52%, #c7f8ff 100%);
  --primary-soft: rgba(94, 212, 255, .18);
  --accent: #f4c779;
  --accent-soft: rgba(244, 199, 121, .14);
  --bg: #070a12;
  --bg-grad: #070a12;
  --card: rgba(13, 18, 31, .82);
  --card-border: rgba(181, 224, 255, .13);
  --text: #edf6ff;
  --text-2: #b8c9dc;
  --text-3: #8193aa;
  --input-bg: rgba(7, 12, 23, .82);
  --shadow: 0 14px 38px rgba(0, 0, 0, .36);
  --shadow-hover: 0 22px 52px rgba(50, 161, 224, .22);
  --header-bg: rgba(7, 10, 18, .76);
  --tag-bg: rgba(123, 217, 250, .11);
  --comment-bg: rgba(7, 12, 23, .78);
}

html { min-height: 100%; background: #070a12; scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--text);
  letter-spacing: .005em;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(59, 112, 191, .22), transparent 42%),
    radial-gradient(ellipse at 88% 48%, rgba(105, 63, 163, .16), transparent 38%),
    linear-gradient(rgba(5, 8, 17, .84), rgba(5, 8, 17, .93)),
    url("../img/star.jpg") center top / cover no-repeat;
}
.container { max-width: 1240px; }
.site-header {
  background: rgba(7, 10, 18, .72);
  border-bottom-color: rgba(175, 224, 255, .1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
}
.logo-mark { border-radius: 11px; box-shadow: 0 0 24px rgba(89, 209, 255, .25); }
.logo-text, .hero h1 {
  background: linear-gradient(100deg, #eafaff 3%, #78dcff 48%, #c2b3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 22px rgba(76, 188, 255, .19));
}
.main-nav a:hover { color: var(--primary); }
.theme-toggle, .author-sort, select, input, textarea {
  background-color: var(--input-bg);
  color: var(--text);
  border-color: var(--card-border);
}
.hero {
  padding: 58px 0 42px;
  border-bottom: 1px solid rgba(169, 219, 255, .1);
  background: linear-gradient(180deg, rgba(7, 10, 18, .28), rgba(7, 10, 18, .04));
}
.hero-eyes { opacity: .08; filter: saturate(.55) hue-rotate(155deg); }
.hero h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: 1px; }
.slogan { color: #c2d5e9; opacity: 1; }
.search-box { max-width: 640px; }
.search-box input {
  border: 1px solid rgba(170, 222, 255, .2);
  border-radius: 15px;
  background: rgba(6, 11, 21, .84);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 35px rgba(0,0,0,.18);
}
.search-box input::placeholder, input::placeholder, textarea::placeholder { color: #7588a0; }
.search-box input:focus { border-color: rgba(126, 222, 255, .72); box-shadow: 0 0 0 4px rgba(91, 197, 245, .11); }
.search-box button, .btn-download, .detail-dl-btn, .announce-ok {
  background: linear-gradient(135deg, #43bce8, #77dcf7 62%, #9fdaff);
  color: #06111b;
  box-shadow: 0 8px 24px rgba(65, 187, 233, .22);
}
.portal-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 22px auto 0;
  text-align: left;
}
.shortcut-group {
  min-width: 0;
  padding: 11px 13px 12px;
  border: 1px solid rgba(174, 218, 255, .11);
  border-radius: 15px;
  background: linear-gradient(130deg, rgba(11, 18, 31, .65), rgba(9, 14, 27, .48));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.shortcut-heading {
  margin: 0 0 8px 3px;
  color: #a5bad1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.feature-row { justify-content: flex-start; gap: 8px; margin: 0; }
.feature-item {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  border: 1px solid rgba(174, 218, 255, .14);
  border-radius: 11px;
  color: #c4d4e7;
  background: rgba(10, 16, 29, .66);
  backdrop-filter: blur(12px);
  padding: 9px 10px;
  white-space: nowrap;
}
.feature-item:hover { color: #f1fbff; background: rgba(33, 75, 104, .44); border-color: rgba(120, 218, 255, .4); }
.section-head { margin: 30px 0 18px; }
.section-head h2, .detail-section-title, .about-section h2 { color: #e9f5ff; }
.section-head h2::before { background: linear-gradient(180deg, #93ecff, #6678d8); border-radius: 3px; }
.software-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 224px), 1fr)); gap: 18px; perspective: 1200px; }
.software-card, .author-card, .detail-section, .detail-version-row,
.rank-item, .q-item, .wish-stat, .wish-panel, .wish-item, .wish-list-panel,
.wish-dup-box, .wish-dup-item, .faq-toc, .faq-section, .faq-note, .faq-item,
.upload-area, .quota-card, .contrib-note, .contrib-card, .memorial-stat,
.page-card, .admin-card,
.comment-block, .comment-item, .announce-modal {
  color: var(--text);
  background: linear-gradient(145deg, rgba(18, 26, 43, .92), rgba(9, 14, 26, .91));
  border: 1px solid rgba(173, 219, 255, .14);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}
.software-card {
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .28s cubic-bezier(.2,.75,.25,1), border-color .28s, box-shadow .28s;
}
.software-card:hover {
  transform: translateY(-7px) rotateX(1deg);
  border-color: rgba(130, 222, 255, .42);
  box-shadow: 0 25px 54px rgba(0, 0, 0, .4), 0 0 26px rgba(59, 174, 222, .12);
}
.card-image-wrap {
  aspect-ratio: 1 / 1.08;
  background: radial-gradient(ellipse at 50% 70%, rgba(70, 112, 165, .24), transparent 57%), #090e19;
}
.card-image { object-fit: contain; padding: 10px; filter: drop-shadow(0 18px 18px rgba(0,0,0,.42)); }
.software-card:hover .card-image { transform: scale(1.055) translateY(-3px); }
.card-body { padding: 14px 15px 15px; }
.card-title { color: #e5f5ff; font-size: 15px; line-height: 1.45; }
.card-meta span, .detail-meta-tag { color: #bed3e7; background: rgba(115, 196, 235, .1); border: 1px solid rgba(140, 207, 244, .1); }
.btn-comment, .detail-version-btn, .author-sort, .category-tabs button {
  border: 1px solid rgba(173, 219, 255, .17);
  border-radius: 10px;
  background: rgba(12, 20, 34, .82);
  color: #cce0f1;
}
.btn-comment:hover, .detail-version-btn:hover, .category-tabs button:hover { color: #f3fcff; border-color: rgba(126, 221, 255, .45); }
.btn-download { border-radius: 10px; }
.author-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.author-card { border-radius: 17px; overflow: hidden; }
.author-card:hover { transform: translateY(-5px); border-color: rgba(130, 222, 255, .36); box-shadow: var(--shadow-hover); }
.author-title, .detail-title { color: #e8f7ff; }
.author-badge, .card-ver-badge { background: rgba(6, 14, 25, .78) !important; color: #d7f6ff; border: 1px solid rgba(155, 227, 255, .25); backdrop-filter: blur(10px); }
.detail-page { padding-top: 26px; }
.detail-hero { align-items: stretch; gap: 28px; padding: 20px; border: 1px solid var(--card-border); border-radius: 20px; background: linear-gradient(145deg, rgba(18, 27, 44, .9), rgba(8, 13, 25, .82)); box-shadow: var(--shadow); }
.detail-preview-wrap { width: min(38%, 360px); border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 72%, rgba(92, 147, 201, .3), transparent 58%), #090e19; box-shadow: 0 22px 45px rgba(0,0,0,.35); }
.detail-preview { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.detail-info { justify-content: center; }
.detail-title { font-size: clamp(24px, 3vw, 36px); }
.detail-section { margin-top: 22px; padding: 22px; border-radius: 17px; }
.detail-section-title { border-color: var(--card-border); }
.detail-version-row { border-radius: 13px; }
.rank-item, .q-item, .wish-stat, .wish-panel, .wish-item, .wish-list-panel,
.faq-toc, .faq-section, .faq-note, .upload-area, .quota-card, .contrib-card,
.page-card, .wish-dup-box, .wish-dup-item { border-radius: 16px; }
.rank-info .name, .q-name, .wish-hero h1, .faq-hero h1, .memorial-hero h1,
.page-head h1, .page-card h1 { color: #e8f7ff; }
.rank-item, .q-item, .wish-table, .wish-table th, .wish-table td { border-color: rgba(173, 219, 255, .12); }
.q-thumb, .wish-stat, .quota-card, .memorial-stat { box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.wish-submit, .wish-form button, .upload-area button, .page-card button,
.page-card .primary, .btn-primary { background: var(--primary-grad); color: #06111b; border-color: transparent; }
.faq-q, .faq-toc a, .back-link { color: #c7e4f6; }
.faq-a, .faq-note, .contrib-note, .page-desc, .wish-hero p { color: var(--text-2); }
.viewer-wrap { max-width: 1040px; }
body .viewer-canvas-box { border: 1px solid var(--card-border); border-radius: 18px; background: radial-gradient(ellipse at 50% 65%, rgba(75,127,183,.24), transparent 58%), rgba(7,11,21,.72); box-shadow: var(--shadow); }
body .viewer-info, body .viewer-hint { color: var(--text-2); }
body .viewer-btn { border: 1px solid var(--card-border); border-radius: 10px; background: rgba(12,20,34,.86); color: var(--text); }

/* Admin routes use this shared layer too, with their existing controls intact. */
body:has(.wrap) { min-height: 100vh; background: transparent !important; color: var(--text) !important; }
body:has(.wrap) header { background: rgba(8,13,24,.88); border-bottom-color: var(--card-border); color: var(--text); }
body:has(.wrap) .wrap { max-width: 1180px; }
body:has(.wrap) .upload-box, body:has(.wrap) .card, body:has(.wrap) .model-group,
body:has(.wrap) .model-item, body:has(.wrap) .sec-head, body:has(.wrap) table,
body:has(.wrap) .tabs { background: rgba(13,19,32,.88); color: var(--text); border-color: var(--card-border); }
body:has(.wrap) th { background: rgba(24,35,54,.92); color: #e6f4ff; }
body:has(.wrap) td, body:has(.wrap) th { border-bottom-color: rgba(173,219,255,.12); }
body:has(.wrap) input, body:has(.wrap) textarea, body:has(.wrap) select { background: rgba(7,12,23,.9); color: var(--text); border-color: var(--card-border); }
body:has(.wrap) button { border-radius: 9px; }
body:has(.wrap) .btn-blue, body:has(.wrap) nav button.active { background: var(--primary-grad); color: #06111b; border-color: transparent; }
.about-section { border-top-color: rgba(170, 216, 255, .1); color: var(--text-2); }
.site-footer { border-top-color: rgba(170, 216, 255, .1); color: var(--text-3); }
.breadcrumb, .empty-tip, .detail-loading, .detail-ver-hint { color: var(--text-2); }
.model-toolbar { display: flex; align-items: center; gap: 12px; }
.model-load-more { display: block; margin: 28px auto 8px; min-width: 180px; padding: 11px 22px; }
input, textarea, select { border-radius: 10px; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid rgba(125, 221, 255, .75); outline-offset: 3px; }
.announce-mask, .modal-overlay { background: rgba(2, 5, 12, .76); backdrop-filter: blur(10px); }
.announce-modal { border-radius: 20px; }

@media (max-width: 760px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 42px 0 30px; }
  .hero-eyes { background-size: min(430px, 92vw) auto; }
  .portal-shortcuts { grid-template-columns: 1fr; gap: 9px; margin-top: 18px; }
  .shortcut-group { padding: 9px 10px 10px; }
  .feature-row { flex-wrap: wrap; }
  .feature-item { flex: 1 1 calc(33.333% - 8px); padding: 9px 6px; font-size: 12px; }
  .software-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px; }
  .card-actions { gap: 7px; }
  .btn-download, .btn-comment { font-size: 13px; }
  .detail-hero { padding: 14px; gap: 18px; }
}
@media (max-width: 480px) {
  .portal-shortcuts { gap: 8px; }
  .feature-item { flex-basis: calc(50% - 8px); }
  .software-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-image-wrap { aspect-ratio: 1 / 1; }
  .card-title { font-size: 13px; }
  .card-meta { gap: 5px; }
  .card-meta span { padding: 2px 6px; font-size: 10px; }
  .card-actions { flex-direction: column; align-items: stretch; }
  .card-actions > * { width: 100%; }
  .model-toolbar { gap: 7px; }
  .detail-hero { flex-direction: column; }
  .detail-preview-wrap { width: 100%; aspect-ratio: 1 / 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Dynamic card videos preserve the portrait card frame instead of cropping it. */
.card-image-wrap.has-dynamic-preview { aspect-ratio: 520 / 700; }
.card-image-wrap.has-dynamic-preview .card-image { object-fit: contain; padding: 0; }
.software-card.has-dynamic-preview-card .card-title { display: none; }
.software-card.has-dynamic-preview-card:hover .card-image { transform: none; }
.detail-preview-wrap.has-dynamic-preview { aspect-ratio: 520 / 700; }
.detail-preview-wrap.has-dynamic-preview .detail-preview { padding: 0; object-fit: contain; }

/* card-v2-20261022-01: full 420x720 exported cards, scoped to the new GIFs. */
.card-image-wrap.has-card-preview-v2,
.detail-preview-wrap.has-card-preview-v2 { aspect-ratio: 7 / 12; background: #1b171d; }
.card-image-wrap.has-card-preview-v2 .card-image,
.detail-preview-wrap.has-card-preview-v2 .detail-preview { width: 100%; height: 100%; object-fit: contain; padding: 0; filter: none; }
.q-thumb.preview-card-v2 { height: auto; aspect-ratio: 7 / 12; object-fit: contain; background: #1b171d; }
