:root {
  --bg: #f6f8fb;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #1b2430;
  --muted: #5a6575;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --border: #d9e2ec;
  --danger: #b42318;
  --success: #087443;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.28), transparent 35%),
    radial-gradient(circle at 82% 8%, rgba(251, 191, 36, 0.3), transparent 32%),
    linear-gradient(150deg, #f7fbff, #eef3f9);
}

.ambient {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}

.ambient-a {
  background: #2dd4bf;
  top: -80px;
  left: -90px;
}

.ambient-b {
  background: #fbbf24;
  right: -80px;
  top: 180px;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin: 42px auto 60px;
  display: grid;
  gap: 18px;
}

.hero {
  padding: 28px 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: reveal 420ms ease both;
}

.badge {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.panel {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: reveal 500ms ease both;
}

.panel:nth-of-type(2) {
  animation-delay: 50ms;
}

.panel:nth-of-type(3) {
  animation-delay: 100ms;
}

label {
  display: grid;
  gap: 8px;
  color: #2d3643;
  font-size: 14px;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.span-2 {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bec9d5;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.72);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
  background-color: #fff;
}

.toolbar {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.remember input {
  width: 16px;
  height: 16px;
  margin: 0;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(140deg, #0f766e, #0e9f95);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.3);
  filter: saturate(1.05);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
  box-shadow: none;
}

button.ghost {
  color: var(--text);
  background: #e6edf4;
}

button.ghost:hover {
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.13);
}

.status {
  margin-top: 2px;
  margin-bottom: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.status.muted {
  background: #ebf1f7;
  color: var(--muted);
}

.status.success {
  background: rgba(8, 116, 67, 0.12);
  color: var(--success);
}

.status.error {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.preview {
  margin: 0;
  min-height: 180px;
  border-radius: 12px;
  border: 1px solid #d0dae5;
  background: #102238;
  color: #eef6ff;
  padding: 14px;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(720px, 94vw);
    margin-top: 22px;
  }

  .hero,
  .panel {
    padding: 16px;
    border-radius: 14px;
  }

  .toolbar {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
