* {
  box-sizing: border-box;
}

:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel2: #1b2430;
  --text: #f2f5f8;
  --muted: #9ba7b4;
  --line: #2a3441;
  --accent: #69a7ff;
  --danger: #ff6b6b;
  --ok: #46d39a;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(105, 167, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #0d1117, #111827);
  color: var(--text);
  min-height: 100vh;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.98;
  margin: 0;
  max-width: 850px;
}

h2, h3 {
  margin: 0;
}

.sub {
  color: var(--muted);
  max-width: 720px;
  font-size: 17px;
  line-height: 1.6;
}

.panel,
.result,
.status-card {
  background: rgba(21, 27, 35, 0.84);
  border: 1px solid var(--line);
  box-shadow: 0 20px 70px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
  border-radius: 28px;
}

.panel,
.result {
  padding: 24px;
}

.status-card {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.status-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.dot {
  width: 12px;
  height: 12px;
  background: var(--ok);
  border-radius: 999px;
  box-shadow: 0 0 20px var(--ok);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 16px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d1117;
  color: var(--text);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

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

input:focus,
textarea:focus {
  border-color: var(--accent);
}

.dropzone {
  position: relative;
  border: 1.5px dashed #3f5065;
  background: rgba(27, 36, 48, 0.75);
  border-radius: 22px;
  padding: 24px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone p {
  color: var(--muted);
  margin: 6px 0 0;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.file-pill,
.file-row {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
}

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

button,
.button-link {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--accent);
  color: #06111f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.secondary {
  background: #263446;
  color: var(--text);
}

.hint {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 14px;
}

.result {
  margin-top: 24px;
}

.hidden {
  display: none;
}

.result-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.notes {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.note {
  border: 1px solid var(--line);
  background: rgba(105, 167, 255, 0.08);
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
}

.preview-wrap {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: white;
  margin-bottom: 22px;
}

.preview-bar {
  background: var(--panel2);
  color: var(--text);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.preview-bar a {
  color: var(--accent);
}

iframe {
  width: 100%;
  height: 620px;
  border: 0;
  background: white;
}

.files-out {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-row {
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .hero,
  .grid,
  .result-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-card {
    min-width: 0;
  }
}

.legal-footer {
  margin: 36px auto 0;
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
}

.legal-footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 8px;
}

.legal-footer a:hover {
  color: var(--accent);
}