:root {
  --primary-green: #10b981;
  --primary-green-dark: #047857;
  --secondary-yellow: #fbbf24;
  --secondary-yellow-dark: #d97706;
  --accent-red: #ef4444;
  --accent-red-dark: #dc2626;
  --farm-brown: #92400e;
  --farm-brown-light: #d97706;
  --success-green: #22c55e;
  --warning-orange: #f59e0b;
}

.buy-button {
  background: linear-gradient(
    145deg,
    var(--secondary-yellow),
    var(--secondary-yellow-dark)
  );
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.buy-button span {
  width: 25%;
}

.game-grid {
  background: linear-gradient(145deg, #ecfdf5, #d1fae5);
  border: 3px solid var(--primary-green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  display: inline-block;
  border-spacing: 0;
  border-collapse: separate;
}

.game-grid table {
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
}

.game-grid td {
  padding: 0;
  border: none;
  vertical-align: middle;
  text-align: center;
}

.game-grid .animal-emoji {
  font-size: 2rem;
  line-height: 1;
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: none;
}

.game-grid::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(
    45deg,
    var(--primary-green),
    var(--secondary-yellow),
    var(--primary-green)
  );
  border-radius: inherit;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite;
}

.coop-tooltip-fixed .tooltip-upgrade-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: linear-gradient(145deg, var(--warning-orange), #d97706);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.coop-tooltip-fixed .tooltip-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.processing-animal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: processingSpinRed 2s linear infinite;
  z-index: 5;
}

@keyframes coinFlyToMoney {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.8) rotate(360deg);
    opacity: 0;
  }
}

.merged-slaughter-tooltip .tooltip-upgrade-btn {
  padding: 6px 12px;
  background: linear-gradient(145deg, var(--warning-orange), #d97706);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.merged-slaughter-tooltip .tooltip-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5);
}

@keyframes animalPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes animalBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.auto-merge-glow {
  animation: autoMergeGlow 0.5s ease-in-out infinite alternate;
}

.grass {
  background: linear-gradient(145deg, #84cc16, #65a30d);
  border: 2px dashed #4d7c0f;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.grass::before {
  content: "🌱";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  animation: grassSway 2s ease-in-out infinite;
}

.grass::after {
  content: attr(data-cost);
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.grass:hover {
  background: linear-gradient(145deg, #a3e635, #84cc16);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(132, 204, 22, 0.4);
}

.drag-preview {
  opacity: 0.7;
  transform: scale(1.1);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.drag-valid-target {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0) !important;
  border-color: var(--success-green) !important;
  animation: validTargetPulse 1s ease-in-out infinite;
}

@keyframes validTargetPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.drag-invalid-target {
  background: linear-gradient(145deg, #fee2e2, #fecaca) !important;
  border-color: var(--accent-red) !important;
  animation: invalidTargetShake 0.5s ease-in-out infinite;
}

@keyframes invalidTargetShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}

/* Tutorial Button Styles - Add this to your styles.css */

.tutorial-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.tutorial-start-btn {
  background: linear-gradient(145deg, #4ade80, #22c55e);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  transition: all 0.2s ease;
  font-family: inherit;
}

.tutorial-start-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.tutorial-credits-btn {
  background: linear-gradient(145deg, #374151, #1f2937);
  color: #fbbf24;
  padding: 0.75rem 2rem;
  border: 2px solid #fbbf24;
  border-radius: 0.75rem;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  transition: all 0.2s ease;
  font-family: inherit;
}

.tutorial-credits-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(145deg, #fbbf24, #f59e0b);
  color: #1f2937;
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* Mobile responsiveness for tutorial buttons */
@media (max-width: 480px) {
  .tutorial-buttons {
    flex-direction: column;
    align-items: center;
  }

  .tutorial-start-btn,
  .tutorial-credits-btn {
    width: 100%;
    max-width: 250px;
  }
}
