/* Sort My Shapes — tap-shape-then-tap-bin sorting game */

.sms-setup { display: flex; flex-direction: column; gap: 18px; }
.sms-setup h3 { margin: 0 0 8px; font-size: 1.05rem; }

.sms-pick-row { display: flex; flex-wrap: wrap; gap: 10px; }

.sms-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  min-width: 170px;
  text-align: left;
}
.sms-pick strong { font-size: 1rem; }
.sms-pick small { color: var(--color-text-soft); }
.sms-pick[aria-pressed="true"] { border-color: var(--color-primary); background: rgba(79, 216, 224, 0.12); }
.sms-pick:disabled { opacity: 0.45; cursor: not-allowed; }

.sms-start-btn { align-self: flex-start; margin-top: 4px; }

.sms-rewards { font-size: 0.85rem; color: var(--color-text-soft); }
.sms-rewards strong { color: var(--color-text); }

.sms-play { display: flex; flex-direction: column; gap: 14px; }

.sms-banner {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
}

.sms-bin-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.sms-bin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 3px dashed var(--color-border);
  background: var(--color-bg-alt);
  cursor: pointer;
  min-width: 78px;
}
.sms-bin:hover { border-color: var(--color-primary); }
.sms-bin-label { font-size: 0.78rem; font-weight: 700; color: var(--color-text-soft); }
.sms-bin--wrong { animation: sms-wobble 0.4s ease; border-color: #ef5350; }

.sms-field {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 26px;
  border-radius: 18px;
  min-height: 130px;
  background: linear-gradient(180deg, rgba(79, 216, 224, 0.12), rgba(255, 202, 40, 0.1));
  border: 1px solid var(--color-border);
}
.sms-field.sms-scene-garden { background: linear-gradient(180deg, rgba(102, 187, 106, 0.2), rgba(255, 241, 118, 0.14)); }
.sms-field.sms-scene-beach { background: linear-gradient(180deg, rgba(255, 224, 130, 0.22), rgba(79, 195, 247, 0.16)); }
.sms-field.sms-scene-space { background: linear-gradient(180deg, rgba(69, 39, 160, 0.22), rgba(13, 27, 42, 0.2)); }

.sms-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  border: 3px solid transparent;
  background: var(--color-surface);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.sms-tile:hover { transform: translateY(-2px); }
.sms-tile--selected { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(79, 216, 224, 0.2); }
.sms-tile--wrong { animation: sms-wobble 0.4s ease; }
.sms-tile--sorted { opacity: 0; transform: scale(0.2); }

@keyframes sms-wobble {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-6px) rotate(-4deg); }
  40% { transform: translateX(5px) rotate(3deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(3px) rotate(1deg); }
}

/* Plain CSS shapes -- render identically everywhere, unlike emoji */
.sms-shape { display: inline-block; width: 40px; height: 40px; }
.sms-shape--circle { border-radius: 50%; }
.sms-shape--square { border-radius: 6px; }
.sms-shape--rectangle { width: 52px; height: 30px; border-radius: 6px; }
.sms-shape--triangle { width: 44px; height: 40px; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.sms-shape--star { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sms-shape--diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }

.sms-progress { color: var(--color-text-soft); font-size: 0.95rem; text-align: center; }
.sms-progress strong { color: var(--color-text); }

.sms-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
