/* ==========================================================================
   Ay · 极客皮肤（geek skin）
   在 style.css / tools.css / admin.css 之后加载，只做覆盖：配色、字体、间距、
   边框与装饰。不改布局骨架，避免动到业务结构。
   ========================================================================== */

:root {
  /* 底色：偏冷的近黑，比纯黑更有“屏幕”感 */
  --bg: #04070a;
  --bg-soft: #060b10;
  --rail-bg: #05090d;
  --panel: rgba(8, 14, 20, 0.86);
  --panel-2: #0a1219;

  /* 细线统一带一点青绿，形成荧光边缘 */
  --line: rgba(94, 234, 196, 0.13);
  --line-2: rgba(94, 234, 196, 0.28);

  /* 文字对比度拉高：原来 faint 太暗，小字看不清 */
  --ink: #e8f5f0;
  --dim: #a9c0cd;
  --faint: #7d95a6;

  --mint: #2ef2a0;
  --mint-deep: #10b981;
  --cyan: #5ee7ff;
  --amber: #ffcb6b;
  --danger: #ff8b8b;

  --radius: 6px;

  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas,
    "Liberation Mono", "Courier New", monospace;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, sans-serif;
  /* 标题也用等宽：极客感的来源，中文自动回落到正文字体 */
  --font-display: var(--font-mono);
}

/* ---------------------------------------------------------------- 基础排版 */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* 背景：更细的网格 + 极淡扫描线，营造 CRT 质感 */
body::after {
  background-image:
    linear-gradient(to right, rgba(94, 234, 196, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(94, 234, 196, 0.05) 1px, transparent 1px),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.016) 0 1px,
      transparent 1px 3px
    );
  background-size: 48px 48px, 48px 48px, 100% 3px;
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 85%);
}

body::before {
  background:
    radial-gradient(42% 55% at 22% 4%, rgba(46, 242, 160, 0.1), transparent 70%),
    radial-gradient(40% 50% at 84% 0%, rgba(94, 231, 255, 0.07), transparent 72%);
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

a { color: var(--mint); }

::selection { background: rgba(46, 242, 160, 0.28); color: #02110b; }

/* 滚动条也换成终端风 */
* { scrollbar-color: rgba(94, 234, 196, 0.32) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 196, 0.28);
  border-radius: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(94, 234, 196, 0.5); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 侧栏 */
.rail {
  background: linear-gradient(180deg, rgba(5, 9, 13, 0.98), rgba(4, 7, 10, 0.9));
  border-right: 1px solid var(--line);
}

.rail-brand .mark {
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--mint);
  color: var(--mint);
  box-shadow: 0 0 18px rgba(46, 242, 160, 0.25), inset 0 0 12px rgba(46, 242, 160, 0.12);
}

.rail-name {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.12em;
}

.rail-name small {
  font-size: 9.5px;
  letter-spacing: 0.26em;
  color: var(--faint);
}

.rail-group {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.rail-group::before { content: "// "; color: rgba(94, 234, 196, 0.5); }

.rail-nav a {
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--dim);
}

.rail-nav a:hover {
  background: rgba(94, 234, 196, 0.06);
  border-color: var(--line);
  color: var(--ink);
}

.rail-nav a.active {
  background: rgba(46, 242, 160, 0.08);
  border-color: rgba(46, 242, 160, 0.35);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--mint);
}

.rail-nav a .ic {
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: 3px;
  background: rgba(94, 234, 196, 0.08);
  color: var(--mint);
}

.rail-foot { font-size: 11.5px; color: var(--faint); }

/* ---------------------------------------------------------------- 首页 */
.page-head h1 {
  font-size: 27px;
  letter-spacing: 0.02em;
}

.page-head h1::before {
  content: "> ";
  color: var(--mint);
  opacity: 0.9;
}

.page-head p { color: var(--dim); font-size: 13.5px; }

