:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --success: #10b981;
  --error: #ef4444;
  --focus: #fde68a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 30% 10%, #ffb84d 0%, #f97316 55%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}

.app-header { padding: 24px 16px 8px; text-align: center; }
.app-title { margin: 0 0 4px; font-weight: 800; letter-spacing: 0.3px; }
.app-subtitle { margin: 0; color: var(--muted); }
#app-logo { display: inline-block; height: 5.4rem; width: 5.4rem; }

/* Wave animation for title */
.wave { --sea1: #0b1f52; /* dark blue */ --sea2: #1e3a8a; /* indigo-800 */ --sea3: #93c5fd; /* light blue */ }
.wave span {
  display: inline-block;
  background: linear-gradient(90deg, var(--sea1), var(--sea2), var(--sea3), var(--sea1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wave 1400ms ease-in-out infinite, waveColor 3000ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 45ms), calc(var(--i) * 30ms);
}
@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes waveColor {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .wave span { animation: none; }
}

.app { max-width: 1100px; margin: 0 auto; padding: 16px; }
.controls { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin: 8px 0 16px; }



.btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b1020;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.btn:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.game { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 840px) {
  .game { grid-template-columns: 1fr 1fr; }
}

.section-title { margin: 0 0 8px; color: var(--muted); font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; }

.tray, .targets {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px;
}

.draggables, .dropzones { display: grid; gap: 12px; }
.draggables { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.dropzones { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
}

.img-card { cursor: grab; user-select: none; }
.img-card:active { cursor: grabbing; }
.img-wrapper { width: 100px; height: 100px; display: grid; place-items: center; }
.img-wrapper img { max-width: 100%; max-height: 100%; display: block; }

/* Inner neutral canvas to avoid blending with box */
.img-canvas {
  width: 88px; height: 88px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  display: grid; place-items: center;
}
.img-canvas img { max-width: 80px; max-height: 80px; }

/* Enhanced picture presentation */
.img-wrapper {
  background: radial-gradient(120px 120px at 50% 40%, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 2px solid var(--accent-img, rgba(255,255,255,0.18));
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25), 0 0 0 3px color-mix(in oklab, var(--accent-img, #22d3ee) 30%, transparent), inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.img-card:hover .img-wrapper, .img-card:focus-within .img-wrapper {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.img-wrapper img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  transition: transform 160ms ease;
}
.img-card:hover .img-wrapper img, .img-card:focus-within .img-wrapper img {
  transform: scale(1.06);
}

@media (min-width: 840px) {
  .img-wrapper { width: 120px; height: 120px; }
  .img-canvas { width: 104px; height: 104px; }
  .img-canvas img { max-width: 92px; max-height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .img-wrapper, .img-wrapper img { transition: none; }
}

.dropzone { position: relative; min-height: 68px; }
.dropzone .label { font-weight: 800; font-size: 18px; letter-spacing: 0.3px; }

.dropzone[data-accept]:not([data-filled="true"]) {
  outline: 2px dashed color-mix(in oklab, var(--accent-dz, rgba(255,255,255,0.6)) 55%, transparent);
  outline-offset: -6px;
}

.dropzone.dragover { background: rgba(255, 255, 255, 0.04); border-color: var(--accent); }

.dropzone.correct { border-color: rgba(16,185,129,0.6); box-shadow: 0 0 0 3px rgba(16,185,129,0.2) inset; }
.dropzone.incorrect { border-color: rgba(239,68,68,0.6); box-shadow: 0 0 0 3px rgba(239,68,68,0.2) inset; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.status { min-height: 28px; margin-top: 8px; color: var(--muted); }
.status strong { color: var(--text); }
/* Bottom check button */
.footer-check { display: flex; justify-content: center; padding: 16px 0 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
}
.pill.success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.35); }
.pill.error { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.35); }

/* Focus styles */
[tabindex]:focus, button:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}




