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

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #1e2230;
  --border: #2a2e3a;
  --border-light: #353a4a;
  --text: #e4e6ed;
  --text-muted: #8b8fa3;
  --text-dim: #5c6070;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --accent-dim: rgba(108, 140, 255, 0.12);
  --success: #4ade80;
  --success-dim: rgba(74, 222, 128, 0.12);
  --error: #f87171;
  --error-dim: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --code-bg: #12141c;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.logo-icon {
  font-size: 28px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(108, 140, 255, 0.4));
}

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #a0b4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.3px;
}

.badge-dark {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  padding: 2px 8px;
  margin-left: 8px;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 20px;
  position: relative;
}

.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone .upload-icon {
  color: var(--text-dim);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.upload-zone:hover .upload-icon { color: var(--accent); }

.upload-zone h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.upload-zone p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-success {
  background: var(--success);
  color: #0a0a0a;
}
.btn-success:hover { background: #6ee7a0; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Toggle Switch */
.option-group {
  margin-bottom: 12px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.toggle-label input { display: none; }

.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border-light);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle-label input:checked + .toggle-switch {
  background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
  left: 19px;
  background: #fff;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.select-input {
  padding: 6px 10px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.select-input:focus { border-color: var(--accent); }

.text-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  margin-top: 8px;
  margin-bottom: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.text-input:focus { border-color: var(--accent); }
.text-input::placeholder { color: var(--text-dim); }

/* Upload Status */
.upload-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 500;
}

.upload-status.uploading { background: var(--accent-dim); color: var(--accent); }
.upload-status.success { background: var(--success-dim); color: var(--success); }
.upload-status.error { background: var(--error-dim); color: var(--error); }

/* Progress Bar */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Result Box */
.result-box {
  background: var(--success-dim);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.result-icon {
  width: 40px;
  height: 40px;
  background: var(--success);
  color: #0a0a0a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 20px;
  font-weight: 700;
}

.result-box h3 {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}

.result-url {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 12px;
  user-select: all;
  color: var(--accent);
}

#fileListResult {
  margin-top: 12px;
  text-align: left;
}

.file-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}

.file-result-item {
  flex-wrap: wrap;
}
.file-result-item:last-child { border-bottom: none; }
.file-result-name { font-weight: 500; }
.file-result-size { color: var(--text-muted); font-size: 12px; }
.file-result-md5 { width: 100%; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; color: var(--text-dim); cursor: pointer; word-break: break-all; margin-top: 2px; }
.file-result-md5:hover { color: var(--accent); }

/* CLI Section */
.cli-group {
  margin-bottom: 14px;
}

.cli-group:last-child { margin-bottom: 0; }

.cli-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: 12.5px;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.code-block code {
  flex: 1;
  overflow-x: auto;
}

.copy-inline {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.copy-inline:hover { color: var(--accent); background: var(--accent-dim); }
.copy-inline.copied { color: var(--success); }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.feature-item:hover {
  border-color: var(--border-light);
  background: rgba(255,255,255,0.04);
}

.feature-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.feature-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px 0;
  color: var(--text-dim);
  font-size: 11px;
}

/* Hint */
.hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 16px 12px 32px; }
  .card { padding: 18px; }
  h1 { font-size: 22px; }
  .code-block { font-size: 11px; padding: 8px 10px; }
  .feature-grid { grid-template-columns: 1fr; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}
