/* ===== Selective Breeding Lab - Custom Styles ===== */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: #1f2937;
  background: #f0fdf4;
}

#root {
  min-height: 100vh;
}

/* Smooth transitions for cards */
.org-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

/* Fitness bar animation */
.fitness-bar {
  transition: width 0.5s ease-in-out, background-color 0.3s ease;
}

/* Button press effect */
button:active:not(:disabled) {
  transform: scale(0.97);
}

/* SVG organisms - subtle hover animation */
svg.organism:hover {
  filter: brightness(1.05);
}

/* Scrollbar styling for data tables */
.overflow-x-auto::-webkit-scrollbar {
  height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Color strip gradient border radius */
.color-strip {
  border-radius: 9999px;
  overflow: hidden;
}

/* Achievement celebration animation */
@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.celebrate {
  animation: celebrate 0.6s ease-in-out 3;
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
  .grid-cols-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 641px) {
  .grid-cols-responsive {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Recharts tooltip customization */
.recharts-tooltip-wrapper {
  z-index: 50;
}

.recharts-default-tooltip {
  border-radius: 8px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Selection ring pulse */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(96, 165, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); }
}

.selected-pulse {
  animation: pulse-ring 1.5s ease-in-out infinite;
}
