body {
  font-family: 'Arial', sans-serif;
  background: #f0f8ff;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 20px;
}

h1 {
  margin-top: 20px;
}

#search {
  width: 640px;       /* bigger width */
  max-width: 100%;    /* won’t overflow on small screens */
  padding: 10px;      /* bigger input area */
  font-size: 16px;    /* make text larger */
  box-sizing: border-box; /* include padding in width */
}

#search-container {
  margin-bottom: 15px; /* space under search/results */
}

#results {
  list-style: none;
  padding: 0;
  margin: 0;
  background: white;
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
}

#results li {
  padding: 10px;
  cursor: pointer;
}

#results li:hover {
  background: #eee;
}

.guess {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  align-items: stretch;  /* cells same height */
}

#game-wrapper {
  display: inline-block;       /* shrink-wrap to table width */
  text-align: left;            /* keep left-aligned inside wrapper */
}


/* 
.cell {
  flex: 1 1 120px;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: normal;
  font-weight: bold;
  max-width: 137px;
  min-width: 137px;
  opacity: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: opacity 0.3s ease;
  color: white;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  min-height: 50px;
  box-sizing: border-box;
} 
*/
.cell.animate {
  opacity: 1;
}

.correct {
  background: #4caf50;
  color: white;
}

.wrong {
  background: #f44336;
  color: white;
}

.close {
  background: #ff9800;
  color: white;
}

/* Slide-in animation */
@keyframes slideIn {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.cell {
  flex: 0 0 120px;          /* fixed width */
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  color: white;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: normal;       /* allow wrapping */
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header .cell {
  background-color: #e0e0e0;    /* light gray */
  color: #333;                  /* dark text */
  font-weight: 700;             /* slightly bolder */
  border-color: #999;           /* lighter border */
  min-height: 40px;             /* same as guess cells */
}

.animate {
  animation: slideIn 0.4s ease forwards;
}

.header .cell {
  font-weight: bold;
  background: #ddd;
  opacity: 1; /* always visible */
}

#image-container {
  margin: 15px 0;
}

/* start blurred */
.blur {
  filter: blur(8px);
}

/* Result text styling */
#result {
  margin: 15px 0;
  font-size: 28px;      /* Make text bigger */
  font-weight: bold;
  opacity: 0;            /* Start hidden for fade-in */
  transition: opacity 0.8s ease; /* Smooth fade-in */
  text-align: center;
}

/* Shake animation (loss) */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

/* Rotate back and forth animation (win) */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.shake {
  animation: shake 0.5s;
}

.wiggle {
  animation: wiggle 0.7s;
}

/* Ensure image is visible and transitions work */
#bird-image {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  opacity: 1;
}

#results li {
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid #ccc;
}

#results li:hover {
  background-color: #eee; /* optional hover effect */
}

.cell.placeholder {
  background-color: #e0e0e0; /* same gray as header */
  color: #333;               /* optional text color */
  opacity: 1;                /* make it visible */
}
