/* ============================================================
   CloudIsland 网盘 · 液态玻璃 (Liquid Glass) 设计系统
   ============================================================ */

:root {
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --glass-bg: rgba(255, 255, 255, .55);
  --glass-bg-strong: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-shadow: 0 18px 50px rgba(31, 38, 135, .12), 0 2px 6px rgba(31, 38, 135, .06);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(255, 255, 255, .35);

  --text: #1c1f2e;
  --text-muted: #6b7186;
  --text-soft: #9aa0b4;
  --accent: #4172fa;
  --accent-2: #648cff;
  --danger: #f56c6c;
  --ok: #34c759;

  --page-bg: #eef1f7;
  --field-bg: rgba(255, 255, 255, .6);

  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --blur: 26px;
}

body.theme-dark {
  --glass-bg: rgba(30, 32, 44, .55);
  --glass-bg-strong: rgba(38, 40, 54, .78);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(0, 0, 0, .25);

  --text: #f3f4f8;
  --text-muted: #a2a8bd;
  --text-soft: #7c8299;
  --page-bg: #0a0c13;
  --field-bg: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; }

/* ---------- 全局滚动条（Apple 细滚动条风格） ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(130, 140, 175, .35);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(130, 140, 175, .55); }
::-webkit-scrollbar-corner { background: transparent; }
html { scrollbar-width: thin; scrollbar-color: rgba(130, 140, 175, .35) transparent; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

/* ---------- 背景光斑 ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .5), transparent 60%);
}
body.theme-dark .bg-layer::after {
  background: radial-gradient(120% 90% at 50% 0%, rgba(90, 110, 200, .18), transparent 60%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .8;
  animation: float 22s ease-in-out infinite;
}
.blob-1 { width: 46vw; height: 46vw; left: -8vw; top: -10vh; background: linear-gradient(140deg, #7aa2ff, #b3c8ff); }
.blob-2 { width: 40vw; height: 40vw; right: -6vw; top: 12vh; background: linear-gradient(140deg, #ffb86b, #ff8fab); animation-delay: -6s; }
.blob-3 { width: 44vw; height: 44vw; left: 22vw; bottom: -18vh; background: linear-gradient(140deg, #67e8f9, #8b5cf6); animation-delay: -12s; }
body.theme-dark .blob { opacity: .42; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4vw, 3vh, 0) scale(1.08); }
  66% { transform: translate3d(-3vw, -4vh, 0) scale(.95); }
}

/* ---------- 液态玻璃基类 ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(var(--blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  border-radius: var(--radius-lg);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%);
  opacity: .6;
}
body.theme-dark .glass::before { opacity: .18; }
.glass > * { position: relative; }

/* ============================================================
   灵动岛 Dynamic Island
   ============================================================ */
.island {
  --i-w: 132px;
  --i-h: 38px;
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 9999;
  width: var(--i-w);
  height: var(--i-h);
  transform: translateX(-50%);
  border-radius: 22px;
  background: rgba(12, 14, 20, .88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38), inset 0 0 0 .5px rgba(255, 255, 255, .12);
  color: #fff;
  overflow: hidden;
  cursor: default;
  user-select: none;
  transition:
    width .58s var(--ease-ios),
    height .58s var(--ease-ios),
    border-radius .58s var(--ease-ios),
    background .35s ease;
}
.island.is-idle:hover { --i-w: 360px; }
.island.is-medium { --i-w: min(430px, 92vw); }
.island.is-large { --i-w: min(520px, 94vw); --i-h: 104px; }
.island.is-xl { --i-w: min(540px, 94vw); --i-h: 190px; border-radius: 30px; }
.island.is-error { background: rgba(120, 26, 26, .92); }
.island.is-success { background: rgba(16, 74, 42, .92); }

.island-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .28s ease .06s, transform .38s var(--ease-ios);
  pointer-events: none;
}
.island-layer.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }

