:root {
  color-scheme: dark;
  --bg: #09111f;
  --panel: rgba(13, 24, 44, 0.86);
  --panel-2: rgba(16, 30, 54, 0.92);
  --border: rgba(144, 179, 255, 0.18);
  --text: #edf4ff;
  --muted: #9db0d4;
  --accent: #7cb2ff;
  --accent-2: #ffb14a;
  --success: #50d18d;
  --warning: #ffb14a;
  --danger: #ff7f8d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 178, 255, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 177, 74, 0.14), transparent 28%),
    linear-gradient(180deg, #0a1220 0%, #09111f 100%);
}

code {
  font-family: "Cascadia Code", Consolas, monospace;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  min-width: 980px;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 28px;
  margin-bottom: 20px;
}

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

h1, h2 {
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.65;
}

.hero-line {
  display: block;
}

.hero-line + .hero-line {
  margin-top: 2px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.hero-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(124, 178, 255, 0.12);
  border: 1px solid rgba(124, 178, 255, 0.22);
  color: #dce9ff;
  font-size: 0.92rem;
}

.uploader-card,
.status-card,
.log-card,
.note-card {
  padding: 24px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 2px dashed rgba(124, 178, 255, 0.35);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(124, 178, 255, 0.08), rgba(124, 178, 255, 0.03));
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  padding: 20px;
}

.drop-zone:hover,
.drop-zone.dragover {
  transform: translateY(-1px);
  border-color: rgba(124, 178, 255, 0.7);
  background: linear-gradient(180deg, rgba(124, 178, 255, 0.14), rgba(124, 178, 255, 0.06));
}

.drop-zone input {
  display: none;
}

.drop-zone strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.drop-zone span {
  color: var(--muted);
}

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

.path-helper {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(157, 176, 212, 0.12);
}

.path-helper-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.path-helper code {
  display: inline-block;
  color: #dce9ff;
}

.file-meta > div,
.status-list li {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(157, 176, 212, 0.12);
}

.meta-label,
.status-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.actions,
.section-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #5f8fff);
  color: #08111f;
  font-weight: 700;
}

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

.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.result-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: pre-line;
}

.result-box.neutral {
  background: rgba(124, 178, 255, 0.08);
  border-color: rgba(124, 178, 255, 0.16);
}

.result-box.success {
  background: rgba(80, 209, 141, 0.12);
  border-color: rgba(80, 209, 141, 0.22);
}

.result-box.warning {
  background: rgba(255, 177, 74, 0.12);
  border-color: rgba(255, 177, 74, 0.22);
}

.result-box.error {
  background: rgba(255, 127, 141, 0.12);
  border-color: rgba(255, 127, 141, 0.22);
}

.log-card,
.note-card {
  grid-column: 1 / -1;
}

pre {
  margin: 0;
  padding: 18px;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  background: #07101d;
  border-radius: 18px;
  border: 1px solid rgba(124, 178, 255, 0.08);
  color: #d7e4ff;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.help-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.9;
}

.help-list li + li {
  margin-top: 6px;
}

.inline-button {
  padding: 6px 10px;
  border-radius: 10px;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .hero {
    flex-direction: column;
  }

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

  .file-meta {
    grid-template-columns: 1fr;
  }
}
