/* === STATS CARD CONTAINER === */
/* Main container for the stats area */

#stats {
  margin: 4px 0 var(--space-md) 0;
  width: 95%;
  max-width: var(--grid-max-width);
  text-align: center;
}

.stats-card {
  background-color: var(--storybook-parchment-dark);
  border-radius: var(--radius-2xl);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 6px 12px;
  box-sizing: border-box;
  position: relative;
  border: var(--border-width-md) solid var(--card-border);
}

/* Level title */
.stats-card h2 {
  margin: 0 0 2px;
  font-size: var(--font-3xl);
  font-family: 'Bubblegum Sans', cursive;
  color: var(--storybook-brown-deep);
  text-shadow: 1px 1px 0 rgba(212, 175, 55, 0.3);
}

/* Stats row - hearts, timer, score */
.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2px 0 0;
  margin-top: 2px;
  gap: var(--space-sm);
}

/* Individual stat item */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hint button container */
.stat-hint {
  flex: 0 0 auto;
}

.stat-hint:has(#hint-button.hidden) {
  display: none;
}

#hint-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--storybook-cream);
  border: 2px solid var(--storybook-gold-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hint-button:hover {
  background: var(--storybook-gold-highlight);
  transform: scale(1.1);
}

#hint-button.hidden {
  display: none;
}

/* Mobile layout */
@media (max-width: 480px) {
  .stats-card {
    padding: var(--space-xs) var(--space-sm);
  }

  .stats-card h2 {
    font-size: var(--font-2xl);
  }

  .stats-row {
    gap: var(--space-xs);
    padding: var(--space-xs) 0 0;
  }
}

@media (max-width: 360px) {
  .stats-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-hearts {
    order: 3;
    width: 100%;
    margin-top: var(--space-xs);
  }
}
