/* ============================================================
   UDID 剥离平台 · 前台样式
   深色科技风 · 青紫渐变
   ============================================================ */

:root {
  --bg: #080a12;
  --bg-soft: #0d1120;
  --panel: rgba(18, 23, 40, .72);
  --panel-solid: #121728;
  --line: rgba(120, 145, 200, .14);
  --line-strong: rgba(120, 145, 200, .28);
  --txt: #e8ecf7;
  --txt-2: #97a3c0;
  --txt-3: #5f6b88;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --grad: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.14), rgba(139,92,246,.14));
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.75);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- 背景 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(120,145,200,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,145,200,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%; filter: blur(120px); pointer-events: none;
}
.bg-glow-a { width: 620px; height: 620px; top: -260px; left: -140px; background: rgba(34,211,238,.14); }
.bg-glow-b { width: 560px; height: 560px; top: -120px; right: -160px; background: rgba(139,92,246,.16); }

/* ---------- 布局 ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px) saturate(160%);
  background: rgba(8, 10, 18, .78);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(34,211,238,.7);
}
.brand-text { font-weight: 700; font-size: 16px; letter-spacing: .2px; }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--txt-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 13px; border-radius: 9px; transition: .18s;
}
.nav a:hover { color: var(--txt); background: rgba(120,145,200,.09); }
.nav a.on { color: var(--txt); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .18s; white-space: nowrap;
  font-family: inherit; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #05121a; box-shadow: 0 8px 24px -10px rgba(34,211,238,.85); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: rgba(120,145,200,.08); color: var(--txt); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: rgba(120,145,200,.15); }
.btn-danger { background: rgba(239,68,68,.14); color: #fca5a5; border-color: rgba(239,68,68,.35); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.22); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 12px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
}

/* ---------- 首页 ---------- */
.hero { padding: 78px 0 52px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px;
  border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--line-strong);
  font-size: 12.5px; color: #a5f3fc; font-weight: 600; letter-spacing: .3px;
}
.hero-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero h1 {
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.18; margin: 22px 0 16px;
  font-weight: 800; letter-spacing: -.5px;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--txt-2); font-size: 16px; max-width: 620px; margin: 0 auto; }

/* ---------- 上传区 ---------- */
.uploader { margin: 40px auto 0; max-width: 760px; }
.drop {
  position: relative; padding: 46px 28px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
  background: rgba(13,17,32,.55); cursor: pointer; transition: .2s;
}
.drop:hover, .drop.over {
  border-color: var(--cyan); background: rgba(34,211,238,.05);
  box-shadow: 0 0 0 4px rgba(34,211,238,.06), inset 0 0 40px rgba(34,211,238,.04);
}
.drop-icon {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 18px;
  display: grid; place-items: center; background: var(--grad-soft);
  border: 1px solid var(--line-strong); color: var(--cyan);
}
.drop-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.drop-sub { color: var(--txt-3); font-size: 13.5px; }
.drop-hint { margin-top: 16px; font-size: 12.5px; color: var(--txt-3); }
.drop input[type=file] { display: none; }

.file-picked {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left;
  background: rgba(34,211,238,.06); border: 1px solid rgba(34,211,238,.3); border-radius: 14px;
}
.file-ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #05121a; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--txt-3); font-size: 12.5px; font-family: var(--mono); }

/* ---------- 进度 ---------- */
.progress-wrap { margin-top: 20px; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 9px; }
.progress-head b { color: var(--cyan); font-family: var(--mono); }
.progress-bar { height: 8px; border-radius: 999px; background: rgba(120,145,200,.13); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: 999px; background: var(--grad);
  transition: width .45s cubic-bezier(.22,.8,.3,1);
  box-shadow: 0 0 16px rgba(34,211,238,.55);
}
.progress-log {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: rgba(5,8,16,.75); border: 1px solid var(--line);
  font: 12.5px/1.85 var(--mono); color: var(--txt-2);
  max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}

/* ---------- 能力卡片 ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.3px; }
.section-head p { color: var(--txt-2); margin-top: 10px; font-size: 14.5px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.feature { padding: 24px 22px; transition: .22s; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.feature-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line-strong);
  color: var(--cyan); margin-bottom: 15px;
}
.feature h3 { font-size: 15.5px; margin-bottom: 8px; font-weight: 700; }
.feature p { color: var(--txt-2); font-size: 13.5px; line-height: 1.7; }

/* ---------- 流程 ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 12px; }
.flow-step { position: relative; padding: 24px 18px; text-align: center; }
.flow-step::after {
  content: ''; position: absolute; top: 43px; right: -6px; width: 12px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.flow-step:last-child::after { display: none; }
.flow-num {
  width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--grad-soft); border: 1px solid var(--line-strong); color: var(--cyan);
}
.flow-step h4 { font-size: 14px; margin-bottom: 6px; }
.flow-step p { color: var(--txt-3); font-size: 12.5px; }

/* ---------- 任务表 ---------- */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px;
}
.panel-head h3 { font-size: 16px; font-weight: 700; }
.panel-body { padding: 8px 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 12px 18px; color: var(--txt-3); font-weight: 600;
  font-size: 12px; letter-spacing: .4px; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 14px 18px; border-bottom: 1px solid rgba(120,145,200,.07); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(120,145,200,.035); }
