/* /css/pickle-briner.css */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#game-timer.shake-timer {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Objectives Panel (Left) */
#objectives-area::-webkit-scrollbar { width: 6px; }
#objectives-area::-webkit-scrollbar-track { background: #0f172a; } /* slate-900 */
#objectives-area::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; } /* slate-600 */
#objectives-area::-webkit-scrollbar-thumb:hover { background: #64748b; } /* slate-500 */

.objective-item {
  background-color: #1e293b; /* slate-800 */
  border: 2px solid #334155; /* slate-700 */
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.objective-icon {
  font-size: 2.5rem;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.3s ease;
  flex-shrink: 0; /* Prevent icon from shrinking */
  width: 40px; /* Give icon a consistent width */
  text-align: center;
}

.objective-item.solved {
  opacity: 1;
  border-color: #f59e0b; /* amber-500 */
  background: linear-gradient(145deg, #422006, #2d1603);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.7);
}

.objective-item.solved .objective-icon {
  filter: none;
  transform: scale(1.1);
  text-shadow: 0 0 10px #fde047; /* yellow-200 */
}


/* Unlocked Inventory Panel (Right) */
#unlocked-inventory::-webkit-scrollbar { width: 6px; }
#unlocked-inventory::-webkit-scrollbar-track { background: #0f172a; }
#unlocked-inventory::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
#unlocked-inventory::-webkit-scrollbar-thumb:hover { background: #64748b; }

.inventory-item {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* 12px */
  background: #1e293b; /* slate-800 */
  padding: 0.5rem;
  border-radius: 0.375rem; /* 6px */
}

.inventory-item .emoji {
  font-size: 1.75rem; /* 28px */
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.inventory-item .name {
  font-weight: bold;
  color: #e2e8f0; /* slate-200 */
}

.inventory-item .desc {
  font-size: 0.8rem; /* 12px */
  color: #94a3b8; /* slate-400 */
  line-height: 1.3;
}


/* Available Items Grid (Middle) */
#available-items-grid {
    /* Using flex-wrap with gap controlled by Tailwind on parent. */
    /* Child .item-card will define its own width. */
    /* content-start and items-start are applied via Tailwind classes. */
    /* gap-1 (0.25rem) is applied via Tailwind on this element for spacing. */
}

#available-items-grid .item-card {
  aspect-ratio: 1 / 1;
  background-color: #1e293b; /* slate-800 */
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid #334155;
  /* Widths for flexbox layout, considering parent's gap-1 (0.25rem) */
  /* For 4 columns by default */
  width: calc(25% - 0.1875rem); /* (100% / 4) - (3/4 * gap) approx */
}
@media (min-width: 640px) { /* sm breakpoint, for 5 columns */
  #available-items-grid .item-card {
    width: calc(20% - 0.2rem); /* (100% / 5) - (4/5 * gap) approx */
  }
}

#available-items-grid .item-card:hover {
  transform: scale(1.1);
  background-color: #475569;
  z-index: 10;
}

#available-items-grid .item-card.selected {
  border-color: #67e8f9; /* cyan-300 */
  box-shadow: 0 0 10px #67e8f9;
  transform: scale(1.05);
  background-color: #0e7490;
}

#available-items-grid .item-card.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
  background-color: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
#available-items-grid .item-card.disabled:hover {
  background-color: #1e293b;
}

/* Potential Unlock & Minigame */
#combine-button {
    transition: all 0.2s ease-in-out;
}
#combine-button.can-combine {
    background-color: #10b981; /* emerald-500 */
    box-shadow: 0 0 15px 3px rgba(16, 185, 129, 0.6);
    transform: scale(1.03);
}

#potential-unlock-area {
    min-height: 8rem; /* Increased from 7.5rem (h-30 to h-32 equivalent) */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* Ensure text inside is centered if it wraps */
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.2s;
    width: 100%; /* Ensure it takes full width of its parent */
    /* mb-2 is applied via Tailwind class in HTML for spacing */
}

#potential-unlock-area .unlock-preview {
  opacity: 0.5;
  filter: grayscale(50%);
  /* Ensure preview content is also centered */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#potential-unlock-area .unlock-emoji {
  font-size: 3rem; /* Emoji size for normal preview */
}
#potential-unlock-area .unlock-name {
  font-size: 1rem;
  color: #94a3b8; /* slate-400 */
  margin-top: 0.25rem; /* Add a little space between emoji and name */
}

/* Flash animation for success/fail */
#potential-unlock-area.flash-success,
#potential-unlock-area.flash-fail {
    animation: flash-fade 1.5s ease-out forwards;
}

#potential-unlock-area.flash-success {
    background-color: rgba(16, 185, 129, 0.9); /* emerald-500 with opacity */
}

#potential-unlock-area.flash-fail {
    background-color: rgba(239, 68, 68, 0.9); /* red-500 with opacity */
}

#potential-unlock-area.flash-success > div,
#potential-unlock-area.flash-fail > div {
    /* Style for the inner div created by JS for flash messages */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
#potential-unlock-area.flash-success .flash-text,
#potential-unlock-area.flash-fail .flash-text {
    font-weight: bold;
    font-size: 1.875rem; /* text-3xl */
}
#potential-unlock-area.flash-success .flash-emoji,
#potential-unlock-area.flash-fail .flash-emoji {
    font-size: 3.75rem; /* text-6xl */
    margin-top: 0.25rem;
}


@keyframes flash-fade {
  0% { opacity: 1; transform: scale(1.05); }
  80% { opacity: 1; transform: scale(1.05); } /* Hold the flash for a bit */
  100% { opacity: 0; transform: scale(1); }
}


#minigame-container.active {
    border-color: #f59e0b;
}

.moving-item {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  user-select: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

/* Score Chart */
#score-chart-container .score-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #334155;
}
#score-chart-container .score-row:last-child { border-bottom: none; }
#score-chart-container .score-total {
    border-top: 2px solid #475569;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-weight: bold;
    font-size: 1.25rem;
}