/* 待机视图 */
.is-idle-view { justify-content: center; gap: 8px; }
.island-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(52, 199, 89, .9);
  animation: pulse 2.4s ease-in-out infinite;
  flex: none;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.is-idle-text { font-size: 12px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.is-idle-sub { font-size: 11.5px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 上传视图 */
.is-upload-view { gap: 12px; }
.is-upload-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: grid; place-items: center; font-size: 15px; flex: none;
}
.is-upload-main { flex: 1; min-width: 0; }
.is-upload-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-bar {
  margin-top: 6px;
  height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.is-bar > i {
  display: block; height: 100%; width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #648cff, #8ab4ff);
  transition: width .25s ease;
}
.is-upload-pct { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }

/* 队列视图（大幅展开） */
.is-queue-view { flex-direction: column; align-items: stretch; padding: 14px 16px; gap: 8px; }
.is-queue-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; }
.is-queue-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.is-queue-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(255, 255, 255, .82); }
.is-queue-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-queue-item .mini-bar { width: 84px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; flex: none; }
.is-queue-item .mini-bar > i { display: block; height: 100%; background: #8ab4ff; width: 0; }

/* 提示视图 */
.is-notice-view { gap: 10px; }
.is-notice-emoji { font-size: 16px; flex: none; }
.is-notice-text { font-size: 12px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 相机孔（右侧小圆点，模拟灵动岛摄像头） */
.island-cam {
  position: absolute;
  top: 0; bottom: 0; right: 12px;
  width: 10px; height: 10px; margin: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a2f3d, #05060a 70%);
  box-shadow: inset 0 0 2px rgba(255, 255, 255, .25);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.island.is-idle .island-cam { opacity: 1; }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 60;
  margin: 12px 16px 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-lg);
  min-height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand-badge {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(160deg, #7ea6ff, #4172fa);
  display: grid; place-items: center; color: #fff; font-size: 16px;
  box-shadow: 0 4px 10px rgba(65, 114, 250, .35), inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.brand-text small { display: block; font-weight: 500; font-size: 11px; color: var(--text-muted); }

.search {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}
.search input {
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--field-bg);
  padding: 0 34px 0 34px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: box-shadow .2s, background .2s;
}
.search input:focus { box-shadow: 0 0 0 3px rgba(65, 114, 250, .22); background: var(--glass-bg-strong); }
.search .icon { position: absolute; left: 11px; color: var(--text-soft); font-size: 13px; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ============================================================
   布局
   ============================================================ */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
}

.sidebar {
  padding: 14px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, .35); }
body.theme-dark .nav-item:hover { background: rgba(255, 255, 255, .07); }
.nav-item.active {
  background: linear-gradient(180deg, rgba(100, 140, 255, .22), rgba(65, 114, 250, .16));
  border-color: rgba(65, 114, 250, .3);
  color: var(--accent);
  font-weight: 600;
}
.nav-item .ico { width: 20px; text-align: center; }
.nav-tag { margin-left: auto; font-size: 11px; color: var(--text-muted); }

.storage-box { margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--field-bg); border: 1px solid var(--glass-border); }
.storage-box .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.storage-bar { height: 6px; border-radius: 3px; background: rgba(120, 130, 160, .22); overflow: hidden; margin-top: 8px; }
.storage-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #648cff, #4172fa); }

.content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.toolbar {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--field-bg);
  border: 1px solid var(--glass-border);
}
.segmented button {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: 9px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  transition: all .18s ease;
}
.segmented button.active {
  background: #fff; color: var(--accent);
  box-shadow: 0 2px 6px rgba(31, 38, 135, .14);
}
body.theme-dark .segmented button.active { background: rgba(255, 255, 255, .16); color: #9db8ff; }

.spacer { flex: 1; }

/* ============================================================
   文件网格
   ============================================================ */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.file-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .22s var(--ease-ios), box-shadow .22s ease;
}
.file-card:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 22px 46px rgba(31, 38, 135, .18), var(--glass-inset); }
.file-card.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.file-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  /* 透明图片显示玻璃底 + 浅棋盘格，不再出现黑底 */
  background:
    conic-gradient(rgba(130, 140, 175, .14) 25%, transparent 0 50%, rgba(130, 140, 175, .14) 0 75%, transparent 0) 0 0 / 18px 18px,
    linear-gradient(160deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .12));
  display: grid; place-items: center;
  overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-ext {
  font-size: 22px; font-weight: 700; letter-spacing: .5px;
  color: var(--accent); text-transform: uppercase;
}
.file-kind {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 600;
  background: rgba(20, 22, 30, .55);
  backdrop-filter: blur(8px);
  color: #fff;
}
.file-lock { position: absolute; right: 8px; top: 8px; font-size: 12px; opacity: .9; }
.file-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.file-name { font-size: 12.5px; font-weight: 600; line-height: 1.35; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-sub { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.file-actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.file-actions button { flex: 1; }

/* 列表视图 */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 14px;
  transition: background .18s;
}
.file-row:hover { background: rgba(255, 255, 255, .3); }
body.theme-dark .file-row:hover { background: rgba(255, 255, 255, .06); }
.file-row .thumb-mini { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(120,130,160,.15); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent); }
.file-row .grow { flex: 1; min-width: 0; }
.file-row .grow .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .grow .s { font-size: 11px; color: var(--text-muted); }

