:root {
  --bg-main: #0a0f1c;
  --bg-panel: rgba(16, 22, 40, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);

  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.45);
  --accent-alt: #7c3aed;

  --text-main: #e5ecf8;
  --text-muted: #9aa8c7;

  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1000px 500px at 15% 10%, rgba(59,130,246,0.25), transparent 60%),
    radial-gradient(900px 600px at 85% 15%, rgba(124,58,237,0.2), transparent 65%),
    linear-gradient(180deg, #070b16, #0a0f1c);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

.app {
  max-width: 1200px;
  margin: 48px auto;
  padding: 0 20px;
  width: 100%;
  flex: 1;
}

header {
  margin-bottom: 28px;
}

header h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header .sub {
  color: var(--text-muted);
  font-size: 15px;
}

.panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 22px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.field label {
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.field small {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(5, 8, 20, 0.6);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

textarea {
  min-height: 240px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.dropzone {
  height: 100%;
  min-height: 110px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(8, 12, 30, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

.dz-title {
  font-weight: 800;
  font-size: 15px;
}

.dz-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.actions {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}

button {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:not(.secondary) {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  box-shadow: 0 12px 30px rgba(59,130,246,0.35);
}

button.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.footer {
  text-align: center;
  padding: 18px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(5, 8, 20, 0.55);
  backdrop-filter: blur(10px);
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-upload input[type="file"] {
  display: none;
}

.file-btn {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  box-shadow: 0 12px 30px rgba(59,130,246,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(59,130,246,0.45);
}

.file-btn:active {
  transform: translateY(0);
}

.file-name {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-btn:hover::after {
  content: " (click to browse)";
  font-weight: 600;
}
.file-upload.loaded .file-btn {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.progress-wrap {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.progress-wrap.hidden {
  display: none;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

.progress-title {
  letter-spacing: 0.3px;
}

.progress-percent {
  color: var(--accent);
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-alt),
    var(--accent)
  );
  box-shadow: 0 0 20px var(--accent-glow);
  transition: width 0.35s ease;
}

.progress-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