.cat-title {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.cat-title::before {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  transform: rotate(45deg);
}

.cat-title span {
  font-size: 11px;
  color: var(--faint);
  border-radius: 3px;
  border-color: var(--line-2);
  letter-spacing: 0.06em;
}

.tool-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 17, 24, 0.9), rgba(6, 11, 16, 0.9));
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  position: relative;
}

.tool-card:hover {
  border-color: rgba(46, 242, 160, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(46, 242, 160, 0.08), 0 10px 28px rgba(0, 0, 0, 0.55);
}

.tool-card .ti {
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--mint);
  background: rgba(46, 242, 160, 0.08);
  border: 1px solid rgba(46, 242, 160, 0.22);
}

.tool-card h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.tool-card p { font-size: 12.5px; color: var(--faint); line-height: 1.6; }

footer { font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------- 通用控件 */
.card,
.tui-panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
}

/* 面板四角小括号：极客标识 */
.card::before,
.tui-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--mint), var(--mint)) left top / 10px 1px no-repeat,
    linear-gradient(var(--mint), var(--mint)) left top / 1px 10px no-repeat,
    linear-gradient(var(--mint), var(--mint)) right top / 10px 1px no-repeat,
    linear-gradient(var(--mint), var(--mint)) right top / 1px 10px no-repeat,
    linear-gradient(var(--mint), var(--mint)) left bottom / 10px 1px no-repeat,
    linear-gradient(var(--mint), var(--mint)) left bottom / 1px 10px no-repeat,
    linear-gradient(var(--mint), var(--mint)) right bottom / 10px 1px no-repeat,
    linear-gradient(var(--mint), var(--mint)) right bottom / 1px 10px no-repeat;
  opacity: 0.5;
}

.tui-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.tui-label::before { content: "// "; color: rgba(46, 242, 160, 0.65); }

.tui-note-line,
.empty-hint { font-size: 12.5px; color: var(--faint); line-height: 1.65; }

.tui-note-line code,
.tui-note-line b { color: var(--dim); }

.tui-input,
.field input,
input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  border-radius: 4px !important;
  border: 1px solid var(--line-2) !important;
  background: #060c11 !important;
  color: var(--ink) !important;
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  letter-spacing: 0.02em;
}

input::placeholder, textarea::placeholder { color: #5d7386 !important; }

input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(46, 242, 160, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(46, 242, 160, 0.1);
}

.tui-btn,
button.primary,
.btn-primary,
.ghost {
  border-radius: 4px !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.06em;
  font-size: 12.5px !important;
}

button.primary,
.btn-primary,
.tui-btn.primary {
  background: var(--mint) !important;
  color: #02110b !important;
  border: 1px solid var(--mint) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 18px rgba(46, 242, 160, 0.22);
}

button.primary:hover,
.btn-primary:hover { box-shadow: 0 0 26px rgba(46, 242, 160, 0.38); }

.ghost,
.tui-btn:not(.primary) {
  background: transparent !important;
  border: 1px solid var(--line-2) !important;
  color: var(--dim) !important;
}

.ghost:hover,
.tui-btn:not(.primary):hover {
  color: var(--ink) !important;
  border-color: rgba(46, 242, 160, 0.45) !important;
}

/* ---------------------------------------------------------------- 表格 */
table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

table td { font-size: 13px; }

table tbody tr:hover { background: rgba(46, 242, 160, 0.04); }

.cell-main { font-size: 13.5px; color: var(--ink); }
.cell-sub,
.t,
.mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }

.ip, .code-val { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- 文件柜 */
.fv-chip {
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-2);
  color: var(--dim);
  background: transparent;
}

.fv-chip.on {
  background: rgba(46, 242, 160, 0.14);
  border-color: rgba(46, 242, 160, 0.55);
  color: var(--mint);
  box-shadow: inset 0 0 12px rgba(46, 242, 160, 0.12);
}

.fv-row {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(8, 14, 20, 0.7);
  transition: border-color 0.16s, background 0.16s;
}

