/* ===== 临时网盘 全局样式（原生 CSS） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

[v-cloak] { display: none; }

html { font-size: 16px; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- 头部 ---- */
.site-header { text-align: center; padding: 48px 20px 24px; color: #fff; }
.logo {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.slogan { margin-top: 8px; font-size: 0.95rem; opacity: 0.9; letter-spacing: 4px; }

/* ---- 容器与卡片 ---- */
.container { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 32px 28px;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 20px; color: #2d3748; }
.center-card { text-align: center; }

/* ---- 拖放区 ---- */
.dropzone {
  border: 2px dashed #b8c2e0;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #f8faff;
}
.dropzone:hover, .dropzone-active {
  border-color: #667eea;
  background: #eef1ff;
  transform: scale(1.01);
}
.dropzone-icon { font-size: 2.4rem; margin-bottom: 10px; }
.dropzone-text { font-size: 1rem; color: #4a5568; }
.dropzone-hint { margin-top: 8px; font-size: 0.8rem; color: #a0aec0; }
.file-input { display: none; }
.link { color: #667eea; text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---- 文件列表 ---- */
.file-list { list-style: none; margin-top: 18px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fbfcfe;
  transition: box-shadow 0.2s ease;
}
.file-item:hover { box-shadow: 0 2px 10px rgba(102, 126, 234, 0.12); }
.file-icon { font-size: 1.4rem; flex-shrink: 0; }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: #2d3748;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-size { font-size: 0.78rem; color: #a0aec0; }
.btn-remove {
  border: none;
  background: #fff0f0;
  color: #e53e3e;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-remove:hover { background: #e53e3e; color: #fff; }

/* 列表过渡动画 */
.list-enter-active, .list-leave-active { transition: all 0.25s ease; }
.list-enter, .list-leave-to { opacity: 0; transform: translateX(20px); }

/* ---- 有效期选择 ---- */
.expire-section { margin-top: 22px; }
.section-label { font-size: 0.9rem; font-weight: 600; color: #4a5568; margin-bottom: 12px; }
.expire-options { display: flex; gap: 12px; flex-wrap: wrap; }
.expire-option { flex: 1; min-width: 120px; cursor: pointer; }
.expire-option input[type="radio"] { display: none; }
.expire-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: #fff;
  text-align: center;
}
.expire-option:hover .expire-card { border-color: #b8c2e0; }
.expire-option-active .expire-card {
  border-color: #667eea;
  background: linear-gradient(135deg, #eef1ff 0%, #f5efff 100%);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}
.expire-name { font-size: 1rem; font-weight: 600; color: #2d3748; }
.expire-desc { font-size: 0.75rem; color: #a0aec0; }
.expire-option-active .expire-name { color: #667eea; }

/* ---- 按钮 ---- */
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: #edf2f7; color: #4a5568; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-upload { width: 100%; margin-top: 22px; }
.btn-block { width: 100%; margin-top: 18px; }
.btn-copy {
  background: #667eea;
  color: #fff;
  padding: 10px 16px;
  font-size: 0.85rem;
  flex-shrink: 0;
  border-radius: 8px;
}
.btn-copy:hover { background: #5a6fd6; }
.btn-download {
  background: #48bb78;
  color: #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
  flex-shrink: 0;
  border-radius: 8px;
}
.btn-download:hover { background: #38a169; }

/* ---- 进度条 ---- */
.progress-wrap { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 5px;
  transition: width 0.2s ease;
}
.progress-text { font-size: 0.85rem; font-weight: 600; color: #667eea; min-width: 42px; text-align: right; }

/* ---- 上传成功 ---- */
.result-card { text-align: center; }
.success-icon { font-size: 3rem; margin-bottom: 8px; }
.code-box {
  margin: 18px auto;
  padding: 16px;
  background: linear-gradient(135deg, #eef1ff 0%, #f5efff 100%);
  border: 2px dashed #667eea;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.code-label { font-size: 0.8rem; color: #718096; }
.code-value {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 8px;
  color: #667eea;
  font-family: "Courier New", monospace;
}
.url-box { text-align: left; margin-top: 10px; }
.url-label { font-size: 0.8rem; color: #718096; display: block; margin-bottom: 8px; }
.url-row { display: flex; gap: 8px; margin-bottom: 10px; }
.url-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #4a5568;
  background: #f8faff;
  font-family: inherit;
}
.url-input:focus { outline: none; border-color: #667eea; }
.expire-info { font-size: 0.88rem; color: #718096; margin: 14px 0 4px; }
.result-card .file-list { text-align: left; }
.result-card .btn-secondary { margin-top: 18px; }

/* ---- 下载页 ---- */
.code-form { display: flex; gap: 12px; }
.code-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.2rem;
  letter-spacing: 6px;
  text-align: center;
  text-transform: uppercase;
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #2d3748;
  transition: border-color 0.2s ease;
}
.code-input:focus { outline: none; border-color: #667eea; }
.hint-text { margin-top: 14px; font-size: 0.8rem; color: #a0aec0; text-align: center; }
.info-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge {
  background: #eef1ff;
  color: #667eea;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}
.back-home { display: block; margin-top: 18px; text-align: center; font-size: 0.88rem; }

/* ---- 错误 / 过期 ---- */
.error-card .error-icon { font-size: 3rem; margin-bottom: 8px; }
.error-text { color: #e53e3e; font-size: 0.9rem; margin-top: 12px; }
.dropzone + .error-text { margin-top: 10px; }
.error-card .btn-secondary { margin-top: 20px; }

/* ---- 加载动画 ---- */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  margin: 10px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   共享桌面工作台
   ============================================================ */

/* ---- 门禁页新增控件 ---- */
.stack-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.field-label { font-size: 0.88rem; color: #4a5568; font-weight: 600; }
.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dfe4f0;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.text-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18); }
.center-text { text-align: center; }

/* hidden 属性必须始终生效（避免 display:flex 等覆盖 UA 的 display:none） */
[hidden] { display: none !important; }

/* ---- 门禁页 Tab ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #dfe4f0;
  background: #f4f6fc;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #4a5568;
  transition: all 0.2s ease;
}
.tab:hover { background: #eef1ff; }
.tab-active { background: #667eea; color: #fff; border-color: #667eea; font-weight: 600; }

/* ---- 右键上下文菜单 ---- */
.ctx-menu {
  position: fixed;
  z-index: 100;
  min-width: 170px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  padding: 5px;
  border: 1px solid #e6e9f2;
}
.ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: #2d3748;
  border-radius: 7px;
  transition: background 0.15s ease;
}
.ctx-item:hover { background: #f0f2fb; }
.ctx-danger { color: #dc2626; }
.ctx-danger:hover { background: #fef2f2; }
.ctx-sep { border: none; border-top: 1px solid #eef0f6; margin: 4px 8px; }

/* ---- 拖拽到文件夹高亮 ---- */
.desk-icon-drop { background: rgba(102, 126, 234, 0.45); border-color: #667eea; }
.desk-icon[draggable="true"] { cursor: grab; }
.desk-icon[draggable="true"]:active { cursor: grabbing; }

/* ---- 空间进入门禁遮罩 ---- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gate-card { width: 100%; max-width: 420px; text-align: center; }
.gate-icon { font-size: 2.6rem; margin-bottom: 6px; }
.gate-code {
  font-size: 1.3rem;
  letter-spacing: 3px;
  color: #4f46e5;
  background: #eef2ff;
  padding: 4px 12px;
  border-radius: 8px;
}
.back-home { display: inline-block; margin-top: 14px; }

/* ---- 桌面外壳 ---- */
.desktop-body {
  margin: 0;
  background: linear-gradient(160deg, #1e3a8a 0%, #4c1d95 55%, #7c3aed 100%);
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  overflow: hidden;
}
.desktop { display: flex; flex-direction: column; height: 100vh; }

.desk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}
.desk-bar-left, .desk-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.desk-logo { color: #fff; font-weight: 700; letter-spacing: 1px; }

.breadcrumb { display: flex; align-items: center; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.crumb {
  color: #c7d2fe;
  text-decoration: none;
  font-size: 0.86rem;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.crumb:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.crumb-current { color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.12); }
.crumb-sep { color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; }

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #eef2ff;
  font-size: 0.78rem;
  white-space: nowrap;
}

.btn-sm { padding: 7px 12px; font-size: 0.82rem; border-radius: 8px; }
.btn-note { background: #f59e0b; color: #fff; }
.btn-note:hover { background: #d97706; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

.desk-bar .btn { border: none; cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
.desk-bar .btn:active { transform: translateY(1px); }

/* ---- 底部 ---- */
.site-footer {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* ---- 响应式 ---- */
/* ---- 桌面区域 ---- */
.desk-area {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 22px 18px 60px;
}
.icon-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  align-content: start;
  position: relative;
  z-index: 2;
}
.desk-icon {
  padding: 12px 6px 10px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, transform 0.18s ease;
  border: 1px solid transparent;
}
.desk-icon:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.desk-icon-selected {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
}
.desk-icon-glyph { font-size: 2.4rem; line-height: 1.1; }
.desk-icon-name {
  margin-top: 6px;
  color: #fff;
  font-size: 0.8rem;
  word-break: break-all;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
}
.desk-icon-meta { margin-top: 3px; color: rgba(255, 255, 255, 0.65); font-size: 0.7rem; }

.empty-hint {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  letter-spacing: 1px;
  pointer-events: none;
  text-align: center;
  z-index: 1;
}

/* ---- 便利贴 ---- */
.note-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.note {
  position: absolute;
  width: 190px;
  min-height: 130px;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}
.note-dragging { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42); }
.note-yellow { background: #fef3a3; }
.note-green  { background: #bbf7d0; }
.note-blue   { background: #bfdbfe; }
.note-pink   { background: #fbcfe8; }
.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  margin-bottom: 4px;
}
.note-dot { font-size: 0.8rem; }
.note-del {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 1;
}
.note-del:hover { color: #dc2626; }
.note-text {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-family: inherit;
  font-size: 0.86rem;
  color: #1f2937;
  line-height: 1.45;
}
.note-color {
  align-self: flex-end;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0.65;
  padding: 0;
}
.note-color:hover { opacity: 1; }

/* ---- 拖拽覆盖层 ---- */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(79, 70, 229, 0.35);
  border: 3px dashed rgba(255, 255, 255, 0.8);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-overlay-inner {
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  padding: 16px 26px;
  border-radius: 12px;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* ---- 提示与底部 ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  z-index: 80;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}
.toast-error { background: rgba(185, 28, 28, 0.95); }
.desk-footer {
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 480px) {
  .logo { font-size: 1.7rem; }
  .card { padding: 24px 18px; }
  .expire-options { flex-direction: column; }
  .expire-option { min-width: 0; }
  .code-form { flex-direction: column; }
  .code-form .btn { width: 100%; }
  .code-value { font-size: 1.8rem; letter-spacing: 5px; }
  .url-row { flex-direction: column; }
  .btn-copy { width: 100%; }
}

