/* 3ds.tw 作品列表与平台界面 */

/* =======================================================
   1. 全站字体栈
   ======================================================= */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  --dot: ui-monospace, "SFMono-Regular", Consolas, monospace !important;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace !important;
}

/* 全站基础字体 */
html, body, p, span, h1, h2, h3, h4, h5, h6, a, div, button, input, select, textarea, label {
  font-family: var(--font);
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
}

.brand-3ds {
  display: inline-flex;
  color: inherit;
}

.brand-three { color: var(--a-ink); }
.brand-d { color: var(--x-ink); }
.brand-s { color: var(--b-ink); }
.brand-tw { color: var(--y-ink); }

/* 紧凑状态与标记区域 */
.clock,
.tray-clock,
[data-clock],
.notice-marquee,
.notice-tag,
.filter-label-dot,
.pill-btn,
.sort-select-field,
.masonry-status-bar,
.hub-plat-badge,
.hub-direct-qr-tag,
.hub-progress-info,
.hub-title-orig,
.hub-tag-item,
.sticker,
.brand-badge,
.key-cap,
code,
kbd {
  font-family: var(--dot) !important;
}

/* 简繁语言切换胶囊按钮 */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--well);
  border: 1.5px solid var(--rim);
  font-family: var(--font) !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--rim-lo);
  transition: all 0.1s ease;
  white-space: nowrap;
}

.lang-toggle-btn:hover {
  background: #ffffff;
  border-color: var(--dim);
}

.lang-toggle-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* 顶部跑马灯通告 */
.notice-marquee {
  background: var(--well);
  border-bottom: 1px solid var(--line-soft);
  color: var(--mute);
  font-size: 13px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.notice-tag {
  background: var(--a);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Hero 介绍区 */
.hero-hub {
  max-width: 1200px;
  margin: 14px auto 10px;
  padding: 8px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

@media (max-width: 860px) {
  .hero-hub {
    gap: 12px;
  }
}

.hero-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-stickers {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.hero-hub h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

.brand-hero {
  color: var(--cyan-ink);
}

.hero-hub .accent-hub {
  color: var(--cyan-ink);
  position: relative;
  display: inline-block;
}

.hero-hub .sub-text {
  font-size: 16px;
  color: var(--mute);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 12px;
}

.hero-3ds-img-wrap {
  flex-shrink: 0;
  max-width: 320px;
  width: 100%;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  min-height: 46px;
  margin-bottom: 6px;
  padding: 10px 24px;
  border: 1px solid #0874a8;
  border-radius: 999px;
  background: linear-gradient(#6adcf6, #16a5d7 56%, #0780b7);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .72), 0 4px 0 #075d88, 0 8px 16px rgba(6, 92, 134, .18);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 59, 89, .35);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.hero-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 1px 0 #075d88;
}

.hero-stickers .sticker:first-child {
  background: linear-gradient(#fb8189, #e14b5b) !important;
  border-color: #c43c4c !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 3px 0 #a62f3d !important;
}

.hero-stickers .sticker:nth-child(2) {
  background: linear-gradient(#63d7f5, #1298c8) !important;
  border-color: #0780af !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #086b91 !important;
}

.hero-3ds-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.12));
  transition: transform 0.4s var(--spring);
}

.hero-3ds-img:hover {
  transform: rotate(-2deg) scale(1.03);
}

/* 筛选与搜索卡片 */
.filter-section {
  max-width: 1200px;
  margin: 0 auto 24px auto;
  padding: 0 20px;
}

.filter-panel {
  background: var(--panel);
  border: 2px solid var(--rim);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--rim-lo);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label-dot {
  font-size: 13px;
  color: var(--dim);
  margin-right: 4px;
  text-transform: uppercase;
}

/* 3DS 实体按键胶囊过滤标签 */
.pill-btn {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--rim);
  background: var(--well);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--rim-lo);
  transition: all 0.1s var(--ease-out);
}

.pill-btn:hover {
  background: #ffffff;
  border-color: var(--dim);
}

.pill-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.pill-btn.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: 0 2px 0 #000000;
}

/* 搜索框与排序 */
.search-box-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  max-width: 480px;
  margin-left: auto;
}

.search-input-field {
  flex-grow: 1;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--rim);
  background: var(--well);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-input-field:focus {
  background: #ffffff;
  border-color: var(--cyan-ink);
  box-shadow: 0 0 0 3px rgba(52, 190, 237, 0.2);
}

.sort-select-field {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  border: 2px solid var(--rim);
  background: var(--well);
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

/* 瀑布流容器 */
.transhub-masonry-wrap {
  max-width: 1180px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
}

.masonry-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--mute);
}