.fv-row:hover { border-color: rgba(46, 242, 160, 0.32); background: rgba(46, 242, 160, 0.03); }

.fv-name { font-size: 13.5px; font-family: var(--font-body); }
.fv-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }

.fv-dl,
.fv-restore,
.fv-del,
.vcat-btn {
  border-radius: 3px !important;
  font-family: var(--font-mono) !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em;
}

.fv-dl { border-color: rgba(46, 242, 160, 0.35) !important; color: var(--mint) !important; }
.fv-dl:hover { background: rgba(46, 242, 160, 0.12) !important; }

.ftile { font-family: var(--font-mono) !important; border-radius: 4px !important; }

/* ---------------------------------------------------------------- 后台 */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(4, 7, 10, 0.92);
  backdrop-filter: blur(10px);
}

.brand-name, .brand-mark {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 1px 6px;
}

.tabs { border-bottom: 1px solid var(--line); }

.tab {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  padding: 11px 16px;
  border-radius: 0;
}

.tab.on {
  color: var(--mint);
  border-bottom-color: var(--mint);
  text-shadow: 0 0 14px rgba(46, 242, 160, 0.5);
}

.metric {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.metric .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.metric .v {
  font-family: var(--font-mono);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.card h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.card h3::before { content: "// "; color: rgba(46, 242, 160, 0.55); }

.filters select, .filters input { height: 34px; }

.pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  border-radius: 3px;
}

.bl-item {
  border-radius: 4px;
  border-color: var(--line);
  font-size: 12.5px;
}

.chip {
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.sect-title, .bl-head h3, .gate h1 { font-family: var(--font-mono); }

/* 登录页 */
.gate-card {
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(6, 11, 16, 0.96);
  box-shadow: 0 0 0 1px rgba(46, 242, 160, 0.06), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.gate-mark {
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  color: var(--mint);
}

.gate-card input { height: 40px; }

/* ---------------------------------------------------------------- 手机 */
@media (max-width: 980px) {
  body { font-size: 15px; }

  .rail {
    padding: 10px 12px 9px;
    background: rgba(4, 7, 10, 0.97);
  }

  .rail-brand .mark { width: 28px; height: 28px; }
  .rail-name { font-size: 15px; letter-spacing: 0.08em; }

  .rail-nav a {
    font-size: 13px;
    padding: 9px 12px;
    min-height: 38px;
  }

  .page-head h1 { font-size: 22px; }

  .tool-card { padding: 16px 16px; }
  .tool-card h3 { font-size: 15px; }
  .tool-card p { font-size: 12.5px; }

  .tui-label { font-size: 11px; }
  .tui-note-line, .empty-hint { font-size: 12.5px; }

  /* 触控目标 ≥44px */
  .tui-btn, .fv-dl, .fv-restore, .fv-del, .vcat-btn, .ghost {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px !important;
    padding: 0 14px;
  }

  .fv-chip { min-height: 36px; padding: 0 14px; }

  .fv-name { font-size: 14px; }
  .fv-meta { font-size: 12px; }

  .tab { font-size: 13px; padding: 12px 12px; }
  .metric .v { font-size: 22px; }
  .card h3 { font-size: 12.5px; }
  table th { font-size: 10.5px; }
  table td { font-size: 12.5px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .page-head { gap: 12px; }
  .fv-row { gap: 10px; }
}

/* ---------------------------------------------------------------- 极客细节 2 */
/* 标题后的闪烁光标 */
.page-head h1::after,
.gate-card h1::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 1.02em;
  margin-left: 8px;
  vertical-align: -0.12em;
  background: var(--mint);
  opacity: 0.85;
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  0%, 49% { opacity: 0.85; }
  50%, 100% { opacity: 0; }
}

/* 趋势图：加基线与更克制的柱子 */
.trend {
  position: relative;
  height: 120px;
  padding-bottom: 16px;
}

.trend::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.trend .col { max-width: 56px; }
.trend .bar {
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--mint), rgba(46, 242, 160, 0.14));
  box-shadow: 0 0 14px rgba(46, 242, 160, 0.25);
}
.trend .num { font-size: 10.5px; color: var(--dim); }
.trend .lbl { font-size: 10px; color: var(--faint); letter-spacing: 0.02em; }

/* 手机：分类条横向滑动，不再堆三行 */
@media (max-width: 640px) {
  .fv-cats {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .fv-cats::-webkit-scrollbar { height: 0; }
  .fv-chip { flex: 0 0 auto; }

  .tab { padding: 11px 10px; font-size: 12.5px; letter-spacing: 0.02em; }
  .metric .k { font-size: 10.5px; letter-spacing: 0.08em; }
  .trend { height: 96px; }
}

/* ---------------------------------------------------------------- 表单控件细节 */
/* 两根一排就够，四列挤在一起看不清 */
.tui-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

input[type="range"] {
  accent-color: var(--mint);
  height: 22px;
  background: transparent;
}

input[type="color"] {
  height: 38px !important;
  width: 100%;
  padding: 3px !important;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }

.tui-field .v,
.tui-field .val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--mint);
}

