:root {
  --bg-0: #0b1020;
  --bg-1: #111834;
  --card: #151d3b;
  --card-border: #2a3466;
  --text: #eef1fb;
  --text-dim: #a6aed4;
  --accent: #5b7cfa;
  --accent-2: #7ee0c3;
  --danger: #ff6b6b;
  --danger-bg: #3a1620;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(40% 30% at 15% 10%, rgba(91, 124, 250, 0.25), transparent 60%),
    radial-gradient(35% 30% at 85% 20%, rgba(126, 224, 195, 0.18), transparent 60%),
    radial-gradient(45% 40% at 50% 100%, rgba(91, 124, 250, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  max-width: 880px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { flex-shrink: 0; }
.brand-name { font-size: 18px; }

.trust-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-2);
  background: rgba(126, 224, 195, 0.1);
  border: 1px solid rgba(126, 224, 195, 0.3);
  padding: 6px 10px;
  border-radius: 999px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.hero { text-align: center; padding: 24px 0 32px; }
.hero h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p { color: var(--text-dim); max-width: 520px; margin: 0 auto; line-height: 1.5; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab.active { background: var(--accent); color: white; }

.panel.hidden { display: none; }

.dropzone {
  border: 1.5px dashed var(--card-border);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(91, 124, 250, 0.06);
  outline: none;
}
.drop-icon { color: var(--accent); margin-bottom: 8px; }
.drop-title { font-weight: 600; margin: 4px 0; }
.drop-sub { color: var(--text-dim); font-size: 13px; margin: 0; }

.file-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-list .fsize { color: var(--text-dim); flex-shrink: 0; }

.dl-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  transition: transform 0.1s, opacity 0.15s;
}
.dl-btn:hover { transform: translateY(-1px); opacity: 0.9; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, opacity 0.15s;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #7a5bfa); color: white; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn.hidden { display: none; }

.progress-wrap { margin-top: 18px; }
.progress-wrap.hidden { display: none; }
.progress-bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.2s; }
.progress-label { color: var(--text-dim); font-size: 13px; margin: 8px 0 0; text-align: center; }

.result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.result.hidden { display: none; }
.result-head { display: flex; align-items: center; gap: 8px; color: var(--accent-2); font-weight: 700; }
.result-sub { color: var(--text-dim); font-size: 13px; margin: 6px 0 0; }

.error {
  margin-top: 16px;
  background: var(--danger-bg);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.error.hidden { display: none; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.trust-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.trust-icon { font-size: 20px; }
.trust-card h3 { font-size: 13px; margin: 8px 0 4px; }
.trust-card p { font-size: 12px; color: var(--text-dim); margin: 0; line-height: 1.4; }

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 20px 0 40px;
}

@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; }
}
