/* ============================================================
   Stellar Drop · 恒星云投递 应用层样式
   全部组件复用主站 main.css 的设计令牌（--violet/--cyan/--glass-*），
   与首页保持同一材质、同一动效节奏（--ease / --dur）。
   ============================================================ */

/* ---------- 投递控制台 ---------- */
/* 首页功能区收窄容器：控制台/管理区与整页保持留白比例 */
.container--narrow {
  width: min(960px, 100% - 48px);
  margin-inline: auto;
}
@media (max-width: 640px) {
  .container--narrow { width: calc(100% - 36px); }
}

.drop-console {
  max-width: 860px;
  margin-inline: auto;
  padding: 42px 44px 38px;
  text-align: center;
  cursor: pointer;
}
.drop-console:hover { border-color: rgba(139, 124, 255, 0.35); }
.drop-console.dragover {
  border-color: var(--violet);
  background: rgba(139, 124, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.12), 0 22px 48px -18px rgba(0, 0, 0, 0.6);
}
.drop-console__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 124, 255, 0.35);
  background: rgba(139, 124, 255, 0.09);
  color: var(--violet);
  box-shadow: 0 14px 40px -14px rgba(120, 105, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: float 4.5s ease-in-out infinite;
}
.drop-console__icon svg { width: 36px; height: 36px; }
.drop-console__title { font-size: 24px; font-weight: 700; letter-spacing: 0.01em; }
.drop-console__hint { margin-top: 10px; color: var(--text-3); font-size: 13.5px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.drop-console__form { margin: 34px auto 0; max-width: 760px; text-align: left; cursor: default; }

.drop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.drop-grid .drop-perm-alert { grid-column: 1 / -1; }

/* 输入域：玻璃底 + 图标，聚焦浮现紫罗兰描边（与主站 wz-field 同材质） */
.drop-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.drop-field > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; transition: color 0.3s; }
.drop-field:focus-within {
  border-color: rgba(139, 124, 255, 0.55);
  background: rgba(139, 124, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.14);
}
.drop-field:focus-within > svg { color: var(--violet); }
.drop-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14.5px;
  font-family: var(--font-cn);
  letter-spacing: 0.02em;
}
.drop-field input::placeholder { color: var(--text-3); }
.drop-field input[type="number"] { font-family: var(--font-mono); }
.drop-field input:disabled { opacity: 0.45; }
/* 数字输入框去掉上下箭头，保持纯净观感 */
.drop-field input[type="number"]::-webkit-outer-spin-button,
.drop-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.drop-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* 有效期：数值 + 单位 下拉 */
.drop-field--split { gap: 10px; }
.drop-field--split > input[type="number"] { width: 42%; flex: none; }
.drop-select {
  position: relative;
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s;
}
.drop-select:focus-within { border-color: rgba(139, 124, 255, 0.55); }
.drop-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  padding: 0 38px 0 14px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-cn);
  cursor: pointer;
}
.drop-select select option { background: #0c0e18; color: var(--text); }
.drop-select > svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transform: translateY(-50%);
  pointer-events: none;
}

/* 永久提示（金色告警，与主站 legal__alert--gold 同语系） */
.drop-perm-alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(242, 178, 92, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(242, 178, 92, 0.07);
  color: #f4c98d;
  font-size: 13px;
  line-height: 1.75;
}
.drop-perm-alert svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.drop-perm-alert strong { color: var(--gold); }

.drop-upload-btn { margin-top: 26px; height: 54px; font-size: 16px; }