/* 空状态 */
.empty {
  padding: 60px 20px; text-align: center; color: var(--text-muted);
}
.empty .big { font-size: 48px; margin-bottom: 10px; }

/* ============================================================
   表单 / 弹窗
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea {
  height: 40px; padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--field-bg);
  color: var(--text);
  font-size: 13px; outline: none;
  font-family: inherit;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(65, 114, 250, .22); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(10, 12, 20, .35);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fade .22s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* 弹窗打开时锁定页面滚动，避免窗口滚动条贴着弹窗显示 */
body.modal-open { overflow: hidden; }
/* 预留滚动条空间，锁定/解锁时不产生位移抖动 */
html { scrollbar-gutter: stable; }

.modal {
  width: min(520px, 100%);
  max-height: 82vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px;
  border-radius: var(--radius-xl);
  animation: pop .32s var(--ease-ios);
  /* 隐藏滚动条：滚轮 / 触控板 / 触摸仍可正常滚动 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal::-webkit-scrollbar { width: 0; height: 0; display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 4px; font-size: 17px; }
.modal .muted { color: var(--text-muted); font-size: 12px; margin: 0 0 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }

.kv { list-style: none; margin: 12px 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--glass-border); font-size: 13px; }
.kv li span { color: var(--text-muted); }

pre.code {
  background: rgba(15, 18, 28, .9);
  color: #d7e2ff;
  padding: 12px 14px;
  border-radius: 14px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 8px 0 0;
}
pre.code .c { color: #7f8bb0; }

table.doc { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.doc th, table.doc td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--glass-border); vertical-align: top; }
table.doc th { color: var(--text-muted); font-weight: 600; }
table.doc code { background: rgba(120, 130, 170, .16); padding: 1px 6px; border-radius: 6px; font-size: 11.5px; }

/* 预览灯箱 */
.preview-body { display: grid; place-items: center; background: rgba(0, 0, 0, .25); border-radius: 18px; padding: 10px; }
.preview-body:has(img) {
  /* 预览透明图片时同样使用棋盘格透明底 */
  background:
    conic-gradient(rgba(130, 140, 175, .16) 25%, transparent 0 50%, rgba(130, 140, 175, .16) 0 75%, transparent 0) 0 0 / 20px 20px,
    var(--glass-bg);
}
.preview-body img, .preview-body video { max-width: 100%; max-height: 56vh; border-radius: 14px; }
.link-box { display: flex; gap: 8px; margin-top: 10px; }
.link-box input { flex: 1; }

/* 拖拽上传遮罩 */
.drop-overlay {
  position: fixed; inset: 0; z-index: 950;
  display: none;
  place-items: center;
  background: rgba(65, 114, 250, .12);
  backdrop-filter: blur(14px);
}
.drop-overlay.show { display: grid; }
.drop-inner {
  border: 2px dashed rgba(255, 255, 255, .8);
  border-radius: 30px;
  padding: 60px 80px;
  font-size: 18px; font-weight: 700; color: #fff;
  background: rgba(20, 24, 40, .35);
  text-align: center;
}

/* Toast（次要提示，主要提示走灵动岛） */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 950; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 14px; border-radius: 14px; font-size: 12.5px;
  animation: slideIn .3s var(--ease-ios);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* 分页 / 加载更多 */
.more-wrap { display: flex; justify-content: center; padding: 6px 0 20px; }

.alert { border-radius: 14px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 12px; }
.alert.error { background: rgba(245, 108, 108, .16); color: #c93b3b; border: 1px solid rgba(245, 108, 108, .35); }

/* 复选小方块 */
.tick {
  width: 18px; height: 18px; border-radius: 6px; flex: none;
  border: 1.5px solid rgba(120, 130, 165, .5);
  display: grid; place-items: center; font-size: 11px; color: transparent;
}
.file-card.selected .tick, .tick.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   安装页
   ============================================================ */
.install-wrap { position: relative; z-index: 2; display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.install-card { width: min(560px, 100%); padding: 34px; border-radius: var(--radius-xl); }
.install-logo { font-size: 40px; text-align: center; }
.install-card h1 { font-size: 22px; text-align: center; margin: 6px 0 4px; }
.install-card > p { text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.form-grid h3 { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.form-grid label.full, .form-grid .full { grid-column: 1 / -1; }
.form-grid label.checkbox { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form-grid input { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--field-bg); color: var(--text); }
.form-grid label.checkbox input { height: auto; }
.form-grid .actions { display: flex; justify-content: center; margin-top: 6px; }
.ok-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(52, 199, 89, .18); color: #1a8a3c; font-size: 12px; font-weight: 700; }
.install-done { text-align: center; margin-top: 14px; }

/* ============================================================
   按钮（Apple 风格）
   ============================================================ */
/* ===== 蓝色按钮 ===== */
.blue-btn{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:40px;padding:0 20px;min-width:80px;border:1px solid rgba(51,100,237,.35);color:#fff;font-size:12px;font-weight:500;border-radius:8px;background:linear-gradient(180deg,#648cff,#4172fa);box-shadow:0 3px 4px 0 rgba(44,71,146,.32),inset 0 -2px 0 0 #3262e6;text-decoration:none;transition:all .15s;user-select:none}
.blue-btn:hover{background:linear-gradient(180deg,#5a7fff,#3262e6);box-shadow:0 4px 8px 0 rgba(44,71,146,.4),inset 0 -2px 0 0 #2852c4;transform:scale(.97);color:#fff}
.blue-btn:active{transform:scale(.94)}

/* ===== 白色按钮 ===== */
.white-btn{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:40px;padding:0 20px;min-width:80px;background:linear-gradient(-180deg,#fff 8%,#f2f2f7 97%);border:1px solid #e9eaec;box-shadow:0 3px 4px 0 rgba(44,71,146,.20),inset 0 -2px 0 0 #e1e3e8;border-radius:8px;font-size:12px;font-weight:600;color:#3b426b;text-decoration:none;transition:all .15s;user-select:none}
.white-btn:hover{background:linear-gradient(-180deg,#f8f9fc 8%,#e8e9f0 97%);box-shadow:0 4px 8px 0 rgba(44,71,146,.25),inset 0 -2px 0 0 #d0d2d8;transform:scale(.97)}
.white-btn:active{transform:scale(.94)}

/* ===== 红色按钮 ===== */
.red-btn{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:40px;padding:0 20px;min-width:80px;border:1px solid rgba(245,108,108,.35);color:#fff;font-size:12px;font-weight:500;border-radius:8px;background:linear-gradient(180deg,#f78989,#f56c6c);box-shadow:0 3px 4px 0 rgba(180,40,40,.25),inset 0 -2px 0 0 #e05555;text-decoration:none;transition:all .15s;user-select:none}
.red-btn:hover{background:linear-gradient(180deg,#f07070,#e05555);transform:scale(.97);color:#fff}
.red-btn:active{transform:scale(.94)}

/* 小尺寸变体 */
.btn-sm { height: 30px; padding: 0 12px; min-width: 60px; font-size: 11.5px; border-radius: 7px; }
.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--glass-border); background: var(--field-bg);
  color: var(--text); font-size: 12px; font-weight: 600; transition: all .15s;
}
.ghost-btn:hover { background: var(--glass-bg-strong); transform: scale(.97); }

/* ---------- 局部滚动条微调 ---------- */
.is-queue-list::-webkit-scrollbar { width: 4px; }
.is-queue-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 4px; }
.is-queue-list { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }

pre.code::-webkit-scrollbar { height: 0; width: 0; display: none; }
pre.code { scrollbar-width: none; -ms-overflow-style: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; overflow: auto; }
  .sidebar .storage-box, .sidebar .nav-tag { display: none; }
  .nav-item { white-space: nowrap; }
  .topbar { margin: 10px 10px 0; }
  .brand-text { display: none; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .05s !important; }
}
