:root {
  --bg: #121212;
  --surface: rgba(30, 30, 30, 0.92);
  --surface-alt: rgba(45, 45, 45, 0.9);
  --line: rgba(57, 255, 20, 0.14);
  --line-strong: rgba(57, 255, 20, 0.28);
  --text: #f5f5f5;
  --muted: #b0b0b0;
  --accent: #39ff14;
  --accent-soft: rgba(57, 255, 20, 0.14);
  --danger: #ff6b6b;
  --success: #6dff8d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(57, 255, 20, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(57, 255, 20, 0.08), transparent 24%),
    linear-gradient(180deg, #121212 0%, #171717 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

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

.hero-card,
.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  padding: 32px;
  margin-bottom: 24px;
}

.hero-copy h1,
.card-header h2 {
  margin: 0;
  line-height: 1.02;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
}

.back-link,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.back-link:hover,
.footer-links a:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.eyebrow,
.panel-label,
.card-kicker,
.generated-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text,
.section-text,
.panel-list,
.hint-box p,
.result,
.field span,
th,
td,
pre {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 18px 0 0;
}

.hero-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.08), rgba(57, 255, 20, 0.03)),
    var(--surface-alt);
}

.panel-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
  line-height: 1.5;
}

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

.card { padding: 28px; }
.card-wide { padding-bottom: 32px; }
.card-header { margin-bottom: 20px; }
.card-header h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.98rem;
  font-weight: 600;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(57, 255, 20, 0.18);
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.96);
  color: var(--text);
  font: inherit;
}

input[type="text"]:focus,
input[type="file"]:focus {
  outline: 3px solid rgba(57, 255, 20, 0.14);
  border-color: var(--line-strong);
}

.button-row,
.upload {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.button {
  appearance: none;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.button-primary {
  color: #0c0c0c;
  background: var(--accent);
  box-shadow: 0 16px 32px rgba(57, 255, 20, 0.2);
}

.button-secondary {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(57, 255, 20, 0.18);
}

.generated {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(57, 255, 20, 0.05);
  border: 1px solid rgba(57, 255, 20, 0.12);
}

.generated-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.section-text {
  margin-top: 0;
  font-size: 1.04rem;
  line-height: 1.7;
}

.field-file { flex: 1 1 320px; }

.hint-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(57, 255, 20, 0.18);
  background: rgba(18, 18, 18, 0.82);
}

.hint-box p {
  margin: 0 0 10px;
  font-weight: 700;
}

pre {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
}

.result {
  min-height: 28px;
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.result[data-state="valid"] { color: var(--success); }
.result[data-state="invalid"] { color: var(--danger); }
.result[data-state="info"] { color: var(--accent); }

.table-wrap {
  margin-top: 20px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(57, 255, 20, 0.1);
  background: rgba(18, 18, 18, 0.92);
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(57, 255, 20, 0.08);
}

th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td { font-size: 0.97rem; }

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 0 8px;
}

@media (max-width: 900px) {
  .hero-card,
  .grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero-card,
  .card {
    padding: 20px;
    border-radius: 22px;
  }

  .button,
  .button-row > * {
    width: 100%;
  }
}