@media (max-width: 640px) {
  .tui-grid2 { grid-template-columns: 1fr !important; }
}

/* ---------------------------------------------------------------- 文件搜索 */
.fv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #060c11;
  padding: 0 10px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.fv-search:focus-within {
  border-color: rgba(46, 242, 160, 0.6);
  box-shadow: 0 0 0 3px rgba(46, 242, 160, 0.1);
}

.fv-search-ic {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--mint);
  opacity: 0.85;
  line-height: 1;
}

/* 输入框自身去掉边框，交给外层容器画框 */
.fv-search .fv-search-in,
.fv-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 42px;
  padding: 0 !important;
  font-family: var(--font-mono) !important;
}

.fv-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.fv-search-clear {
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: transparent;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  cursor: pointer;
}
.fv-search-clear:hover { color: var(--mint); border-color: rgba(46, 242, 160, 0.5); }
.fv-search-clear[hidden] { display: none; }

/* 命中高亮：荧光底色 + 深色字，比下划线更醒目 */
mark {
  background: rgba(46, 242, 160, 0.85);
  color: #02110b;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 700;
}

/* 后台文件卡片里的搜索行 */
.vfilter { margin-bottom: 12px; }
.vfilter input { flex: 1 1 auto; min-width: 0; }
.vfilter #vSearchClear { height: 34px; }

@media (max-width: 640px) {
  .fv-search { margin-top: 12px; }
  .fv-search .fv-search-in,
  .fv-search input { height: 40px; font-size: 14px !important; }
  .vfilter { flex-wrap: nowrap; }
  .vfilter input { width: 100%; }
}

/* 后台行内操作（下载 / 改名 / 删除）：桌面一行放下，窄屏自动换行 */
.vops { flex-wrap: nowrap; gap: 6px; }
.vops .vcat-btn { padding: 5px 10px; }
@media (max-width: 980px) {
  .vops { flex-wrap: wrap; }
}

/* 窄屏把文件表改成卡片：一行一个文件，名字在上，分类和操作在下 */
@media (max-width: 900px) {
  .ftable {
    display: block;
    table-layout: auto;
    min-width: 0 !important;
    width: 100%;
    border: 0;
  }
  .ftable thead { display: none; }
  .ftable tbody, .ftable tr, .ftable td { display: block; width: auto; }
  .ftable tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(8, 14, 20, 0.62);
    padding: 12px;
    margin: 0 0 10px;
  }
  .ftable tr:hover { background: rgba(46, 242, 160, 0.04); }
  .ftable td { padding: 4px 0; border: 0 !important; }
  .ftable td:nth-child(1) { display: flex; align-items: center; gap: 10px; }
  /* 大小和上传时间不删掉，收成名字下面一行小字 */
  .ftable td:nth-child(2),
  .ftable td:nth-child(3) {
    display: inline;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--faint);
  }
  .ftable td:nth-child(2)::after { content: " · "; }
  .ftable td:nth-child(4) { margin-top: 10px; }
  .ftable td:nth-child(5) { margin-top: 8px; }
  .ftable .cell-main { white-space: normal; word-break: break-all; }
  .ftable .vops { gap: 8px; }
  .ftable select.vcat-btn { max-width: none; width: 150px; }
  .ftable .vcat-btn { padding: 8px 12px; font-size: 12px !important; }
}

