.picture-picker-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 210, 77, 0.34), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(45, 212, 191, 0.3), transparent 30%),
    linear-gradient(135deg, #fff7ed 0%, #e0f2fe 48%, #ecfdf5 100%);
  color: #17324d;
}

.picture-picker-app {
  min-height: 100vh;
  padding: clamp(10px, 3vw, 24px);
}

.picture-picker-card {
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 12% 18%, rgba(254, 240, 138, 0.55), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(125, 211, 252, 0.45), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 249, 255, 0.92));
  box-shadow: 0 24px 70px rgba(17, 55, 91, 0.18);
}

.picture-picker-stage {
  position: relative;
  display: grid;
  gap: clamp(10px, 2vw, 16px);
  padding: clamp(10px, 3vw, 24px);
}

.picture-picker-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.picture-picker-stats .stat-pill {
  min-height: 36px;
  border: 1px solid rgba(24, 79, 126, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #1f3a5a;
  font-weight: 800;
}

.picture-picker-tries span:last-child {
  color: #e11d48;
}

.picture-picker-prompt {
  width: fit-content;
  margin: 0 auto;
  padding: 0 8px;
  text-align: center;
  font-size: clamp(19px, 3vw, 28px);
  font-weight: 1000;
  line-height: 1.12;
  color: #f97316;
  letter-spacing: 0.01em;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(251, 146, 60, 0.24);
}

.picture-picker-word {
  width: min(100%, 620px);
  min-height: clamp(58px, 11vw, 96px);
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 4px 14px;
  color: #10233f;
  font-size: clamp(40px, 9vw, 82px);
  font-weight: 1000;
  line-height: 1.02;
  text-align: center;
  overflow-wrap: anywhere;
  letter-spacing: 0.03em;
  text-shadow:
    0 3px 0 rgba(255, 255, 255, 0.95),
    0 12px 26px rgba(15, 50, 80, 0.18);
}

.picture-picker-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 16px);
  width: min(100%, 760px);
  margin: 0 auto;
}

.picture-choice {
  display: grid;
  place-items: center;
  min-height: 154px;
  aspect-ratio: 1 / 1;
  border: 3px solid rgba(30, 92, 140, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px rgba(20, 55, 86, 0.14);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.picture-choice:hover:not(:disabled),
.picture-choice:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: #38bdf8;
  box-shadow: 0 18px 34px rgba(14, 116, 144, 0.22);
  outline: none;
}

.picture-choice img {
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(17, 45, 70, 0.16));
  pointer-events: none;
}

.picture-choice.is-locked {
  cursor: default;
}

.picture-choice.is-correct {
  border-color: #22c55e;
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
  animation: picture-picker-correct 560ms ease both;
}

.picture-choice.is-wrong {
  border-color: #f43f5e;
  background: linear-gradient(180deg, #ffe4e6, #fecdd3);
  animation: picture-picker-wrong 360ms ease both;
}

.picture-picker-feedback {
  min-height: 34px;
  text-align: center;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 900;
  color: #31506c;
}

.picture-picker-feedback.is-good {
  color: #15803d;
}

.picture-picker-feedback.is-warn {
  color: #be123c;
}

.picture-picker-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(6px);
  z-index: 20;
}

.picture-picker-loading[hidden] {
  display: none;
}

.picture-picker-loading-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(280px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 50, 80, 0.16);
  color: #17324d;
  font-weight: 900;
  text-align: center;
}

.picture-picker-loader {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 6px solid #dbeafe;
  border-top-color: #0ea5e9;
  animation: picture-picker-spin 820ms linear infinite;
}

body.pvp-searching .picture-picker-stage {
  filter: grayscale(0.8);
}

body.pvp-searching .picture-picker-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 12;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

#activeAvatarContainer {
  position: fixed;
  right: max(10px, calc((100vw - 980px) / 2 + 12px));
  bottom: 10px;
  z-index: 30;
  pointer-events: none;
  transform: scale(0.62);
  transform-origin: bottom right;
  opacity: 0.94;
}

#activeAvatarContainer .player-avatar-img {
  width: 118px;
  max-height: 150px;
  object-fit: contain;
  opacity: 1;
}

#activeAvatarContainer.picture-picker-avatar-success {
  animation: picture-picker-avatar-success 1.2s ease both;
}

@keyframes picture-picker-avatar-success {
  0% { transform: scale(0.62); opacity: 0.94; }
  35% { transform: scale(1.24) translateY(-18px); opacity: 1; }
  70% { transform: scale(0.86) translateY(-6px); opacity: 0.98; }
  100% { transform: scale(0.62); opacity: 0.94; }
}

@keyframes picture-picker-spin {
  to { transform: rotate(360deg); }
}

@keyframes picture-picker-correct {
  0% { transform: scale(1); }
  45% { transform: scale(1.07) rotate(-1deg); }
  100% { transform: scale(1); }
}

@keyframes picture-picker-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

@media (max-width: 620px) {
  .picture-picker-app {
    padding: 8px;
  }

  .picture-picker-stage {
    gap: 10px;
    padding: 10px;
  }

  .picture-picker-options,
  .picture-picker-options[data-option-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 340px);
  }

  .picture-choice {
    min-height: 132px;
  }

  .picture-choice img {
    width: 92%;
    height: 92%;
  }

  .picture-picker-word {
    min-height: 68px;
  }

  .topbar-title {
    font-size: 34px;
    line-height: 1.05;
  }
}


