:root {
  --bg: #050b14;
  --bg2: #0d1421;
  --card: rgba(8, 14, 24, 0.88);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f4f7fb;
  --muted: #9eaec0;
  --accent: #c8a46a;
  --accent2: #64d1c7;
  --danger: #ff7e7e;
  --ok: #a0efbc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(200, 164, 106, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(100, 209, 199, 0.14), transparent 24%),
    radial-gradient(circle at 55% 0%, rgba(255, 255, 255, 0.05), transparent 36%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200, 164, 106, 0.14), transparent 42%, rgba(100, 209, 199, 0.08));
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 66ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.brand-mark {
  display: block;
  width: min(420px, 100%);
  max-height: 130px;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.38));
}

.brand-divider {
  width: min(420px, 100%);
  height: 1px;
  margin: 0 0 18px;
  background: linear-gradient(90deg, transparent, rgba(200, 164, 106, 0.95), transparent);
  box-shadow: 0 0 0 1px rgba(200, 164, 106, 0.10);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

h1,
h2,
p,
ol {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
}

.lede {
  margin-bottom: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.6;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
}

.hero-badge {
  align-self: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(200, 164, 106, 0.12);
  border: 1px solid rgba(200, 164, 106, 0.28);
  color: #f1dfbc;
  font-weight: 700;
  white-space: nowrap;
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head p,
.helpbox,
.dropzone span,
.file-meta,
.destination-hint,
.cors-hint {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(158, 174, 192, 0.85);
}

input:focus,
textarea:focus {
  border-color: rgba(200, 164, 106, 0.55);
  box-shadow: 0 0 0 4px rgba(200, 164, 106, 0.12);
}

.field-actions {
  display: flex;
  gap: 12px;
  margin: -4px 0 10px;
  flex-wrap: wrap;
}

.destination-hint,
.cors-hint {
  margin: -6px 0 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.destination-hint.ok,
.cors-hint.ok {
  color: var(--ok);
}

.destination-hint.error,
.cors-hint.error {
  color: var(--danger);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 220px;
  margin: 12px 0 18px;
  border: 2px dashed rgba(200, 164, 106, 0.42);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dropzone strong {
  font-size: 1.15rem;
  color: #fff7ea;
}

.dropzone.dragover {
  border-color: var(--accent2);
  background: rgba(100, 209, 199, 0.10);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(100, 209, 199, 0.16) inset;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none !important;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #e1c18f);
  color: #0b1017;
}

.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.danger {
  border-color: rgba(255, 126, 126, 0.22);
  color: #ffd5d5;
}

.secondary:hover,
.primary:hover,
.dropzone:hover {
  transform: translateY(-1px);
}

.helpbox {
  padding: 18px 18px 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.helpbox ol {
  margin: 0 0 14px 18px;
  line-height: 1.65;
}

.file-list {
  display: grid;
  gap: 12px;
}

.file-list.empty {
  color: var(--muted);
}

.file-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.file-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.file-name {
  font-weight: 700;
}

.file-state.ok {
  color: var(--ok);
}

.file-state.error,
.file-state.stopped {
  color: var(--danger);
}

.file-state.wait {
  color: var(--muted);
}

.file-meta {
  font-size: 0.92rem;
  word-break: break-all;
}

.progress {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.12s ease;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .hero-brand {
    align-items: flex-start;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .brand-mark,
  .brand-divider {
    width: min(340px, 100%);
  }

  .shell {
    width: min(100% - 20px, 960px);
    padding-top: 20px;
  }
}
