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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  user-select: none;
}

.game-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 24px;
  max-width: 640px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.game-header {
  text-align: center;
  margin-bottom: 20px;
}

.game-header h1 {
  font-size: 32px;
  color: #4a3f8a;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  min-width: 50px;
}

.stat-value.active {
  color: #e74c3c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  color: #fff;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-start {
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  box-shadow: 0 4px 12px rgba(86, 171, 47, 0.4);
}

.btn-pause {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.difficulty-select {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  background: #fff;
  color: #333;
  cursor: pointer;
  outline: none;
}

.difficulty-select:focus {
  border-color: #764ba2;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  background: linear-gradient(180deg, #7ec850 0%, #5aa83a 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hole {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(ellipse at center, #3a2a1a 0%, #221408 70%);
  border-radius: 50%;
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.7), 0 4px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  cursor: pointer;
}

.hole::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.mole {
  position: absolute;
  bottom: -70%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  width: 70%;
  height: 70%;
  cursor: pointer;
  transition: bottom 0.12s ease-out;
  z-index: 2;
}

.hole.up .mole {
  bottom: 8%;
}

.mole-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 40% 20%, #d2a96f, #9c6b3a 70%);
  border-radius: 50% 50% 42% 42%;
}

.mole-face {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 62%;
  height: 55%;
}

.mole-eye {
  position: absolute;
  top: 0;
  width: 22%;
  height: 30%;
  background: #fff;
  border-radius: 50%;
}

.mole-eye.left {
  left: 8%;
}

.mole-eye.right {
  right: 8%;
}

.mole-eye::after {
  content: '';
  position: absolute;
  bottom: 8%;
  left: 30%;
  width: 40%;
  height: 40%;
  background: #222;
  border-radius: 50%;
}

.mole-nose {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 24%;
  height: 18%;
  background: #f49a9a;
  border-radius: 50%;
}

.mole-bang {
  position: absolute;
  top: 2%;
  left: 10%;
  right: 10%;
  height: 12%;
  background: #7a4a1e;
  border-radius: 50%;
  opacity: 0.7;
}

.mole.special .mole-body {
  background: radial-gradient(ellipse at 40% 20%, #ffd700, #ff8c00 70%);
}

.mole.special .mole-bang {
  background: #c0392b;
}

.hole.smacked .mole {
  animation: smack 0.25s ease-in;
  bottom: -70%;
}

@keyframes smack {
  0% { bottom: 8%; transform: translateX(-50%) rotate(0deg); }
  40% { bottom: -10%; transform: translateX(-50%) rotate(30deg); }
  100% { bottom: -70%; transform: translateX(-50%) rotate(0deg); }
}

.score-popup {
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
  z-index: 3;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -50px); }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px 50px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
  color: #4a3f8a;
  margin-bottom: 12px;
}

.final-score {
  font-size: 36px;
  font-weight: 800;
  color: #e74c3c;
  margin-bottom: 8px;
}

.result-message {
  color: #666;
  margin-bottom: 24px;
}
