/* style.css — 守藏 Web 上传页面 */

:root {
  --bg: #0d1117;
  --card: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --success: #3fb950;
  --error: #f85149;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 480px;
  width: 100%;
}

/* ── Logo ── */

.logo {
  text-align: center;
  margin-bottom: 32px;
}
.logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.logo p {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Card ── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ── Drop Zone ── */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.05);
}
.drop-zone .icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.drop-zone .text {
  font-size: 16px;
  color: var(--text);
}
.drop-zone .hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── File Info ── */

.file-info {
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-info .name {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-info .size {
  font-size: 12px;
  color: var(--text-dim);
}
.file-info .remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
}

/* ── 保管码 Input ── */

.pin-section {
  margin-bottom: 16px;
}
.pin-section label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.pin-section input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.pin-section input:focus {
  border-color: var(--accent);
}
.pin-section .vault-id {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Upload ID ── */

.upload-id-section {
  margin-bottom: 16px;
}
.upload-id-section label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.upload-id-section input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

/* ── Button ── */

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Progress ── */

.progress {
  margin-top: 12px;
}
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
  width: 0%;
}
.progress .status {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  text-align: center;
}

/* ── Result ── */

.result {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
  display: none;
}
.result.success {
  display: block;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--success);
}
.result.error {
  display: block;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--error);
}
.result .icon { font-size: 32px; }
.result .msg { font-size: 14px; margin-top: 8px; }
.result .detail { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ── Footer ── */

.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-dim);
}
.footer .lock { margin-right: 4px; }

/* ── Hidden ── */

.hidden { display: none !important; }