/* ---------------------------------------------------------------- 上传进度条 */
.upbar {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(46, 242, 160, 0.28);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(46, 242, 160, 0.06), rgba(6, 12, 16, 0.9));
}

.upbar[hidden] { display: none; }

.upbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.upbar-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.upbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.upbar-pct {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--mint);
  letter-spacing: 0.02em;
  min-width: 52px;
  text-align: right;
}

.upbar-cancel {
  border: 1px solid rgba(255, 139, 139, 0.4);
  border-radius: 3px;
  background: transparent;
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  cursor: pointer;
}
.upbar-cancel:hover { background: rgba(255, 139, 139, 0.12); }

.upbar-track {
  position: relative;
  height: 8px;
  border-radius: 2px;
  background: #061014;
  border: 1px solid var(--line);
  overflow: hidden;
}

.upbar-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(46, 242, 160, 0.55), var(--mint));
  box-shadow: 0 0 12px rgba(46, 242, 160, 0.55);
  transition: width 0.16s linear;
  position: relative;
}

/* 条内流动斜纹：看得出还在动，不是卡死 */
.upbar-track i::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.22) 0 6px,
    transparent 6px 12px
  );
  animation: upstripes 0.7s linear infinite;
}

@keyframes upstripes {
  to { background-position: 12px 0; }
}

.upbar.done .upbar-track i { animation: none; }
.upbar.done .upbar-track i::after { animation: none; opacity: 0.3; }
.upbar.done { border-color: rgba(46, 242, 160, 0.5); }

.upbar-meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
}

.upbar-meta .seg { display: inline-block; white-space: nowrap; }
.upbar-meta .dot { display: inline-block; margin: 0 6px; color: var(--line-2); }

@media (max-width: 640px) {
  .upbar { padding: 10px 11px; }
  .upbar-pct { font-size: 15px; min-width: 48px; }
  .upbar-name { font-size: 11.5px; }
  .upbar-cancel { padding: 5px 10px; }
}

/* ---------------------------------------------------------------- 转盘预设 */
.wheel-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.wheel-preset {
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: #060c11;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.wheel-preset:hover {
  color: var(--mint);
  border-color: rgba(46, 242, 160, 0.45);
  background: rgba(46, 242, 160, 0.06);
}

.wheel-preset:active { transform: translateY(1px); }

.wheel-undo {
  border: 0;
  border-bottom: 1px dashed rgba(94, 231, 255, 0.5);
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 0 2px 1px;
  cursor: pointer;
}

.wheel-undo:hover { color: #9df3ff; }

@media (max-width: 640px) {
  .wheel-preset { padding: 7px 12px; font-size: 12.5px; }
}

/* ---------------------------------------------------------------- 分段按钮（页签） */
.tui-seg button { white-space: nowrap; }

@media (max-width: 640px) {
  .tui-seg {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tui-seg::-webkit-scrollbar { display: none; }
  .tui-seg button { padding: 8px 10px; font-size: 12px; flex: 0 0 auto; }
}

/* ---------------------------------------------------------------- 今日推荐徽标 */
.eat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.eat-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mint);
  border: 1px solid rgba(46, 242, 160, 0.3);
  border-radius: 3px;
  padding: 3px 9px;
  white-space: nowrap;
}

.eat-badge.off {
  color: var(--faint);
  border-color: var(--line-2);
}

