:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --card: rgba(255, 255, 255, 0.94);
  --ink: #0f172a;
  --muted: #475569;
  --accent: #6d5efc;
  --accent-2: #22d3ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: radial-gradient(130% 130% at 50% 0%, #16233f 0%, #0b1120 55%, #060911 100%);
  overflow-x: hidden;
}

/* Bokeh backdrop: soft, blurred lens light-spots drifting behind the card. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  filter: blur(70px) saturate(130%);
  mix-blend-mode: screen;
}

body::before {
  background:
    radial-gradient(18% 22% at 20% 30%, rgba(109, 94, 252, 0.55), transparent 70%),
    radial-gradient(14% 18% at 74% 22%, rgba(34, 211, 238, 0.5), transparent 70%),
    radial-gradient(20% 24% at 60% 72%, rgba(236, 72, 153, 0.45), transparent 72%),
    radial-gradient(10% 14% at 38% 84%, rgba(250, 204, 21, 0.4), transparent 70%);
  animation: bokeh-drift 22s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(12% 16% at 82% 62%, rgba(59, 130, 246, 0.45), transparent 70%),
    radial-gradient(16% 20% at 30% 58%, rgba(16, 185, 129, 0.4), transparent 72%),
    radial-gradient(10% 12% at 68% 40%, rgba(255, 255, 255, 0.35), transparent 70%);
  animation: bokeh-drift-2 28s ease-in-out infinite alternate;
}

@keyframes bokeh-drift {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); opacity: 0.75; }
  100% { transform: translate3d(5%, 3%, 0) scale(1.15); opacity: 1; }
}

@keyframes bokeh-drift-2 {
  0%   { transform: translate3d(4%, 3%, 0) scale(1.1); opacity: 0.6; }
  100% { transform: translate3d(-5%, -3%, 0) scale(1); opacity: 0.9; }
}

main {
  position: relative;
  width: min(100% - 2rem, 32rem);
  padding: 2.25rem 2rem 2rem;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1.25rem;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

/* Colour-spectrum accent bar along the top edge — an imaging nod. */
main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    #ef4444, #f59e0b, #eab308, #22c55e, #22d3ee, #6d5efc, #ec4899
  );
}

h1 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  /* Subtle RGB chromatic aberration, like a misaligned colour channel. */
  text-shadow: -1.5px 0 rgba(239, 68, 68, 0.45), 1.5px 0 rgba(34, 211, 238, 0.45);
}

p {
  line-height: 1.55;
  color: #1f2937;
}

form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

label {
  font-weight: 600;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.2);
}

button,
.button {
  display: inline-block;
  padding: 0.9rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 45%, var(--accent-2) 100%);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(109, 94, 252, 0.45);
  filter: brightness(1.05);
}

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

.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1rem;
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: #f1f5f9;
}

.summary dt {
  font-weight: 600;
  color: var(--muted);
}

.summary dd {
  margin: 0;
}

.preview {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 1.25rem 0;
  border-radius: 0.85rem;
  border: 1px solid #cbd5e1;
  background:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%) -8px 0 / 16px 16px,
    #f8fafc;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.25);
}

.notice {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fef3c7;
  color: #92400e;
}

a {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}
