* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 1080px;
  font-family: Helvetica, Arial, sans-serif;
  background: #b2883f;
  color: #1f2933;
}

header {
  text-align: center;
  padding: 28px 18px 12px;
}

h1,
h2,
h3 {
  margin: 0;
}

.subtitle {
  margin: 10px auto 0;
  max-width: 560px;
  color: #52606d;
}

.pet-card,
.message-panel {
  width: min(920px, calc(100% - 32px));
  margin: 18px auto;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(31, 41, 51, 0.12);
}

.pet-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.pet-image-container {
  flex: 1 1 300px;
  text-align: center;
}

.pet-image {
  width: min(100%, 320px);
  border-radius: 24px;
  background: #fdf2d8;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.mood-pill {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #eefbf0;
  font-weight: 700;
}

.dashboard {
  flex: 1 1 320px;
}

.stat-row {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.button-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.action-button {
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  background: #2d6cdf;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.action-button:hover {
  transform: translateY(-2px);
}

.action-button:active {
  transform: scale(0.97);
}

.treat-button {
  background: #d97706;
}

.play-button {
  background: #2563eb;
}

.exercise-button {
  background: #059669;
}

.nap-button {
  background: #7c3aed;
}

.message-panel {
  padding: 22px;
  margin-bottom: 32px;
}

.pet-comment {
  margin-top: 14px;
  padding: 16px;
  border-left: 6px solid #2d6cdf;
  border-radius: 14px;
  background: #eff6ff;
  font-size: 1.05rem;
  font-weight: 700;
}

.comment-log {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.comment-entry {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.comment-action {
  font-weight: 700;
}

.hidden {
  display: none;
}

.pet-bounce { /* Class to trigger the pet bounce animation */
  animation: petBounce 0.45s ease;
}

/* Keyframes for the pet bounce animation */
@keyframes petBounce {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-12px);
  }
  70% {
    transform: translateY(0);
  }
  85% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) { 
  .button-container {
    grid-template-columns: 1fr;
  }

  .stat-row {
    font-size: 16px;
  }
}
