/* ==========================================================================
   Game 5: Place10 (Hundreds, Tens & Ones Place-Value Quest) Stylesheet
   ========================================================================== */

#place10-app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 20px 30px;
  gap: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Main Place10 Workspace Layout */
.place10-workspace {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1024px) {
  .place10-workspace {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Place-Value Arena (Delivery Dock + 3 Columns)
   ========================================================================== */

.place10-main-arena {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* 1. Animal Delivery Dock */
.delivery-dock-card {
  background: var(--bg-card);
  border: 2px solid rgba(0, 85, 191, 0.35);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.delivery-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.delivery-title-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-white);
}

.delivered-number-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 900;
  color: #00FFFF;
  letter-spacing: 2px;
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.35);
  animation: numberDropIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes numberDropIn {
  0% { transform: translateY(-30px) scale(0.6); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.delivery-prompt-text {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Staging Tray with Available Digits */
.digits-staging-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 50%, #172554 0%, #0c1527 80%);
  border: 3px dashed rgba(0, 210, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 90px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* ==========================================================================
   2. Three Place-Value Target Columns (Hundreds, Tens, Ones)
   ========================================================================== */

.place-value-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

@media (max-width: 680px) {
  .place-value-columns-grid {
    grid-template-columns: 1fr;
  }
}

.place-value-col {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.place-value-col:hover {
  transform: translateY(-2px);
}

/* Specific Column Themes */
.col-hundreds {
  border: 3px solid #8B5CF6;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}
.col-hundreds .col-header-badge {
  background: #8B5CF6;
  color: #FFFFFF;
}

.col-tens {
  border: 3px solid var(--lego-blue);
  box-shadow: 0 0 15px rgba(0, 85, 191, 0.25);
}
.col-tens .col-header-badge {
  background: var(--lego-blue);
  color: #FFFFFF;
}

.col-ones {
  border: 3px solid #10B981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}
.col-ones .col-header-badge {
  background: #10B981;
  color: #FFFFFF;
}

.col-header-badge {
  width: 100%;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.col-multiplier-sub {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Place Target Slot (Drop Zone) */
.place-target-slot {
  width: 88px;
  height: 88px;
  background: rgba(15, 23, 42, 0.9);
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.place-target-slot.drag-over {
  border-color: #00FFFF;
  background: rgba(0, 210, 255, 0.15);
  transform: scale(1.08);
}

.place-target-slot.slot-filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.6);
}

.place-target-slot.slot-correct {
  border-color: #00E676 !important;
  background: rgba(0, 230, 118, 0.2) !important;
  box-shadow: 0 0 25px #00E676 !important;
}

.place-target-slot.slot-wrong {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  box-shadow: 0 0 25px #EF4444 !important;
}

/* ==========================================================================
   Draggable & Tactile Digit Brick Cards
   ========================================================================== */

.place-digit-brick {
  width: 76px;
  height: 76px;
  background: radial-gradient(circle at 35% 35%, #F59E0B 0%, #B45309 100%);
  border: 3px solid #FDE047;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 6px 0 #78350F,
    0 10px 20px rgba(0, 0, 0, 0.6);
  cursor: grab;
  user-select: none;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
  z-index: 10;
}

.place-digit-brick::before,
.place-digit-brick::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  top: 6px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}
.place-digit-brick::before { left: 8px; }
.place-digit-brick::after { right: 8px; }

.place-digit-brick:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 
    0 10px 0 #78350F,
    0 16px 28px rgba(245, 158, 11, 0.5);
}

.place-digit-brick.selected-digit {
  border-color: #00FFFF !important;
  box-shadow: 
    0 0 0 3px #00FFFF,
    0 10px 25px rgba(0, 255, 255, 0.7),
    0 6px 0 #78350F !important;
  transform: translateY(-6px) scale(1.1) !important;
}

.place-digit-brick:active {
  cursor: grabbing;
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 2px 0 #78350F;
}

/* Placed in target slot styling */
.slot-filled .place-digit-brick {
  width: 72px;
  height: 72px;
  box-shadow: 0 4px 0 #78350F;
}

/* ==========================================================================
   Loss Animation: Digits Fall Off the Page Gravity Tumble
   ========================================================================== */

.anim-fall-off {
  animation: fallOffPage 1.1s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards !important;
  pointer-events: none;
}

@keyframes fallOffPage {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: translateY(-20px) rotate(-15deg) scale(1.05);
  }
  100% {
    transform: translateY(600px) rotate(180deg) scale(0.7);
    opacity: 0;
  }
}

/* ==========================================================================
   Win Animation: Selected Animal Jumps Up and Down 3 Times
   ========================================================================== */

.animal-jump-thrice {
  animation: jumpThrice 1.4s ease-in-out forwards !important;
}

@keyframes jumpThrice {
  0%, 100% {
    transform: translateY(0) scale(1, 1);
  }
  12% {
    transform: translateY(-45px) scale(0.9, 1.15);
  }
  24% {
    transform: translateY(0) scale(1.15, 0.85);
  }
  36% {
    transform: translateY(-50px) scale(0.9, 1.2);
  }
  48% {
    transform: translateY(0) scale(1.15, 0.85);
  }
  60% {
    transform: translateY(-55px) scale(0.85, 1.25);
  }
  72% {
    transform: translateY(0) scale(1.1, 0.9);
  }
  85% {
    transform: translateY(-10px) scale(0.98, 1.05);
  }
}

/* ==========================================================================
   Squirrel Hub Card in Main 12-Box Hub
   ========================================================================== */

#box-game-place10.active-game-box {
  background: linear-gradient(180deg, #2b1807 0%, #150c03 100%);
  border-color: #F97316;
  box-shadow: 
    0 6px 0 #C2410C,
    0 10px 25px rgba(249, 115, 22, 0.35),
    0 0 15px rgba(249, 115, 22, 0.3);
}

#box-game-place10.active-game-box:hover {
  border-color: #FB923C;
  box-shadow: 
    0 8px 0 #C2410C,
    0 16px 35px rgba(249, 115, 22, 0.6),
    0 0 30px rgba(251, 146, 60, 0.6);
}

#box-game-place10 .box-ribbon-badge {
  background: #F97316;
  color: #150c03;
}

.squirrel-avatar-stage {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
}

.squirrel-avatar-stage svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.active-game-box:hover .squirrel-avatar-stage {
  transform: scale(1.12) rotate(3deg);
}
