:root {
  color-scheme: dark;
  --bg: #080a12;
  --surface: rgba(18, 21, 36, 0.82);
  --surface-strong: rgba(25, 28, 48, 0.94);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(167, 139, 250, 0.32);
  --text: #f7f7fb;
  --muted: #a7a9bc;
  --purple: #8b5cf6;
  --purple-light: #b794ff;
  --cyan: #5eead4;
  --danger: #fca5a5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 92, 246, 0.18), transparent 38%),
    linear-gradient(180deg, #0d0f1a 0%, #080a12 62%, #06070c 100%);
}

button,
select,
input,
a {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-one {
  top: 8%;
  right: -12rem;
  background: #8b5cf6;
}

.ambient-two {
  bottom: -15rem;
  left: -10rem;
  background: #0ea5e9;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 30px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 820px;
  margin-bottom: 34px;
}

.logo {
  flex: 0 0 auto;
  border-radius: 28px;
  box-shadow: 0 18px 55px rgba(91, 50, 205, 0.36);
}

.eyebrow,
.step {
  margin: 0 0 8px;
  color: var(--purple-light);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.8;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 17px;
  border: 1px solid rgba(252, 165, 165, 0.28);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 0.82fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.settings-panel {
  padding: 26px;
}

.preview-panel {
  position: sticky;
  top: 22px;
  padding: 26px;
  background: var(--surface-strong);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-heading.compact {
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.08);
  color: #99f6e4;
  font-size: 0.74rem;
  white-space: nowrap;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field > span,
.url-field > span {
  color: #e6e6ef;
  font-size: 0.9rem;
  font-weight: 700;
}

.field small {
  min-height: 2.6em;
  color: #85889d;
  font-size: 0.75rem;
  line-height: 1.55;
}

select,
input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(7, 9, 18, 0.72);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

select {
  padding: 0 14px;
  cursor: pointer;
}

input {
  padding: 0 14px;
  direction: ltr;
  text-align: left;
  color: #cfd0dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

select:focus,
input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.preview-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 17px;
  align-items: center;
  min-height: 142px;
  padding: 18px;
  border: 1px solid rgba(183, 148, 255, 0.17);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(14, 165, 233, 0.05)),
    rgba(8, 10, 19, 0.7);
}

.preview-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -85px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  filter: blur(45px);
}

.preview-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 106px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(145deg, #7c3aed, #312e81);
  box-shadow: 0 18px 30px rgba(38, 16, 87, 0.4);
}

.die {
  font-size: 3.4rem;
  line-height: 1;
}

.play {
  position: absolute;
  bottom: 8px;
  left: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  color: #5b21b6;
  font-size: 0.72rem;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}

.preview-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.preview-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.preview-copy h3 {
  margin-bottom: 9px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.preview-meta {
  margin-bottom: 0;
  color: #aeb0c2;
  font-size: 0.76rem;
  line-height: 1.65;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  box-shadow: 0 14px 30px rgba(109, 40, 217, 0.28);
}

.button-primary:hover {
  box-shadow: 0 18px 36px rgba(109, 40, 217, 0.38);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #ececf5;
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.06);
}

.url-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.status {
  min-height: 22px;
  margin-top: 10px;
  color: #99f6e4;
  font-size: 0.78rem;
  line-height: 1.55;
}

.privacy-note {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.privacy-note strong {
  color: #e8e8f1;
}

.privacy-note p {
  margin: 5px 0 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px 0;
  color: #686b7e;
  font-size: 0.72rem;
}

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

  .preview-panel {
    position: static;
  }
}

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

  .hero {
    align-items: flex-start;
    gap: 16px;
  }

  .logo {
    width: 74px;
    height: 74px;
    border-radius: 20px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .lead {
    font-size: 0.92rem;
  }

  .settings-panel,
  .preview-panel {
    padding: 19px;
    border-radius: 20px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field small {
    min-height: auto;
  }

  .panel-heading {
    flex-direction: column;
  }

  .preview-card {
    grid-template-columns: 76px 1fr;
    padding: 14px;
  }

  .preview-art {
    width: 76px;
    height: 94px;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

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