/* ════════════════════════════════════════════════
   云盘 SPA — style.css v3.0
   青绿主色 · 移动优先 · PC 侧栏
   ════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────── */
:root {
  --primary:        #0f766e;
  --primary-light:  #ccfbf1;
  --primary-lighter:#f0fdfa;
  --primary-dark:   #0d5f59;
  --primary-rgb:    15, 118, 110;
  --accent:         #14b8a6;
  --text:           #0f172a;
  --text-2:         #475569;
  --text-3:         #94a3b8;
  --text-4:         #cbd5e1;
  --border:         #e2e8f0;
  --border-2:       #cbd5e1;
  --bg:             #f1f5f9;
  --bg-card:        #ffffff;
  --nav-h:          64px;
  --header-h:       56px;
  --sidebar-w:      228px;
  --radius:         14px;
  --radius-sm:      10px;
  --shadow:         0 1px 3px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.04);
  --shadow-deep:    0 8px 28px rgba(15,23,42,.12);
  --gold:           #d97706;
  --gold-dark:      #b45309;
  --safe-b:         env(safe-area-inset-bottom, 0px);
  --font:           'Plus Jakarta Sans', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; outline: none; border: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── App Shell ─────────────────────────────────── */
#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* ── Splash ────────────────────────────────────── */
#splash {
  position: absolute; inset: 0; z-index: 999;
  background: linear-gradient(155deg, #0f766e 0%, #115e59 42%, #134e4a 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  overflow: hidden;
}
.splash-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.08);
  animation: orbFloat 8s ease-in-out infinite;
}
.splash-orb-a { width: 280px; height: 280px; top: -80px; right: -60px; }
.splash-orb-b { width: 220px; height: 220px; bottom: -70px; left: -50px; animation-delay: -3s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(12px,-16px) scale(1.05); }
}
.splash-mark {
  width: 88px; height: 88px; border-radius: 28px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  margin-bottom: 8px;
  animation: splashPop .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes splashPop {
  from { opacity: 0; transform: scale(.86) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
#splash .splash-icon { font-size: 2.6rem; line-height: 1; }
#splash .splash-title {
  font-size: 1.65rem; font-weight: 800; color: #fff; letter-spacing: -.02em;
  animation: splashPop .55s .08s cubic-bezier(.2,.8,.2,1) both;
}
#splash .splash-sub {
  font-size: .88rem; color: rgba(255,255,255,.72); font-weight: 500;
  animation: splashPop .55s .14s cubic-bezier(.2,.8,.2,1) both;
}
#splash .splash-ver {
  position: absolute; bottom: calc(20px + var(--safe-b));
  font-size: .72rem; color: rgba(255,255,255,.45); font-weight: 500;
}

