:root {
  --bg: #070b16;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(17, 24, 39, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --good: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.13), transparent 32rem),
    radial-gradient(circle at top right, rgba(139,92,246,0.16), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bg-glow {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .25;
  pointer-events: none;
}

.bg-glow-a { left: -6rem; top: 10rem; background: #38bdf8; }
.bg-glow-b { right: -5rem; bottom: 8rem; background: #8b5cf6; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar, .hero, .panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 24px;
  position: sticky;
  top: 14px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.top-actions, .button-row, .input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

.language-select {
  width: auto;
  min-width: 138px;
}

input:focus, textarea:focus, .language-select:focus {
  border-color: rgba(56,189,248,0.75);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.12);
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 16px;
  padding: 13px 16px;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
  white-space: nowrap;
}

button:hover { transform: translateY(-1px); }
button:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.main-btn {
  color: #03111f;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
}

.ghost-btn {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
}

.danger-btn {
  color: #fff;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.full { width: 100%; margin-top: 12px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  margin: 22px 0;
  padding: 28px;
  border-radius: 32px;
}

.eyebrow {
  display: inline-flex;
  color: #bae6fd;
  border: 1px solid rgba(56,189,248,0.28);
  background: rgba(56,189,248,0.08);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p, .panel p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-badges span, .pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.alt { color: #ddd6fe; }

.hero-score-card {
  align-self: stretch;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(56,189,248,0.18), rgba(139,92,246,0.18)),
    rgba(2, 6, 23, 0.55);
  border: 1px solid var(--line);
}

.score-label { color: var(--muted); font-weight: 800; }
.score-big {
  font-size: 88px;
  font-weight: 950;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, #e0f2fe, #67e8f9, #a78bfa);
  -webkit-background-clip: text;
  color: transparent;
}
.score-text { color: var(--muted); padding: 0 22px; }

.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.two-col { grid-template-columns: 1.15fr .85fr; }

.panel {
  border-radius: 28px;
  padding: 22px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.panel h2, .panel h3 {
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 13px;
}

.status-line {
  min-height: 24px;
  margin-top: 12px;
  color: #bae6fd;
  font-size: 14px;
}

.dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 165px;
  border: 1px dashed rgba(56,189,248,0.45);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.36);
  padding: 20px;
  cursor: pointer;
}

.dropzone input { display: none; }
.drop-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgba(56,189,248,0.13);
  color: #bae6fd;
  font-size: 24px;
}

.dropzone span {
  color: var(--muted);
  font-size: 13px;
}

.batch-box {
  min-height: 150px;
  resize: vertical;
  line-height: 1.55;
}

.summary-grid, .result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}

.summary-card, .batch-card, .report-card {
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.48);
  border-radius: 22px;
  padding: 16px;
}

.summary-card .label, .batch-card .meta, .report-card .meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card .value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 950;
  word-break: break-word;
}

.status-good { color: var(--good); }
.status-minor { color: var(--warn); }
.status-bad { color: var(--danger); }

.action-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.action-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 20px;
  padding: 14px;
}

.action-card strong {
  display: block;
  margin-bottom: 6px;
}

.action-card p {
  margin: 4px 0;
  color: var(--muted);
}

.raw-json {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #020617;
  color: #dbeafe;
  border-radius: 20px;
  padding: 16px;
  font-size: 12px;
}

.reports-list {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-actions a {
  color: #bae6fd;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(56,189,248,0.08);
}

.hidden { display: none !important; }

.footer {
  text-align: center;
  color: var(--muted);
  padding: 20px 0 6px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar, .top-actions, .input-row, .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero, .two-col {
    grid-template-columns: 1fr;
  }

  .summary-grid, .result-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .summary-grid, .result-grid { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
  .score-big { font-size: 64px; }
}

.support-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.12));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.support-card p {
  margin: 6px 0 0;
}

.support-card .muted {
  opacity: 0.76;
  font-size: 0.9rem;
}

.support-link {
  white-space: nowrap;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 800;
  color: #08111f;
  background: linear-gradient(135deg, #facc15, #22c55e);
}

@media (max-width: 720px) {
  .support-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-link {
    width: 100%;
    text-align: center;
  }
}


.divider-soft {
  height: 1px;
  width: 100%;
  margin: 18px 0;
  background: rgba(148, 163, 184, 0.18);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-btn.secondary {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.25);
}


.copy-json-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px 0;
}

.copy-json-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.copy-json-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.5);
}


.copy-json-wrap.inline {
  display: inline-flex;
  margin: 0 0 0 10px;
  vertical-align: middle;
}
