*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --depop-red: #ff2300;
  --depop-black: #111111;
  --depop-gray-900: #2b2b2b;
  --depop-gray-600: #666666;
  --depop-gray-400: #999999;
  --depop-gray-200: #e6e6e6;
  --depop-gray-100: #f5f5f5;
  --depop-white: #ffffff;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--depop-white);
  color: var(--depop-black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  filter: hue-rotate(1deg);
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite;
}

.orb-a {
  top: -120px;
  left: 50%;
  width: 360px;
  height: 360px;
  margin-left: -180px;
  background: rgba(255, 35, 0, 0.12);
}

.orb-b {
  right: -80px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  background: rgba(255, 35, 0, 0.07);
  animation-delay: -5s;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.shell {
  width: 100%;
  max-width: 460px;
}

.anim {
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}

.top {
  display: flex;
  justify-content: center;
  margin-bottom: 42px;
}

.logo {
  display: block;
  width: 132px;
  height: auto;
  animation: logo-float 4.5s ease-in-out infinite;
}

.content {
  padding: 34px 30px 28px;
  border: 1px solid var(--depop-gray-200);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 35, 0, 0.07);
  color: var(--depop-red);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--depop-red);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--depop-gray-600);
}

.challenge {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid #d8d8d8;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfcfc 0%, #f7f7f7 100%);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  animation:
    fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    idle-glow 2.8s ease-in-out infinite;
  animation-delay: var(--d, 0ms), 1.2s;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease,
    background 0.22s ease;
}

.challenge:hover:not(:disabled) {
  border-color: #cfcfcf;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
  transform: translateY(-2px);
}

.challenge:active:not(:disabled) {
  transform: translateY(0) scale(0.995);
}

.challenge-box {
  width: 30px;
  height: 30px;
  border: 2px solid #bdbdbd;
  border-radius: 7px;
  background: var(--depop-white);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.challenge:hover:not(:disabled) .challenge-box {
  transform: scale(1.05);
  border-color: #a8a8a8;
}

.challenge-mark {
  width: 7px;
  height: 12px;
  border: solid transparent;
  border-width: 0 0 2.5px 2.5px;
  border-radius: 0;
  background: transparent;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.28s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.challenge-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.challenge-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--depop-gray-900);
  line-height: 1.25;
  transition: color 0.22s ease;
}

.challenge-sub {
  font-size: 13px;
  color: var(--depop-gray-400);
  line-height: 1.3;
  transition: color 0.22s ease;
}

.challenge-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--depop-gray-100);
  color: #777;
  flex-shrink: 0;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.challenge:hover:not(:disabled) .challenge-badge {
  transform: translateY(-1px);
  color: var(--depop-red);
  background: rgba(255, 35, 0, 0.08);
}

.challenge-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #ff2300, #ff6b4d);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--depop-gray-400);
}

.challenge.is-loading {
  pointer-events: none;
  border-color: #ffd5cc;
  background: #fff9f7;
  animation: none;
  transform: none;
}

.challenge.is-loading .challenge-box {
  border-color: transparent;
  background: conic-gradient(var(--depop-red) 0deg, #ffb8aa 130deg, #f3f3f3 260deg);
  animation: spin 0.85s linear infinite;
}

.challenge.is-loading .challenge-mark {
  transform: rotate(-45deg) scale(0);
}

.challenge.is-loading .challenge-title {
  color: var(--depop-gray-600);
}

.challenge.is-loading .challenge-sub {
  color: #b3b3b3;
}

.challenge.is-loading .challenge-progress {
  opacity: 1;
  animation: progress-fill 1.1s ease forwards;
}

.challenge.is-done {
  pointer-events: none;
  border-color: rgba(255, 35, 0, 0.35);
  background: #fff;
  box-shadow: 0 10px 28px rgba(255, 35, 0, 0.12);
  animation: success-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.challenge.is-done .challenge-box {
  border-color: var(--depop-red);
  background: var(--depop-red);
  animation: check-bounce 0.5s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.challenge.is-done .challenge-mark {
  border-color: #fff;
  transform: rotate(-45deg) scale(1);
}

.challenge.is-done .challenge-title {
  color: var(--depop-red);
}

.challenge.is-done .challenge-sub {
  color: #ea8a78;
}

.challenge.is-done .challenge-badge {
  background: rgba(255, 35, 0, 0.08);
  color: var(--depop-red);
  animation: badge-pop 0.45s cubic-bezier(0.34, 1.5, 0.64, 1) 0.1s both;
}

.challenge.is-done .challenge-progress {
  opacity: 1;
  width: 100%;
  background: var(--depop-red);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 12px) scale(1.06); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

@keyframes idle-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 35, 0, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 35, 0, 0.05); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes progress-fill {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes success-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

@keyframes check-bounce {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes badge-pop {
  from { transform: scale(0.7); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .content {
    padding: 26px 20px 22px;
  }

  h1 {
    font-size: 24px;
  }

  .lead {
    font-size: 15px;
  }

  .challenge {
    gap: 12px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim {
    opacity: 1;
    transform: none;
  }
}
