:root {
  color-scheme: dark;
  --bg: #080812;
  --fg: #ffffff;
  --muted: #b6bad2;
  --line: rgba(255, 255, 255, 0.18);
  --hot: #ff2f8b;
  --cyan: #1fe7ff;
  --orange: #ff9d29;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--fg);
  background:
    radial-gradient(circle at 85% 80%, rgba(255, 47, 139, 0.3), transparent 34%),
    radial-gradient(circle at 12% 15%, rgba(31, 231, 255, 0.24), transparent 32%),
    linear-gradient(135deg, #080812 0%, #11112a 52%, #05050b 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 20%, rgba(255, 47, 139, 0.18) 20.4%, transparent 21.2%),
    linear-gradient(115deg, transparent 0 68%, rgba(31, 231, 255, 0.2) 68.4%, transparent 69%),
    radial-gradient(circle at 76% 22%, rgba(255, 157, 41, 0.2), transparent 12%);
  opacity: 0.9;
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
  width: min(1040px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.intro {
  max-width: 560px;
}

.mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 32px rgba(31, 231, 255, 0.25),
    inset 0 0 24px rgba(255, 47, 139, 0.14);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

h1 {
  margin: 0;
  max-width: 8ch;
  font-size: clamp(64px, 10vw, 124px);
  line-height: 0.86;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro p {
  max-width: 440px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.18;
}

.submit-card {
  display: grid;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 10, 24, 0.74);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.submit-card[data-state="success"] {
  border-color: rgba(157, 255, 202, 0.36);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.38),
    0 0 54px rgba(31, 231, 255, 0.14),
    0 0 86px rgba(255, 47, 139, 0.12);
}

.submit-form,
.success-panel {
  min-height: inherit;
  padding: 28px;
}

.submit-form {
  display: grid;
  gap: 14px;
}

label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #eef1ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0 16px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  outline: none;
}

input[type="file"] {
  min-height: 62px;
  height: auto;
  padding: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #070711;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

input:focus {
  border-color: rgba(31, 231, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(31, 231, 255, 0.16);
}

button {
  height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  color: #070711;
  background: linear-gradient(90deg, var(--cyan), var(--hot) 55%, var(--orange));
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
}

.secondary-button {
  width: min(100%, 190px);
  height: 48px;
  margin: 12px auto 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.3);
  opacity: 0.7;
}

.note,
.file-hint,
.status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.file-hint {
  margin-top: -8px;
}

.status {
  min-height: 20px;
  color: #ffffff;
}

.status[data-tone="success"] {
  color: #9dffca;
}

.status[data-tone="error"] {
  color: #ff9bb8;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.success-panel {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  isolation: isolate;
  animation: successIn 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-panel[hidden],
.submit-form[hidden] {
  display: none;
}

.success-panel::before,
.success-panel::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.success-panel::before {
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(157, 255, 202, 0.28), transparent 42%),
    radial-gradient(circle at 70% 30%, rgba(31, 231, 255, 0.28), transparent 35%),
    radial-gradient(circle at 28% 72%, rgba(255, 47, 139, 0.24), transparent 38%);
  filter: blur(10px);
  animation: haloPulse 1.9s ease-out infinite;
}

.success-panel::after {
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 32%, rgba(31, 231, 255, 0.2) 33%, transparent 35%),
    linear-gradient(120deg, transparent 0 60%, rgba(255, 47, 139, 0.18) 61%, transparent 63%);
  animation: streakSweep 1.4s ease-out both;
}

.success-orbit {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.success-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(31, 231, 255, 0.52);
  border-radius: 999px;
  box-shadow:
    0 0 30px rgba(31, 231, 255, 0.32),
    inset 0 0 34px rgba(255, 47, 139, 0.2);
  animation: ringPop 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-ring-secondary {
  inset: 16px;
  border-color: rgba(255, 47, 139, 0.48);
  animation-delay: 120ms;
}

.success-check {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.98), rgba(157, 255, 202, 0.95) 42%, rgba(31, 231, 255, 0.92));
  box-shadow:
    0 0 34px rgba(157, 255, 202, 0.46),
    0 0 68px rgba(31, 231, 255, 0.26);
  transform: scale(0.72);
  animation: checkBubble 620ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

.success-check path {
  fill: none;
  stroke: #071014;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
  stroke-dasharray: 58;
  stroke-dashoffset: 58;
  animation: drawCheck 520ms ease-out 480ms both;
}

.success-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(42px, 6vw, 62px);
  line-height: 0.9;
  letter-spacing: 0;
}

.success-panel p {
  max-width: 250px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.25;
}

@keyframes successIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes haloPulse {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.86;
    transform: scale(1.04);
  }
}

@keyframes streakSweep {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ringPop {
  0% {
    opacity: 0;
    transform: scale(0.58) rotate(-18deg);
  }
  72% {
    opacity: 1;
    transform: scale(1.08) rotate(7deg);
  }
  100% {
    opacity: 0.82;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes checkBubble {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-10deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.08) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .success-panel,
  .success-panel::before,
  .success-panel::after,
  .success-ring,
  .success-check,
  .success-check path {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
    align-content: center;
    width: min(100% - 28px, 460px);
    gap: 34px;
    padding: 34px 0;
  }

  .mark {
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    font-size: 34px;
  }

  h1 {
    font-size: clamp(58px, 20vw, 82px);
  }

  .intro p {
    margin-top: 20px;
    font-size: 20px;
  }

  .submit-card {
    min-height: 404px;
  }

  .submit-form,
  .success-panel {
    padding: 20px;
  }

  .success-orbit {
    width: 116px;
    height: 116px;
  }

  .success-check {
    width: 76px;
    height: 76px;
  }
}