@media (max-width: 640px) {
  .eat-top { gap: 8px; }
  .eat-badge { font-size: 10.5px; padding: 3px 8px; }
}

/* IP 归属地：比 IP 小一号、暗一档，不抢注意力 */
.ip-loc {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--faint);
  letter-spacing: 0.2px;
}

.ip-cell .ip-loc { max-width: 240px; }

/* 登录验证码：输入框 + 图片并排，图片可点换 */
.cap-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}

.cap-row input {
  flex: 1 1 auto;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-family: var(--font-mono);
  font-size: 15px;
  text-align: center;
}

.cap-row img {
  width: 128px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #04090c;
  cursor: pointer;
  flex: 0 0 auto;
}

.cap-row img:hover { border-color: rgba(46, 242, 160, 0.55); }

/* ---------------------------------------------------------------- 顶部横幅导航（2026-11-06）
   原来左侧竖排 51 个工具，找东西要往下滚很久；改成顶部两行横幅：
   第一行分类、第二行当前分类的工具，两行各自横向滚动。
   这一块必须留在 geek.css 末尾：它靠“后加载 + 同优先级”覆盖 style.css 里的侧栏规则。 */
body { grid-template-columns: 1fr; }

.rail {
  position: sticky;
  top: 0;
  height: auto;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand cats foot"
    "brand tools foot";
  align-items: center;
  column-gap: 16px;
  row-gap: 5px;
  padding: 8px 22px 9px;
  overflow: visible;
  background: rgba(4, 7, 10, 0.97);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.rail-brand { grid-area: brand; padding: 0; }
.rail-nav { grid-area: cats; }
.rail-tools { grid-area: tools; }
.rail-foot { grid-area: foot; margin: 0; padding: 0; border-top: 0; }

.rail-nav,
.rail-tools {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 右侧渐隐是“还有内容”的提示；留 26px 内边距让渐隐盖在空白上而不是最后一个 chip 上 */
  padding-right: 26px;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
}

.rail-nav::-webkit-scrollbar,
.rail-tools::-webkit-scrollbar { height: 0; }

.rail-nav a,
.rail-tools a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dim);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rail-nav a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.rail-nav a b { font-weight: 400; font-size: 10px; color: var(--faint); }

.rail-nav a:hover,
.rail-tools a:hover { background: rgba(94, 234, 196, 0.06); border-color: var(--line); color: var(--ink); }

.rail-nav a.active {
  background: rgba(46, 242, 160, 0.1);
  border-color: rgba(46, 242, 160, 0.38);
  color: var(--ink);
  box-shadow: none;
}
.rail-nav a.active b { color: var(--mint); }

.rail-tools a.active {
  background: rgba(46, 242, 160, 0.13);
  border-color: rgba(46, 242, 160, 0.45);
  color: var(--ink);
}

.rail-tools a .ic {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-radius: 3px;
  background: rgba(94, 234, 196, 0.08);
  color: var(--mint);
}

.rail-tools::before {
  content: "//";
  flex: 0 0 auto;
  margin-right: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(94, 234, 196, 0.45);
}

.main { width: min(1180px, 100% - 48px); padding: 26px 0 64px; }

/* 横幅是 sticky 的，锚点滚动得让出它的高度，否则分组标题会被压住 */
#toolGrid .cat { scroll-margin-top: 104px; }

@media (max-width: 980px) {
  .rail {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand cats"
      "tools tools";
    column-gap: 10px;
    row-gap: 4px;
    padding: 7px 12px 8px;
  }

  .rail-name { display: none; }
  .rail-nav a,
  .rail-tools a { padding: 4px 9px; font-size: 12px; }
  .rail-tools a .ic { display: none; }

  .main { width: min(1000px, 100% - 24px); padding: 18px 0 48px; }
  #toolGrid .cat { scroll-margin-top: 92px; }
}

@media (max-width: 640px) {
  .rail-nav a b { display: none; }
}