/* 上传同意提示（条款/审计告知） */
.drop-tos-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.8;
  text-align: center;
}
.drop-tos-hint a {
  color: var(--text-2);
  border-bottom: 1px dashed var(--line);
  transition: color 0.25s, border-color 0.25s;
}
.drop-tos-hint a:hover { color: #b9adff; border-color: rgba(139, 124, 255, 0.5); }

/* ---------- 搜索与管理 ---------- */
.drop-search { display: flex; gap: 12px; margin-bottom: 28px; }
.drop-search .drop-field { flex: 1; height: 54px; }
.drop-search__btn { height: 54px; padding: 0 26px; }

.drop-filegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.drop-filegrid[hidden] { display: none; }
.drop-empty {
  grid-column: 1 / -1;
  padding: 46px 30px;
  text-align: center;
  color: var(--text-2);
  font-size: 14.5px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}
.drop-empty strong { color: var(--text); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* 文件卡：主站 .card 材质 + 悬停上浮同参数 */
.drop-file-card { padding: 24px 24px 18px; display: flex; flex-direction: column; }
.fc-head { display: flex; align-items: flex-start; gap: 12px; }
.fc-name {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.fc-lock { width: 14px; height: 14px; color: var(--cyan); flex: none; margin-top: 3px; }
.fc-tag {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.fc-tag--perm { border-color: rgba(85, 214, 224, 0.35); color: #8ee7ee; background: rgba(85, 214, 224, 0.08); }
.fc-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.fc-meta svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.fc-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.fc-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-cn);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.fc-btn svg { width: 14px; height: 14px; flex: none; }
.fc-btn--share { border-color: rgba(85, 214, 224, 0.3); color: #8ee7ee; background: rgba(85, 214, 224, 0.07); }
.fc-btn--share:hover { background: var(--cyan); border-color: var(--cyan); color: #05060b; transform: translateY(-2px); }
.fc-btn--set:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--text); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.fc-btn--del { border-color: rgba(248, 113, 113, 0.28); color: #f87171; background: rgba(248, 113, 113, 0.07); }
.fc-btn--del:hover { background: #ef4444; border-color: #ef4444; color: #fff; transform: translateY(-2px); }
.fc-btn--open {
  flex: none;
  width: 38px;
  padding: 0;
}
.fc-btn--open:hover { background: var(--grad-main); border-color: transparent; color: #05060b; transform: rotate(-45deg); }

/* ---------- 弹窗（主站 .modal 体系的色相扩展） ---------- */
.modal__card--left { text-align: left; }
.modal__card--left .modal__ico { margin-left: auto; margin-right: auto; }
.modal__card--left .modal__title { text-align: center; }
.modal__ico--violet { background: rgba(139, 124, 255, 0.1); border-color: rgba(139, 124, 255, 0.35); color: #b9adff; }
.modal__ico--cyan { background: rgba(85, 214, 224, 0.1); border-color: rgba(85, 214, 224, 0.35); color: var(--cyan); }
.modal__ico--green { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); color: #34d399; }
.modal__ico--red { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.35); color: #f87171; }
.modal__ico--neutral { background: rgba(255, 255, 255, 0.06); border-color: var(--line); color: var(--text-2); }

/* 身份验证输入 + 错误抖动 */
#authInputGroup { margin-top: 24px; text-align: left; }
#authInputGroup input { text-align: center; letter-spacing: 0.06em; }
@keyframes drosshake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.shake-anim { animation: drosshake 0.4s ease-in-out; border-color: #f87171 !important; }

.drop-err {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 12px;
  color: #f87171;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s;
}
.drop-err.show { display: flex; opacity: 1; }
.drop-err svg { width: 14px; height: 14px; flex: none; }

/* ---------- 传输进度 ---------- */
.drop-progress { margin-top: 26px; }
.drop-progress__stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.drop-progress__pct { color: var(--violet); font-weight: 600; font-size: 14px; }
.drop-progress__track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}
.drop-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8b7cff, #55d6e0);
  box-shadow: 0 0 12px rgba(139, 124, 255, 0.5);
  transition: width 0.15s linear;
  position: relative;
  overflow: hidden;
}
.drop-progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: dropshine 1.6s linear infinite;
}
@keyframes dropshine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.drop-progress__detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
  color: var(--text-2);
}
.drop-progress__detail span { display: inline-flex; align-items: center; gap: 7px; }
.drop-progress__detail svg { width: 14px; height: 14px; color: var(--text-3); }
.drop-progress__detail b { color: var(--text); font-weight: 600; font-family: var(--font-mono); font-size: 12px; }

/* ---------- 凭据复制块 ---------- */
.drop-copy { margin-top: 18px; text-align: left; }
.drop-copy__label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.drop-copy__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}
.drop-copy__row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 10px;
  letter-spacing: 0.02em;
}
.drop-copy__row input.drop-copy__pwd { color: #f87171; }
.drop-copy__row button {
  flex: none;
  padding: 0 16px;
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-cn);
  cursor: pointer;
  transition: all 0.25s;
}
.drop-copy__row button:hover { background: rgba(139, 124, 255, 0.25); color: #fff; }
.drop-copy__note { margin-top: 9px; font-size: 12.5px; color: var(--text-3); }
.drop-violet { color: var(--violet); font-family: var(--font-mono); }

/* ---------- 提示框（金/红告警） ---------- */
.drop-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.75;
  text-align: left;
}
.drop-alert svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.drop-alert small { opacity: 0.75; font-size: 12px; }
.drop-alert--gold { border: 1px solid rgba(242, 178, 92, 0.3); background: rgba(242, 178, 92, 0.07); color: #f4c98d; }
.drop-alert--gold strong { color: var(--gold); }
.drop-alert--red { border: 1px solid rgba(248, 113, 113, 0.32); background: rgba(248, 113, 113, 0.08); color: #f87171; }
.drop-alert--red svg { margin-top: 1px; }

.drop-mono-strong { font-family: var(--font-mono); color: var(--text); letter-spacing: 0.06em; }
.drop-danger { color: #f87171; }
.drop-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 分享页取件卡 ---------- */
.drop-share-card { text-align: left; max-width: 620px; }
.drop-share-head { display: flex; align-items: center; gap: 18px; }
.drop-share-head__icon {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 124, 255, 0.32);
  background: rgba(139, 124, 255, 0.09);
  color: var(--violet);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 34px -16px rgba(120, 105, 255, 0.5);
}
.drop-share-head__icon svg { width: 30px; height: 30px; }
.drop-share-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}
.drop-share-head__name {
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 6px;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.drop-share-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.drop-share-pwd { margin-top: 28px; }
.drop-share-pwd input { text-align: center; letter-spacing: 0.1em; }

/* ---------- 在线预览 ---------- */
.drop-preview {
  margin-top: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.drop-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.drop-preview__head .mono {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  font-weight: 400;
}
.drop-preview__media {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  background: #000;
}
.drop-preview__audio { display: block; width: 100%; padding: 18px 16px; }
.drop-preview__frame {
  display: block;
  width: 100%;
  height: 520px;
  border: none;
  background: #fff;
}
.drop-preview--locked .drop-preview__locked { padding: 26px 18px; text-align: center; }
.drop-preview--locked p { color: var(--text-3); font-size: 13px; margin-bottom: 14px; line-height: 1.8; }

/* ---------- Toast 错误变体 ---------- */
.toast.toast--err {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(32, 12, 14, 0.92);
  color: #fca5a5;
}
.toast.toast--err svg { color: #f87171; }

/* ---------- 加载旋转 ---------- */
@keyframes dropspin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .drop-console { padding: 34px 22px 30px; }
  .drop-grid { grid-template-columns: 1fr; }
  .drop-grid .drop-perm-alert { grid-column: auto; }
  .drop-search { flex-direction: column; }
  .drop-search__btn { width: 100%; height: 50px; }
  .drop-filegrid { grid-template-columns: 1fr; }
  /* iOS Safari：焦点输入框字号 <16px 会触发页面自动放大，统一提到 16px */
  .drop-field input,
  .drop-select select { font-size: 16px; }
}
@media (max-width: 640px) {
  .drop-console { padding: 28px 18px 26px; border-radius: 22px; }
  .drop-console__icon { width: 62px; height: 62px; border-radius: 18px; margin-bottom: 16px; }
  .drop-console__icon svg { width: 30px; height: 30px; }
  .drop-console__title { font-size: 20px; }
  .drop-console__hint { font-size: 12px; }
  .drop-field { height: 52px; }
  .drop-upload-btn { height: 50px; font-size: 15px; }
  .drop-file-card { padding: 20px 18px 14px; }
  .fc-actions { flex-wrap: wrap; }
  .fc-btn { min-width: calc(50% - 4px); }
  .fc-btn--open { min-width: 38px; }
  .drop-share-card { padding: 32px 22px 28px; }
  .drop-share-head { gap: 14px; }
  .drop-share-head__icon { width: 50px; height: 50px; border-radius: 15px; }
  .drop-share-head__icon svg { width: 24px; height: 24px; }
}

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .drop-console__icon, .drop-progress__fill::after { animation: none; }
}
