:root {
  --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.12);
  --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,
.quick-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,
.quick-links a:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

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

.hero-text,
.panel-list,
.card-header p,
.field span,
.field small,
.preview-meta,
.placeholder p,
.quick-links a {
  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;
}

.app-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -12% -34% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.12), transparent 68%);
  pointer-events: none;
}

.card-header h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

.card-header p {
  margin: 8px 0 0;
  line-height: 1.6;
}

form,
.dynamic-fields,
.settings-grid {
  display: grid;
  gap: 16px;
}

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

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 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;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(57, 255, 20, 0.12);
}

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

input[type="color"] {
  min-height: 52px;
  padding: 6px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.actions,
.preview-actions,
.quick-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 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);
}

.preview-card {
  display: grid;
  gap: 18px;
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.qr-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(45, 45, 45, 0.85), rgba(18, 18, 18, 0.92));
  border: 1px dashed rgba(57, 255, 20, 0.18);
}

#qr-image {
  width: min(100%, 340px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28);
  background: white;
}

.placeholder {
  display: grid;
  gap: 8px;
  text-align: center;
}

.placeholder strong {
  color: var(--text);
  font-size: 1.05rem;
}

.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.promo-card { margin-top: 24px; }

.quick-links a {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(57, 255, 20, 0.05);
}

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

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

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

  .settings-grid,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .qr-stage {
    min-height: 320px;
    padding: 18px;
  }

  .button,
  .quick-links a {
    width: 100%;
  }
}
