:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(16, 20, 29, 0.78);
  --panel-strong: rgba(23, 29, 42, 0.94);
  --text: #eef4ff;
  --muted: #96a2b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #75f5b4;
  --accent-2: #76a9ff;
  --danger: #ff7d8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(117, 245, 180, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(118, 169, 255, 0.2), transparent 30rem),
    linear-gradient(135deg, #07090d 0%, #0a0f18 55%, #080a10 100%);
  color: var(--text);
}

.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 54px; }
.hero { padding: 42px 0 30px; max-width: 880px; }
.badge { display: inline-flex; border: 1px solid var(--line); background: rgba(255,255,255,.05); border-radius: 999px; padding: 8px 12px; color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
h1 { font-size: clamp(38px, 7vw, 78px); line-height: .92; letter-spacing: -0.07em; margin: 18px 0; }
h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
p { color: var(--muted); line-height: 1.6; }
.hero p { max-width: 720px; font-size: 18px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(20px); box-shadow: var(--shadow); border-radius: 28px; padding: 22px; }
.gate { max-width: 560px; }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head p { margin: 4px 0 0; }
label { display: grid; gap: 8px; color: #dbe5f7; font-weight: 700; font-size: 14px; margin: 14px 0; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.24); color: var(--text); padding: 14px 15px; font: inherit; outline: none;
}
textarea { resize: vertical; min-height: 150px; }
input:focus, textarea:focus, select:focus { border-color: rgba(117,245,180,.65); box-shadow: 0 0 0 4px rgba(117,245,180,.08); }
.two, .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row { grid-template-columns: 1fr auto; align-items: end; }
button, .button { border: 0; border-radius: 16px; padding: 14px 18px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; transition: transform .2s ease, opacity .2s ease; }
button:hover, .button:hover { transform: translateY(-1px); }
.primary { width: 100%; margin-top: 8px; color: #06100b; background: linear-gradient(135deg, var(--accent), #caffdd); }
button:not(.primary), .button { color: #06100b; background: var(--accent); }
.ghost { background: rgba(255,255,255,.08) !important; color: var(--text) !important; border: 1px solid var(--line); }
.secondary { background: rgba(255,255,255,.1); color: var(--text); border: 1px solid var(--line); }
.hint { font-size: 13px; margin-bottom: 0; }
.preview { min-height: 390px; border-radius: 22px; border: 1px dashed rgba(255,255,255,.16); background: rgba(0,0,0,.24); display: grid; place-items: center; overflow: hidden; color: var(--muted); text-align: center; }
.preview.loading { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(117,245,180,.12), rgba(255,255,255,.05)); background-size: 200% 100%; animation: sweep 1.25s infinite linear; }
.preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tips { margin-top: 18px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.05); color: var(--muted); }
.tips strong { color: var(--text); }
.tips ul { padding-left: 20px; margin-bottom: 0; }
.error { color: var(--danger); }
.success { color: var(--accent); }
@keyframes sweep { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .shell { width: min(100% - 18px, 680px); padding-top: 20px; }
  .grid, .two, .row { grid-template-columns: 1fr; }
  h1 { font-size: clamp(42px, 15vw, 64px); }
  .panel { border-radius: 22px; padding: 17px; }
  .preview { min-height: 300px; }
  .section-head { flex-direction: column; }
}