.tbl .fname { font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; color: var(--txt-2); }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
}
.tag i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-done { background: rgba(16,185,129,.14); color: #6ee7b7; }
.tag-run  { background: rgba(34,211,238,.14); color: #67e8f9; }
.tag-queue{ background: rgba(245,158,11,.14); color: #fcd34d; }
.tag-fail { background: rgba(239,68,68,.14); color: #fca5a5; }
.tag-idle { background: rgba(120,145,200,.12); color: var(--txt-2); }

/* ---------- 空态 ---------- */
.empty { padding: 62px 20px; text-align: center; }
.empty-ico { font-size: 40px; opacity: .3; margin-bottom: 14px; }
.empty h4 { font-size: 15px; margin-bottom: 6px; }
.empty p { color: var(--txt-3); font-size: 13px; }

/* ---------- 套餐 ---------- */
.plan {
  padding: 26px 22px; position: relative; display: flex; flex-direction: column;
  transition: .22s;
}
.plan:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.plan.hot { border-color: rgba(34,211,238,.45); box-shadow: 0 0 0 1px rgba(34,211,238,.18), var(--shadow); }
.plan-label {
  position: absolute; top: -1px; right: 18px; height: 22px; padding: 0 10px;
  border-radius: 0 0 8px 8px; background: var(--grad); color: #05121a;
  font-size: 11px; font-weight: 800; display: flex; align-items: center;
}
.plan h3 { font-size: 16px; margin-bottom: 4px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 12px 0 16px; }
.plan-price b { font-size: 30px; font-weight: 800; letter-spacing: -.8px; }
.plan-price span { color: var(--txt-3); font-size: 13px; }
.plan-feats { list-style: none; flex: 1; margin-bottom: 20px; }
.plan-feats li {
  display: flex; gap: 9px; font-size: 13px; color: var(--txt-2);
  padding: 5px 0; line-height: 1.55;
}
.plan-feats li svg { flex-shrink: 0; margin-top: 4px; color: var(--green); }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 15px; }
.field span { display: block; font-size: 12.5px; color: var(--txt-2); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
  background: rgba(5,8,16,.6); border: 1px solid var(--line-strong);
  color: var(--txt); font-size: 14px; font-family: inherit; outline: none; transition: .18s;
}
.field textarea { height: auto; padding: 11px 13px; resize: vertical; min-height: 90px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.1);
}
.form-err { color: #fca5a5; font-size: 12.5px; min-height: 18px; margin-bottom: 10px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(3,5,10,.78); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: 100%; max-width: 400px; padding: 30px 26px 24px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: 0 30px 80px -20px #000;
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
}
.modal-sm { max-width: 350px; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.modal-x {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  border: none; background: transparent; color: var(--txt-3); font-size: 22px;
  cursor: pointer; border-radius: 8px; line-height: 1;
}
.modal-x:hover { background: rgba(120,145,200,.1); color: var(--txt); }
.modal-head { text-align: center; margin-bottom: 22px; }
.modal-head h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.modal-head p { color: var(--txt-3); font-size: 13px; }
.modal-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--txt-3); }
.modal-foot a { color: var(--cyan); text-decoration: none; font-weight: 600; }

.confirm-body { text-align: center; padding: 6px 0 4px; }
.confirm-icon {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  background: rgba(245,158,11,.14); color: var(--amber);
}
.confirm-body h3 { font-size: 16px; margin-bottom: 8px; }
.confirm-body p { color: var(--txt-2); font-size: 13.5px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-actions .btn { flex: 1; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; top: 82px; right: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  min-width: 240px; max-width: 360px; padding: 13px 17px; border-radius: 12px;
  background: rgba(18,23,40,.96); border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px -12px #000; font-size: 13.5px; color: var(--txt);
  animation: slideIn .26s cubic-bezier(.2,.9,.3,1.1);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.out { animation: slideOut .2s forwards; }
.toast-ico { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.toast-ok .toast-ico { background: rgba(16,185,129,.2); color: #6ee7b7; }
.toast-err .toast-ico { background: rgba(239,68,68,.2); color: #fca5a5; }
.toast-info .toast-ico { background: rgba(34,211,238,.2); color: #67e8f9; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- 统计条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.stat { padding: 18px 20px; text-align: center; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { color: var(--txt-3); font-size: 12.5px; }

/* ---------- 页脚 ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line); padding: 26px 0; }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--txt-3); }
.footer-brand { color: var(--txt-2); font-weight: 600; }
.footer-sep { opacity: .4; margin: 0 4px; }

/* ---------- 页面切换 ---------- */
.page { animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

.page-head { padding: 40px 0 26px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.page-head p { color: var(--txt-2); font-size: 14px; margin-top: 6px; }

/* ---------- 用户区 ---------- */
.user-chip {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 6px;
  border-radius: 999px; background: rgba(120,145,200,.08); border: 1px solid var(--line-strong);
  cursor: pointer;
}
.user-av {
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #05121a; font-weight: 800; font-size: 12px;
}
.user-name { font-size: 13.5px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-quota { font-size: 11.5px; color: var(--cyan); font-family: var(--mono); }
.user-menu {
  position: absolute; top: 58px; right: 0; min-width: 180px; padding: 7px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: var(--shadow); z-index: 70;
}
.user-menu[hidden] { display: none; }
.user-menu a, .user-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px;
  border: none; background: transparent; color: var(--txt-2); font-size: 13.5px;
  text-decoration: none; border-radius: 8px; cursor: pointer; font-family: inherit; text-align: left;
}
.user-menu a:hover, .user-menu button:hover { background: rgba(120,145,200,.1); color: var(--txt); }
.user-menu .sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step::after { display: none; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .hero { padding: 46px 0 30px; }
  .wrap { padding: 0 16px; }
  .drop { padding: 34px 18px; }
  .tbl th:nth-child(3), .tbl td:nth-child(3),
  .tbl th:nth-child(5), .tbl td:nth-child(5) { display: none; }
  .toast-wrap { left: 16px; right: 16px; top: 76px; }
  .toast { max-width: none; }
}
