* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  width: 90%;
  max-width: 600px;
  background-color: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

h1 {
  color: #ff6b6b;
  margin-bottom: 15px;
}

.instructions {
  margin-bottom: 20px;
  font-size: 1.1em;
  color: #555;
}

.table {
  background-color: #e0e0e0;
  border-radius: 10px;
  height: 300px;
  margin-bottom: 20px;
  position: relative;
  border: 3px solid #bc8c5e;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.eggs-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 500px;
}

.egg-container {
  position: relative;
  width: 70px;
  height: 100px;
  transition: transform 0.2s;
  cursor: pointer;
}

.egg {
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.egg:hover {
  transform: scale(1.05);
}

.egg.grabbed {
  transform: translateY(-30px) scale(1.1);
}

.egg.cracked {
  animation: shake 0.2s linear;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

.reaction-bubble {
  background-color: #fff4e6;
  border: 2px solid #ffd8a8;
  border-radius: 15px;
  padding: 10px 20px;
  max-width: 80%;
  margin: 0 auto;
  position: relative;
  font-size: 1.2em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.reaction-bubble:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #ffd8a8;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.reaction-bubble.visible {
  opacity: 1;
  transform: translateY(0);
}

.rating-container {
  margin-top: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.emoji-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 15px;
}

.rating-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  background-color: #f0f0f0;
  padding: 10px 15px;
  border-radius: 8px;
  min-width: 80px;
}

.rating-btn:hover {
  transform: scale(1.1);
  background-color: #e0e0e0;
}

.emoji {
  font-size: 2em;
  user-select: none;
}

.rating-text {
  margin-top: 5px;
  font-weight: bold;
  color: #555;
}

.rating-result {
  margin-top: 20px;
  background-color: #e8f4f8;
  border-radius: 10px;
  padding: 15px;
  animation: fadeIn 0.5s;
}

.rating-message {
  margin-top: 10px;
  font-style: italic;
  color: #555;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden {
  display: none;
}

.controls {
  margin-top: 20px;
}

button {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #ff8787;
}

button:active {
  transform: scale(0.98);
}