/* ── Loading overlay ───────────────────────────── */
#global-loading {
  position: fixed; inset: 0; z-index: 990;
  background: rgba(248,250,252,.55);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.loading-spin {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────── */
.toast {
  position: fixed; top: max(20px, env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 9999; padding: 11px 18px;
  background: rgba(15,23,42,.92); color: #fff;
  border-radius: 999px; font-size: .85rem; font-weight: 500;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: all .25s;
  box-shadow: var(--shadow-deep);
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: rgba(13,148,136,.95); }
.toast.toast-error   { background: rgba(220,38,38,.95); }
.toast.toast-warn    { background: rgba(217,119,6,.95); }

/* ── Auth Page ─────────────────────────────────── */
#auth-page {
  position: absolute; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.auth-hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(45,212,191,.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(255,255,255,.12), transparent 50%),
    linear-gradient(155deg, #0f766e 0%, #0d9488 48%, #115e59 100%);
  padding: 52px 28px 48px;
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.auth-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth-hero::after {
  content: ''; position: absolute; bottom: -60px; left: -30px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-hero .hero-icon {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; position: relative; z-index: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.auth-hero .hero-title {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em;
  position: relative; z-index: 1;
}
.auth-hero .hero-sub {
  font-size: .86rem; opacity: .82; margin-top: 8px; font-weight: 500;
  position: relative; z-index: 1;
}
.auth-box {
  flex: 1; padding: 28px 24px 32px;
  background: #fff; border-radius: 24px 24px 0 0;
  margin-top: -22px;
  box-shadow: 0 -8px 32px rgba(15,23,42,.06);
  position: relative; z-index: 2;
}
.auth-tabs {
  display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px;
  gap: 4px;
}
.auth-tab  {
  flex: 1; padding: 12px; text-align: center;
  font-size: .92rem; color: var(--text-3); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s; font-weight: 600;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeUp .28s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.field-group { position: relative; margin-bottom: 16px; }
.field-group label {
  display: block; font-size: .78rem; color: var(--text-2);
  margin-bottom: 7px; font-weight: 600;
}
.field-group input {
  width: 100%; padding: 13px 16px;
  background: var(--bg); border-radius: 12px;
  font-size: .95rem; color: var(--text);
  border: 1.5px solid transparent; transition: all .2s;
}
.field-group input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12);
}
.field-group input::placeholder { color: var(--text-4); }
.btn-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff;
  border-radius: 12px; font-size: .98rem; font-weight: 700;
  margin-top: 8px;
  box-shadow: 0 8px 22px rgba(var(--primary-rgb),.28);
  transition: transform .15s, box-shadow .2s;
}
.btn-submit:hover { box-shadow: 0 10px 26px rgba(var(--primary-rgb),.34); }
.btn-submit:active { transform: scale(.98); box-shadow: 0 4px 14px rgba(var(--primary-rgb),.22); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 12px; color: var(--text-4); font-size: .75rem; font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border, #e2e8f0);
}
.btn-oauth {
  width: 100%; padding: 13px;
  background: #fff; color: var(--primary);
  border: 1.5px solid rgba(var(--primary-rgb), .35);
  border-radius: 12px; font-size: .95rem; font-weight: 700;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn-oauth:hover {
  background: rgba(var(--primary-rgb), .06);
  border-color: var(--primary);
}
.btn-oauth:active { transform: scale(.98); }
.auth-hint { text-align: center; font-size: .82rem; color: var(--text-3); margin-top: 18px; }
.auth-hint span { color: var(--primary); cursor: pointer; font-weight: 700; }

/* ── Main App ──────────────────────────────────── */
#main-app {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
#page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; height: 100%;
  overflow: hidden;
  background: var(--bg);
}
.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}
.page-body::-webkit-scrollbar { width: 0; height: 0; }
.page-body > .tab-page { min-height: 100%; }

/* ── Bottom Nav ────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; z-index: 80;
  box-shadow: 0 -4px 24px rgba(15,23,42,.04);
}
.nav-brand { display: none; }
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; position: relative;
  color: var(--text-3); transition: color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
  margin: 4px 2px;
}
.nav-item:active { background: var(--primary-lighter); }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { stroke-width: 2; }
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none;
                stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { font-size: .68rem; font-weight: 600; }
.nav-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  background: #ef4444; color: #fff;
  font-size: .6rem; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1; font-weight: 700;
}

/* ── Page Header ───────────────────────────────── */
.page-header {
  height: var(--header-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center;
  padding: 0 16px; gap: 8px;
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.page-header h1 {
  flex: 1; font-size: 1.08rem; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hdr-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.hdr-btn:hover { background: var(--bg); color: var(--primary); }
.hdr-btn:active { background: var(--primary-light); }
.hdr-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none;
               stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════ */
.home-search {
  margin: 14px 16px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.home-search:focus-within {
  border-color: rgba(var(--primary-rgb),.35);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}
.home-search svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none;
                   stroke-width: 1.8; flex-shrink: 0; }
.home-search input {
  flex: 1; font-size: .9rem; color: var(--text);
  background: transparent;
}
.home-search input::placeholder { color: var(--text-4); }

.home-categories {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; padding: 18px 16px 10px;
}
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
  transition: transform .15s;
}
.cat-item:active .cat-icon { transform: scale(.94); }
.cat-icon.c-photo  { background: #ffedd5; }
.cat-icon.c-video  { background: #e0e7ff; }
.cat-icon.c-music  { background: #fce7f3; }
.cat-icon.c-doc    { background: #dcfce7; }
.cat-icon.c-zip    { background: #fee2e2; }
.cat-item span { font-size: .72rem; color: var(--text-2); font-weight: 600; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.section-header .sh-title { font-size: .92rem; font-weight: 700; color: var(--text); }
.section-header .sh-more  { font-size: .8rem; color: var(--primary); cursor: pointer; font-weight: 600; }

.recent-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 0 16px 16px;
}
.recent-item {
  aspect-ratio: 1; background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; font-size: 1.8rem;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.recent-item:hover { border-color: rgba(var(--primary-rgb),.3); box-shadow: var(--shadow); }
.recent-item span.ri-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: .62rem; color: var(--text-2); font-weight: 500;
  background: rgba(255,255,255,.92);
  text-align: center; padding: 3px 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.empty-tip {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px; gap: 12px; color: var(--text-3);
}
.empty-tip .empty-icon {
  width: 84px; height: 84px;
  background: var(--primary-light);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.empty-tip p { font-size: .9rem; font-weight: 500; }

/* ══════════════════════════════════════════════════
   FILE PAGE
   ══════════════════════════════════════════════════ */
.breadcrumb {
  padding: 10px 16px;
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; white-space: nowrap;
  font-size: .8rem; color: var(--text-3);
  scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.bc-item { cursor: pointer; color: var(--text-3); flex-shrink: 0; }
.bc-item:last-child { color: var(--text); font-weight: 500; }
.bc-sep { flex-shrink: 0; }

.file-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px; gap: 8px;
}
.file-sort { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-3); cursor: pointer; }
.file-views { display: flex; gap: 6px; }
.view-btn { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.view-btn.active { color: var(--primary); background: var(--primary-light); }
.view-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.file-list  { padding: 0 16px; }
.file-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px; }

.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
}
.file-item:last-child { border-bottom: none; }
.file-item:active { background: var(--bg); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius-sm); }

.file-item.selected .file-icon-wrap::before {
  content: '✓';
  position: absolute; top:0;right:0;bottom:0;left:0;inset: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: .9rem; font-weight: 700;
  z-index: 1;
}
.file-icon-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.file-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
/* file type colors */
.fi-folder { background: #fff8e1; }
.fi-image  { background: #fce4ec; }
.fi-video  { background: #e8eaf6; }
.fi-audio  { background: #f3e5f5; }
.fi-doc    { background: #e8f5e9; }
.fi-pdf    { background: #fff3e0; }
.fi-zip    { background: #fce8e4; }
.fi-other  { background: var(--bg); }

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: .9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.file-more { padding: 6px; color: var(--text-4); flex-shrink: 0; }
.file-more svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Grid mode */
.file-grid-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.file-grid-item .file-icon { width: 40px; height: 40px; }
.file-grid-item .file-name { font-size: .72rem; text-align: center; color: var(--text); width: 100%;
                              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FAB upload */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); right: 20px;
  width: 54px; height: 54px;
  background: linear-gradient(145deg, #14b8a6, #0f766e); color: #fff;
  border-radius: 18px; box-shadow: 0 10px 28px rgba(var(--primary-rgb),.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; z-index: 65; cursor: pointer;
  transition: transform .15s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(var(--primary-rgb),.4); }
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }

/* Batch bar */
.batch-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); background: var(--primary);
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
  z-index: 70; transform: translateY(-100%); transition: transform .25s;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.25);
}
.batch-bar.active { transform: translateY(0); }
.batch-bar .bb-cancel { color: #fff; font-size: .88rem; cursor: pointer; font-weight: 600; }
.batch-bar .bb-info   { flex: 1; color: #fff; font-size: .88rem; text-align: center; font-weight: 600; }
.batch-bar .bb-actions { display: flex; gap: 8px; }
.batch-bar .bb-btn {
  color: #fff; font-size: .82rem; cursor: pointer; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1);
}

/* Upload drop zone */
.upload-drop-zone {
  position: fixed; top:0;right:0;bottom:0;left:0;inset: 0; z-index: 200;
  background: rgba(22, 119, 255, .12);
  border: 3px dashed var(--primary);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  font-size: 1.1rem; color: var(--primary);
  pointer-events: none;
}
.upload-drop-zone.active { display: flex; }

/* Upload progress item */
.upload-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.up-icon { font-size: 1.4rem; flex-shrink: 0; }
.up-info { flex: 1; min-width: 0; }
.up-name { font-size: .85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar  { height: 4px; background: var(--bg); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.up-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .2s; }
.up-pct  { font-size: .72rem; color: var(--text-3); flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   TRANSFER PAGE (Screenshot 2)
   ══════════════════════════════════════════════════ */
.transfer-tabs {
  display: flex; background: #fff;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.transfer-tabs::-webkit-scrollbar { display: none; }
.tt-item {
  flex-shrink: 0; padding: 13px 18px;
  font-size: .88rem; color: var(--text-3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .2s; white-space: nowrap;
}
.tt-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.transfer-banner {
  margin: 12px 16px;
  background: var(--primary-lighter);
  border-radius: var(--radius); padding: 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.tb-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.tb-text .tb-title { font-size: .9rem; font-weight: 600; color: var(--primary); }
.tb-text .tb-sub   { font-size: .75rem; color: var(--text-3); margin-top: 2px; }

.concurrent-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .82rem; color: var(--text-2);
}
.concurrent-row .cr-num {
  color: var(--primary); font-weight: 600;
}
.concurrent-row select {
  border: 1px solid var(--border-2); border-radius: 6px;
  padding: 3px 6px; font-size: .82rem; color: var(--primary);
  background: #fff;
}

.status-tabs {
  display: flex; gap: 8px; padding: 8px 16px 4px;
}
.st-item {
  padding: 5px 14px; border-radius: 16px;
  font-size: .8rem; cursor: pointer;
  border: 1px solid var(--border-2); color: var(--text-2);
  transition: all .2s;
}
.st-item.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

.transfer-list { padding: 8px 16px; }
.transfer-task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.transfer-task:last-child { border-bottom: none; }
.tt-file-icon { font-size: 1.8rem; flex-shrink: 0; }
.tt-file-info { flex: 1; min-width: 0; }
.tt-file-name { font-size: .88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-file-meta { font-size: .72rem; color: var(--text-3); margin-top: 2px; }
.tt-prog { height: 3px; background: var(--bg); border-radius: 2px; margin-top: 5px; }
.tt-prog-fill { height: 100%; border-radius: 2px; }
.tt-prog-fill.done { background: #52c41a; }
.tt-prog-fill.running { background: var(--primary); }
.tt-prog-fill.failed { background: #ff4d4f; }
.tt-status { flex-shrink: 0; }
.tt-status-badge { font-size: .72rem; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.tt-status-badge.done    { background: #f6ffed; color: #52c41a; }
.tt-status-badge.running { background: var(--primary-light); color: var(--primary); }
.tt-status-badge.failed  { background: #fff1f0; color: #ff4d4f; }

.transfer-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px; gap: 16px;
}
.te-circle {
  width: 100px; height: 100px; background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.te-circle svg { width: 48px; height: 48px; stroke: var(--primary); fill: none; stroke-width: 1.5; }
.transfer-empty p { font-size: .88rem; color: var(--text-3); }

/* ══════════════════════════════════════════════════
   INFO / CHAT PAGE (Screenshot 1)
   ══════════════════════════════════════════════════ */
.info-section-label {
  padding: 14px 16px 6px;
  font-size: .78rem; color: var(--text-3); font-weight: 500;
}
.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  transition: background .15s; position: relative;
}
.conv-item:active { background: var(--bg); }
.conv-item::after {
  content: ''; position: absolute; left: 72px; right: 0; bottom: 0;
  height: 1px; background: var(--border);
}
.conv-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #a8c8f0 0%, #5a9fd4 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; font-weight: 600;
  position: relative; overflow: hidden;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-avatar.deleted {
  background: var(--primary-light); color: var(--primary);
  font-size: .9rem; font-weight: 700;
}
.conv-body { flex: 1; min-width: 0; }
.conv-row1 { display: flex; align-items: center; justify-content: space-between; }
.conv-name { font-size: .9rem; font-weight: 500; color: var(--text); }
.conv-time { font-size: .72rem; color: var(--text-3); }
.conv-preview {
  font-size: .78rem; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unread-dot {
  width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0;
}
.unread-count {
  background: #ff4d4f; color: #fff;
  font-size: .65rem; min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

.info-add-btn {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 20px;
  width: 48px; height: 48px;
  background: var(--primary); color: #fff; border-radius: 50%;
  box-shadow: var(--shadow-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; z-index: 65; cursor: pointer;
}

/* ══════════════════════════════════════════════════
   MINE PAGE (Screenshot 3)
   ══════════════════════════════════════════════════ */
.mine-page { background: var(--bg); }
.mine-profile {
  background: #fff; padding: 20px 16px 16px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.mine-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #d0e8ff 0%, #a8c8f0 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; overflow: hidden; cursor: pointer;
}
.mine-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-info-block { flex: 1; min-width: 0; }
.mine-nickname {
  font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.vip-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 10px; font-size: .68rem; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
}
.vip-badge.svip {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #4a2800; box-shadow: 0 2px 6px rgba(255,140,0,.35);
}
.vip-badge.vip {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff; box-shadow: 0 2px 6px rgba(37,99,235,.3);
}
.mine-vip-link {
  font-size: .78rem; color: var(--primary); display: flex; align-items: center; gap: 2px; cursor: pointer; margin-bottom: 3px;
}
.mine-vip-link.is-svip {
  color: #d97706; font-weight: 600;
}
.mine-email    { font-size: .75rem; color: var(--text-3); }
.mine-actions  { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.mine-checkin-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: 1px solid var(--primary);
  border-radius: 16px; font-size: .78rem; color: var(--primary); cursor: pointer;
}
.mine-checkin-btn.done {
  border-color: var(--border-2); color: var(--text-3);
  cursor: not-allowed;
}
.mine-qr-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; font-size: 1rem;
}
.mine-qr-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* VIP Banner */
.vip-banner {
  margin: 0 16px 12px;
  background: linear-gradient(110deg, #2d1b00 0%, #5c3d00 40%, #8b5e00 70%, #c4820a 100%);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.vb-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffdd82, #f5a623);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.vb-text { flex: 1; }
.vb-title { font-size: .9rem; font-weight: 700; color: #ffd96a; }
.vb-sub   { font-size: .72rem; color: rgba(255,210,100,.65); margin-top: 2px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-btn   {
  flex-shrink: 0; padding: 7px 14px;
  background: linear-gradient(135deg, #ffd96a, #f5a623);
  color: #5c3000; font-size: .8rem; font-weight: 700;
  border-radius: 16px; white-space: nowrap;
}

/* Storage section */
.mine-storage {
  background: #fff; margin: 0 0 8px;
  padding: 14px 16px;
}
.ms-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.ms-title {
  display: flex; align-items: center; gap: 6px;
  font-size: .88rem; font-weight: 600; color: var(--text);
}
.ms-title svg { width: 16px; height: 16px; stroke: var(--primary); fill: none; stroke-width: 1.8; }
.ms-total  { font-size: .78rem; color: var(--text-3); }
.ms-bar    { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-bottom: 8px; display: flex; }
.ms-seg    { height: 100%; border-radius: 0; transition: width .5s; }
.ms-seg:first-child { border-radius: 4px 0 0 4px; }
.ms-seg:last-child  { border-radius: 0 4px 4px 0; }
.ms-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.ms-leg-item { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--text-3); }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Quick action grid */
.mine-quick {
  background: #fff; padding: 14px 0 12px;
  margin-bottom: 8px;
}
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 4px 4px 4px; cursor: pointer;
}
.quick-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: transform .15s;
}
.quick-icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.6; }
.quick-item:active .quick-icon { transform: scale(.9); }
.quick-label { font-size: .7rem; color: var(--text-2); }

/* Settings menu list */
.mine-settings { background: #fff; }
.setting-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; cursor: pointer; position: relative;
}
.setting-item:not(:last-child)::after {
  content: ''; position: absolute; left: 58px; right: 0; bottom: 0;
  height: 1px; background: var(--border);
}
.setting-item:active { background: var(--bg); }
.si-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem;
}
.si-icon svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 1.8; }
.si-text { flex: 1; }
.si-title { font-size: .88rem; color: var(--text); font-weight: 500; }
.si-sub   { font-size: .72rem; color: var(--text-3); margin-top: 1px; }
.si-arrow { color: var(--text-4); flex-shrink: 0; font-size: .8rem; }
.si-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ══════════════════════════════════════════════════
   OVERLAY / SUB-PAGES
   ══════════════════════════════════════════════════ */
.page-overlay {
  position: fixed; top:0;right:0;bottom:0;left:0;inset: 0; z-index: 150;
  background: var(--bg-card);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.page-overlay.open { transform: translateX(0); }
.ov-header {
  height: var(--header-h); background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.ov-back {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; color: var(--text-2);
}
.ov-back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.ov-title { flex: 1; font-size: 1rem; font-weight: 700; color: var(--text); }
.ov-body  { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
.ov-body::-webkit-scrollbar { display: none; }

/* ── Recycle bin ── */
.trash-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.trash-item .ti-del { font-size: .72rem; color: #ff4d4f; }

/* ── My shares ── */
.share-item {
  background: #fff; margin: 8px 16px;
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.share-item .share-name { font-size: .9rem; font-weight: 500; color: var(--text); margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-item .share-meta { font-size: .75rem; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; }
.share-item .share-url  { font-size: .78rem; color: var(--primary); word-break: break-all; margin: 6px 0; }
.share-actions { display: flex; gap: 8px; margin-top: 10px; }
.sh-btn {
  padding: 5px 12px; border-radius: 6px; font-size: .78rem; cursor: pointer; border: 1px solid var(--border-2);
}
.sh-btn.copy   { color: var(--primary); border-color: var(--primary-light); background: var(--primary-light); }
.sh-btn.cancel { color: #ff4d4f; border-color: #ffccc7; background: #fff1f0; }
.sh-pw { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: #fa8c16;
         background: #fffbe6; padding: 2px 8px; border-radius: 10px; }

/* ── Settings overlay ── */
.settings-group { background: #fff; margin-bottom: 8px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-size: .88rem; color: var(--text); cursor: pointer; }
.settings-item .sv { font-size: .82rem; color: var(--text-3); }
.settings-item input[type=text], .settings-item input[type=email], .settings-item input[type=password] {
  background: transparent; font-size: .88rem; color: var(--text); text-align: right;
  flex: 1; min-width: 0; margin-left: 10px;
}
.settings-item input::placeholder { color: var(--text-4); }
.toggle-switch {
  width: 42px; height: 24px; background: var(--border-2); border-radius: 12px;
  position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.toggle-switch.on { background: var(--primary); }
.toggle-switch::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; top: 3px; left: 3px;
  background: #fff; border-radius: 50%; transition: left .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-switch.on::after { left: 21px; }

/* ── Notification item ── */
.notice-item {
  display: flex; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.notice-item.unread { background: var(--primary-lighter); }
.ni-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.ni-body { flex: 1; min-width: 0; }
.ni-title { font-size: .88rem; font-weight: 500; color: var(--text); }
.ni-content { font-size: .78rem; color: var(--text-3); margin-top: 3px; }
.ni-time { font-size: .72rem; color: var(--text-4); margin-top: 4px; }

/* ── Order/VIP ── */
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.vip-plan {
  border: 1.5px solid var(--border-2); border-radius: var(--radius);
  padding: 16px 10px; text-align: center; cursor: pointer; transition: all .2s;
}
.vip-plan.recommend { border-color: var(--primary); background: var(--primary-lighter); }
.vip-plan .vp-name  { font-size: .78rem; color: var(--text-3); margin-bottom: 8px; }
.vip-plan .vp-price { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.vip-plan .vp-price span { font-size: .72rem; font-weight: 400; color: var(--text-3); }
.vip-plan .vp-tag   { font-size: .68rem; color: #ff4d4f; margin-top: 4px; }
.vip-plan.recommend .vp-price { color: var(--primary); }
.vip-benefits { padding: 0 16px; }
.vip-benefit-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.vb-check { width: 18px; height: 18px; background: var(--primary-light); border-radius: 50%;
            display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: .7rem; }
.vb-name { font-size: .85rem; color: var(--text); }

/* ── Privacy space ── */
.privacy-lock {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px; gap: 16px; text-align: center;
}
.privacy-lock .lock-icon { font-size: 3.5rem; }
.privacy-lock h3 { font-size: 1rem; font-weight: 600; color: var(--text); }
.privacy-lock p  { font-size: .82rem; color: var(--text-3); }
.pin-row { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border-2); background: transparent;
  transition: background .2s;
}
.pin-dot.filled { background: var(--primary); border-color: var(--primary); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 260px; margin: 8px auto 0; }
.pin-key {
  padding: 15px; text-align: center; font-size: 1.1rem; font-weight: 500;
  background: var(--bg); border-radius: var(--radius-sm); cursor: pointer;
  transition: background .15s; -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: var(--primary-light); }

/* ── File cleanup ── */
.cleanup-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff; margin-bottom: 1px;
}
.cu-icon  { font-size: 1.8rem; flex-shrink: 0; }
.cu-info  { flex: 1; }
.cu-title { font-size: .9rem; font-weight: 500; color: var(--text); }
.cu-sub   { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.cu-size  { font-size: .82rem; color: var(--primary); font-weight: 600; margin-top: 2px; }
.cu-btn   { padding: 7px 14px; border: 1px solid var(--border-2); border-radius: 16px; font-size: .8rem; color: var(--text-2); cursor: pointer; }
.cu-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── FTP Settings ── */
.ftp-form  { padding: 16px; }
.ftp-field { margin-bottom: 14px; }
.ftp-field label { display: block; font-size: .78rem; color: var(--text-3); margin-bottom: 5px; }
.ftp-field input {
  width: 100%; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-size: .88rem; color: var(--text); transition: border-color .2s;
}
.ftp-field input:focus { border-color: var(--primary); background: #fff; }
.ftp-save-btn {
  width: 100%; padding: 13px;
  background: var(--primary); color: #fff; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s;
}
.ftp-save-btn:active { background: var(--primary-dark); }

/* ── Chat Overlay ── */
.chat-overlay {
  position: fixed; top:0;right:0;bottom:0;left:0;inset: 0; z-index: 200;
  background: #f7f8fc;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.chat-overlay.open { transform: translateY(0); }
.chat-header {
  height: var(--header-h); background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-header .chat-name { flex: 1; font-size: .95rem; font-weight: 600; color: var(--text); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.chat-messages::-webkit-scrollbar { display: none; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.mine  { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light);
              display: flex; align-items: center; justify-content: center; font-size: .85rem;
              color: var(--primary); font-weight: 600; flex-shrink: 0; }
.msg-bubble {
  max-width: 70%; padding: 10px 13px;
  border-radius: 16px 16px 16px 4px;
  background: #fff; font-size: .88rem; line-height: 1.5; color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.06); word-break: break-word;
}
.msg-row.mine .msg-bubble {
  background: var(--primary); color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.msg-file-bubble {
  display: flex; align-items: center; gap: 10px;
  background: #fff; padding: 10px 12px;
  border-radius: 12px; max-width: 220px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); cursor: pointer;
}
.msg-file-icon { font-size: 1.5rem; flex-shrink: 0; }
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name { font-size: .82rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file-size { font-size: .72rem; color: var(--text-3); }
.msg-time { font-size: .68rem; color: var(--text-4); flex-shrink: 0; align-self: flex-end; margin-bottom: 4px; }
.chat-input-bar {
  background: #fff; border-top: 1px solid var(--border);
  padding: 10px 16px; display: flex; align-items: flex-end; gap: 10px;
  flex-shrink: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}
.chat-input {
  flex: 1; background: var(--bg); border-radius: 20px; padding: 9px 14px;
  font-size: .88rem; color: var(--text); min-height: 38px; max-height: 100px;
  overflow-y: auto; resize: none; line-height: 1.4;
}
.chat-send-btn {
  width: 36px; height: 36px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.chat-send-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.chat-attach-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  color: var(--text-3);
}
.chat-attach-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ══════════════════════════════════════════════════
   ACTION SHEET / MODAL
   ══════════════════════════════════════════════════ */
.mask {
  position: fixed; top:0;right:0;bottom:0;left:0;inset: 0; background: rgba(0,0,0,.45); z-index: 300;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.mask.center-modal { justify-content: center; align-items: center; }
.mask.hidden { display: none; }
.action-sheet {
  background: #fff; border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.as-title {
  text-align: center; padding: 14px 16px 10px;
  font-size: .82rem; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.as-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: .9rem; color: var(--text); transition: background .15s;
}
.as-item:active { background: var(--bg); }
.as-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.as-item.danger { color: #ff4d4f; }
.as-cancel {
  padding: 14px; text-align: center; font-size: .9rem; color: var(--text-2);
  cursor: pointer; background: #fff; border-top: 6px solid var(--bg);
}

/* Center modal (dialog) */
.center-dialog {
  background: #fff; border-radius: 16px;
  width: calc(100% - 64px); max-width: 320px;
  overflow: hidden;
}
.cd-head { padding: 18px 20px 8px; text-align: center; }
.cd-head h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.cd-body { padding: 8px 20px 16px; font-size: .88rem; color: var(--text-2); text-align: center; line-height: 1.6; }
.cd-input {
  width: 100%; margin: 4px 0 8px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text); border: 1.5px solid transparent; transition: border-color .2s;
}
.cd-input:focus { border-color: var(--primary); }
.cd-btns { display: flex; border-top: 1px solid var(--border); }
.cd-btn {
  flex: 1; padding: 13px; text-align: center;
  font-size: .9rem; cursor: pointer; transition: background .15s;
}
.cd-btn:not(:last-child) { border-right: 1px solid var(--border); }
.cd-btn:active { background: var(--bg); }
.cd-btn.primary { color: var(--primary); font-weight: 600; }
.cd-btn.danger  { color: #ff4d4f; }

/* ══════════════════════════════════════════════════
   SEARCH RESULTS / Misc
   ══════════════════════════════════════════════════ */
.search-results-page {
  position: fixed; top:0;right:0;bottom:0;left:0;inset: 0; z-index: 160; background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(-100%); transition: transform .25s;
}
.search-results-page.open { transform: translateY(0); }
.sr-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: #fff;
}
.sr-input {
  flex: 1; background: var(--bg); border-radius: 20px;
  padding: 9px 14px; font-size: .88rem; color: var(--text);
}
.sr-cancel { font-size: .88rem; color: var(--primary); cursor: pointer; flex-shrink: 0; }
.sr-body   { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ── User search ── */
.user-search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.user-search-item:active { background: var(--bg); }
.usa-avatar { width: 40px; height: 40px; border-radius: 50%;
              background: var(--primary-light); display: flex; align-items: center; justify-content: center;
              color: var(--primary); font-weight: 600; font-size: .95rem; }
.usa-name { flex: 1; font-size: .9rem; color: var(--text); }
.usa-btn  { padding: 5px 14px; background: var(--primary-light); color: var(--primary);
            border-radius: 14px; font-size: .78rem; cursor: pointer; }
.usa-btn.added { background: var(--bg); color: var(--text-3); }

/* ── Section separator ── */
.section-sep { height: 8px; background: var(--bg); }

/* ── Pull to refresh (visual) ── */
.ptr-text {
  text-align: center; padding: 10px;
  font-size: .78rem; color: var(--text-4); display: none;
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.fade-in  { animation: fadeIn  .3s ease; }
.slide-up { animation: slideUp .3s ease; }

/* ── Safe area on iPhones ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
}

/* ── Image thumbnails ── */
.file-thumb {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block;
}
.file-thumb.thumb-grid {
  width: 100%; height: 64px; border-radius: var(--radius-sm);
}

/* ── Media viewer overlay ── */
/* ══════════════════════════════════════════════════
   MEDIA VIEWER & VIDEO PLAYER (v2.9.1 最终修复版：图片/视频预览与关闭)
   ══════════════════════════════════════════════════ */
.media-viewer {
  position: fixed; top:0;right:0;bottom:0;left:0; z-index: 9999;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .2s ease-out;
  background: rgba(0,0,0,.96);
  touch-action: manipulation; user-select: none;
}
.media-viewer.show { opacity: 1; }
.mv-backdrop {
  position: absolute; top:0;right:0;bottom:0;left:0; z-index: 1;
  background: rgba(0,0,0,.96);
}

/* 顶部状态栏 - 图片/视频都永久可见 */
.mv-bar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 100%);
  opacity: 1 !important; pointer-events: auto !important;
}
.mv-title {
  font-size: .92rem; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-right: 12px; color: #fff;
}
.mv-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 右上角悬浮关闭按钮 - 图片预览时专用 */
.mv-float-close {
  position: absolute; top: max(14px, env(safe-area-inset-top));
  right: 14px; z-index: 30;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; cursor: pointer; user-select: none;
  border: 2px solid rgba(255,255,255,.45);
  box-shadow: 0 3px 14px rgba(0,0,0,.45);
}
.mv-float-close:active { background: rgba(255,255,255,.5); transform: scale(.92); }

/* 通用关闭/功能按钮 */
.mv-icon-btn, .mv-close {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; cursor: pointer; user-select: none;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.mv-icon-btn:active, .mv-close:active { transform: scale(.92); background: rgba(255,255,255,.5); }

.mv-content {
  position: relative; z-index: 5; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 12px 20px;
  overflow: hidden;
}
.mv-content video { max-width: 100%; max-height: 100%; border-radius: 8px; background:#000; }
.mv-content img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.5);
  cursor: pointer;
}

/* 视频状态下的特殊样式 */
.media-viewer.video-mode .mv-bar { z-index: 12; }
.media-viewer.video-mode.hide-ctrl .mv-bar { opacity: 0 !important; pointer-events: none !important; }
.media-viewer.video-mode.hide-ctrl .mv-float-close { display: none; }

/* ── Audio mini player ── */
.audio-player {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + 10px);
  z-index: 200;
  background: #fff; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  transform: translateY(20px); opacity: 0; transition: all .25s;
  border: 1px solid #eef0f5;
}
.audio-player.show { transform: translateY(0); opacity: 1; }
.ap-icon { font-size: 1.3rem; flex-shrink: 0; }
.ap-info { flex: 1; min-width: 0; }
.ap-title {
  font-size: .85rem; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-play, .ap-close {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; font-size: 1rem;
}
.ap-play { background: var(--primary); color: #fff; }
.ap-close { color: var(--text-3); }

/* ── Magnet / media links ── */
.mag-input-wrap { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.mag-input {
  width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0;
  border-radius: 8px; font-size: .88rem; background: #fff;
}
.mag-input:focus { border-color: var(--primary); outline: none; }
.mag-add-btn {
  padding: 11px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.mag-list { padding: 0 12px 16px; }
.mag-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: #f8f9ff;
  margin-bottom: 8px;
}
.mag-icon { font-size: 1.4rem; flex-shrink: 0; }
.mag-info { flex: 1; min-width: 0; }
.mag-title {
  font-size: .85rem; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mag-url {
  font-size: .7rem; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.mag-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.mag-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .85rem; user-select: none;
  transition: transform .1s, opacity .15s;
}
.mag-btn:active { transform: scale(.9); }
.mag-btn.play  { background: var(--primary); color: #fff; }
.mag-btn.drive { background: #e0f2fe; color: #0284c7; }
.mag-btn.open  { background: #fef3c7; color: #d97706; }
.mag-btn.copy  { background: #f3f4f6; color: #4b5563; }
.mag-btn.del   { background: #fff0f0; color: #e03131; }

/* ══════════════════════════════════════════════════
   v2.8 追加：视频播放器 / 磁力搜索 / 缩略图
   ══════════════════════════════════════════════════ */
/* ── 视频播放器控制条透明度由视频控制器动态切换 ── */
.media-viewer.video-mode .mv-bar {
  opacity: 1; pointer-events: auto;
}
.media-viewer.video-mode.hide-ctrl .mv-bar {
  opacity: 0; pointer-events: none;
}

/* ── 视频播放器 ── */
.vp-stage {
  position: relative; width: 100%; height: 100%;
  background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.vp-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vp-stage.rotated video { transform: rotate(90deg) scale(1.6); }
.vp-shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.vp-center-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.85);
  color: #fff; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3;
}
.vp-center-play:active { background: rgba(255,255,255,.25); }
.vp-loading {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  display: none; z-index: 3;
}
.vp-spin {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  -webkit-animation: vpspin .8s linear infinite; animation: vpspin .8s linear infinite;
}
@-webkit-keyframes vpspin { to { -webkit-transform: rotate(360deg); } }
@keyframes vpspin { to { transform: rotate(360deg); } }
.vp-ctrl {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  background: -webkit-linear-gradient(top, transparent, rgba(0,0,0,.82));
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.82));
  z-index: 4; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.vp-ctrl.show { opacity: 1; pointer-events: auto; }
.vp-progress {
  position: relative; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.22); cursor: pointer; margin-bottom: 8px;
}
.vp-buffer, .vp-played { position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px; }
.vp-buffer { background: rgba(255,255,255,.35); width: 0; }
.vp-played { background: var(--primary); width: 0; }
.vp-dot {
  position: absolute; right: -7px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.vp-row { display: flex; align-items: center; gap: 4px; color: #fff; }
.vp-btn {
  min-width: 34px; height: 34px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; user-select: none;
}
.vp-btn:active { background: rgba(255,255,255,.18); }
.vp-time { font-size: .74rem; opacity: .9; padding: 0 4px; font-variant-numeric: tabular-nums; }
.vp-space { flex: 1; }
.vp-vol {
  width: 70px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.25); cursor: pointer; position: relative;
}
.vp-vol-in { position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px; background: #fff; width: 100%; }

/* ── 磁力搜索 ── */
.mag-result-title { font-size: .8rem; color: var(--text-3); padding: 8px 4px 4px; }
.mag-searching, .mag-empty {
  padding: 18px 4px; text-align: center; color: var(--text-3); font-size: .84rem;
}
.mag-btn.save { background: #e8f3ff; color: var(--primary); }
.mag-btn.save:active { background: var(--primary); color: #fff; }

/* ── 缩略图（小尺寸模糊，节省流量） ── */
.file-thumb {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(0.4px) saturate(1.05); /* 轻微模糊，视觉更柔和 */
}
.thumb-grid { aspect-ratio: 1 / 1; }

/* ══════════════════════════════════════════════════
   v3.0 响应式 · PC 侧栏 · 组件抛光
   ══════════════════════════════════════════════════ */

.file-list { padding: 0 12px 8px; }
.file-item {
  border-bottom: none;
  margin-bottom: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.file-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.file-item:active {
  background: var(--primary-lighter);
  margin: 0 0 4px; padding: 10px 12px;
}
.file-grid { gap: 12px; padding: 8px 12px 20px; }
.file-grid-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.file-grid-item:hover {
  border-color: rgba(var(--primary-rgb),.35);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.file-toolbar {
  padding: 8px 16px;
  background: transparent;
}
.breadcrumb {
  padding: 10px 16px 4px;
  font-weight: 500;
}
.bc-item:hover { color: var(--primary); }

.audio-player {
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-deep);
}
.ap-play { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.mask {
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(2px);
}
.action-sheet {
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
.center-dialog {
  border-radius: 18px;
  box-shadow: var(--shadow-deep);
}
.cd-btn.primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.page-overlay {
  background: var(--bg);
}
.ov-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}

.mine-quick, .mine-settings, .ms-card {
  border-radius: 16px;
  overflow: hidden;
}
.setting-item:hover { background: var(--primary-lighter); }

/* Tablet */
@media (min-width: 640px) {
  .recent-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .file-grid { grid-template-columns: repeat(4, 1fr); }
  .home-categories { max-width: 520px; }
}

/* Desktop / PC */
@media (min-width: 960px) {
  :root {
    --header-h: 60px;
  }

  #main-app {
    flex-direction: row;
    background: var(--bg);
  }

  .bottom-nav {
    position: relative;
    order: -1;
    width: var(--sidebar-w);
    height: 100% !important;
    flex: 0 0 var(--sidebar-w);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 18px 12px 20px;
    border-top: none;
    border-right: 1px solid var(--border);
    background: #fff;
    box-shadow: none;
    gap: 4px;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .nav-brand-logo {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(145deg, #14b8a6, #0f766e);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb),.25);
  }
  .nav-brand-text {
    font-size: 1.05rem; font-weight: 800; color: var(--text);
    letter-spacing: -.02em; line-height: 1.2;
  }
  .nav-brand-sub {
    font-size: .7rem; color: var(--text-3); font-weight: 500; margin-top: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    border-radius: 12px;
    color: var(--text-2);
  }
  .nav-item span { font-size: .88rem; font-weight: 600; }
  .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
  }
  .nav-item:hover:not(.active) {
    background: var(--bg);
    color: var(--text);
  }
  .nav-badge {
    position: static;
    margin-left: auto;
  }

  #page-content {
    flex: 1;
    min-width: 0;
    background: var(--bg);
  }

  .page-body {
    padding-bottom: 32px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .page-body::-webkit-scrollbar { width: 8px; height: 8px; }
  .page-body::-webkit-scrollbar-thumb {
    background: #cbd5e1; border-radius: 8px;
  }

  .page-header {
    padding: 0 28px;
    background: rgba(255,255,255,.9);
  }
  .page-header h1 { font-size: 1.2rem; }

  .home-search { margin: 20px 28px 0; max-width: 560px; }
  .home-categories { padding: 22px 28px 12px; gap: 16px; max-width: 640px; }
  .section-header { padding: 18px 28px 10px; }
  .recent-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 12px; padding: 0 28px 28px;
    max-width: 1100px;
  }

  .breadcrumb, .file-toolbar { padding-left: 28px; padding-right: 28px; }
  .file-list { padding: 0 20px 24px; max-width: 1100px; }
  .file-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px; padding: 12px 20px 32px;
    max-width: 1200px;
  }
  .file-item { padding: 12px 14px; }

  .fab {
    bottom: 36px; right: 36px;
    width: 58px; height: 58px;
  }

  .batch-bar {
    left: var(--sidebar-w);
  }

  .audio-player {
    left: calc(var(--sidebar-w) + 24px);
    right: 24px;
    bottom: 28px;
    max-width: 520px;
  }

  /* Auth — split panel on PC */
  #auth-page {
    flex-direction: row;
    align-items: stretch;
    background: var(--bg);
  }
  .auth-hero {
    flex: 1.1;
    min-height: 100%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    text-align: left;
    padding: 64px 72px;
    margin: 0;
    border-radius: 0;
  }
  .auth-hero .hero-icon { margin: 0 0 20px; }
  .auth-hero .hero-title { font-size: 2.4rem; }
  .auth-hero .hero-sub { font-size: 1rem; max-width: 360px; }
  .auth-box {
    flex: 0 0 440px;
    max-width: 480px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    min-height: 100%;
  }

  .page-overlay, .chat-overlay {
    left: var(--sidebar-w);
  }

  .transfer-tabs, .transfer-banner { margin-left: 12px; margin-right: 12px; }
  .mag-input-wrap, .mag-list { max-width: 800px; padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1280px) {
  :root { --sidebar-w: 248px; }
  .file-grid { grid-template-columns: repeat(7, 1fr); }
  .auth-box { flex-basis: 480px; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