.waterfall-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (min-width: 880px) {
  .waterfall-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 560px) and (max-width: 879px) {
  .waterfall-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 559px) {
  .waterfall-columns {
    grid-template-columns: 1fr;
  }
  .search-box-wrap { max-width: 100%; margin-left: 0; }
}

/* 瀑布流单卡片 */
.hub-card {
  background: var(--panel);
  border: 2px solid var(--rim);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--rim-lo);
  overflow: hidden;
  transition: transform 0.15s var(--spring), box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--rim-lo);
  border-color: var(--dim);
}

/* 封面区 */
.hub-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--well);
  overflow: hidden;
  cursor: pointer;
}

.hub-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hub-card:hover .hub-card-img {
  transform: scale(1.05);
}

/* 平台标识角标 */
.hub-plat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.plat-3ds { background: var(--a); }
.plat-ns { background: linear-gradient(135deg, var(--x) 48%, var(--a) 52%); }
.plat-pc { background: var(--ink); }
.plat-other { background: var(--dim); }

/* 扫码直装角标 */
.hub-direct-qr-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(8, 19, 31, 0.85);
  backdrop-filter: blur(4px);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(52, 214, 232, 0.3);
}

/* 卡片主体 */
.hub-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-card-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hub-title-cn {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.hub-title-orig {
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 汉化进度 */
.hub-progress-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--well);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
}

.hub-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
}

.hub-status-text {
  padding: 1px 6px;
  border-radius: 4px;
}

.status-done {
  background: #d1fae5;
  color: #065f46;
}

.status-test {
  background: #fef3c7;
  color: #92400e;
}

.status-upd {
  background: #e0f2fe;
  color: #075985;
}

.hub-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.hub-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--y), #10b981);
}

.hub-progress-fill.partial {
  background: linear-gradient(90deg, var(--b), #f59e0b);
}

/* 标签行 */
.hub-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hub-tag-item {
  font-size: 11px;
  font-weight: 600;
  background: var(--well);
  border: 1px solid var(--line-soft);
  color: var(--mute);
  padding: 2px 7px;
  border-radius: 4px;
}

.hub-tag-author {
  color: var(--link);
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* 卡片简述：严格单行展示，高度严格统一 */
.hub-desc-snippet {
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.5;
  height: 1.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 6px 0 10px;
}

.hub-desc-snippet.hub-desc-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 12px;
}

/* 卡片操作按钮 */
.hub-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  margin-top: auto;
}

.hub-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  border: 2px solid var(--rim);
  background: var(--well);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--rim-lo);
  transition: all 0.08s var(--ease-out);
  flex: 1;
}

.hub-btn svg {
  width: 14px;
  height: 14px;
}

.hub-btn:hover {
  background: #ffffff;
  border-color: var(--dim);
}

.hub-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.hub-btn-primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: 0 2px 0 #000;
}

.hub-btn-primary:hover {
  background: #0d2031;
  color: #fff;
}

.hub-btn-qr {
  background: #e0f2fe;
  color: var(--cyan-ink);
  border-color: #7dd3fc;
  box-shadow: 0 2px 0 #bae6fd;
}

/* 模态弹窗系统 */
.hub-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 19, 31, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hub-modal-mask.open {
  display: flex;
}

.hub-modal-card {
  background: var(--panel);
  border: 3px solid var(--rim);
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2), 0 6px 0 var(--rim-lo);
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: popIn 0.2s var(--spring);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hub-modal-header {
  padding: 16px 22px;
  border-bottom: 2px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hub-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.hub-modal-close {
  background: var(--well);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 20px;
  color: var(--dim);
  cursor: pointer;
  padding: 2px 8px;
  line-height: 1;
}

.hub-modal-close:hover {
  background: var(--rim);
  color: var(--ink);
}

.hub-modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 3DS 扫码弹窗 */
.qr-3ds-frame {
  background: var(--well);
  border: 2px dashed var(--rim);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.qr-tip-box {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.6;
  max-width: 380px;
}

.qr-tip-box strong {
  color: var(--a);
}

/* 下载通道列表 */
.dl-channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--well);
  border: 1.5px solid var(--line-soft);
  border-radius: 10px;
  gap: 12px;
}

.dl-channel-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.dl-copy-click {
  cursor: pointer;
  color: var(--link);
  font-weight: 700;
}

.dl-copy-click:hover {
  text-decoration: underline;
}

/* 页脚 */
.transhub-footer {
  background: var(--panel);
  border-top: 2px solid var(--rim);
  padding: 30px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--mute);
  margin-top: auto;
}
