.familiar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.familiar-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.familiar-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(102, 126, 234, 0.6);
}

.familiar-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  text-transform: capitalize;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.stat-section {
  margin-bottom: 1rem;
}

.stat-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #b0b0b0;
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 1rem;
  background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.1) 50%, rgba(0,0,0,0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.25rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.progress-fill.happiness {
  background: linear-gradient(90deg, #feca57, #ff9ff3);
  box-shadow: 0 0 10px rgba(254, 202, 87, 0.5);
}

.progress-fill.nutrition {
  background: linear-gradient(90deg, #ff6b6b, #ee5a24);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.actions .btn {
  flex: 1;
}

.progress-value {
  color: #c0c0c0;
  font-family: Hack, monospace;
  font-size: 0.75rem;
}

.active-badge {
  display: inline-block;
  background: linear-gradient(90deg, #4ecdc4, #667eea);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
  animation: activePulse 2s ease-in-out infinite;
}

@keyframes subtleGlow {
  0% {
    text-shadow: 0 0 20px #4ecdc4, 0 0 40px #4ecdc4;
  }
  100% {
    text-shadow: 0 0 30px #4ecdc4, 0 0 60px #4ecdc4, 0 0 80px #4ecdc4;
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes orbPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px currentColor, 0 0 0.25rem rgba(0,0,0,0.15);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 12px currentColor, 0 0 0.5rem rgba(0,0,0,0.25);
  }
}

@keyframes activePulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.8);
  }
}

@media (max-width: 640px) {
  .familiar-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .roost-title {
    font-size: 2rem;
    letter-spacing: 0.1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .familiar-card,
  .progress-fill,
  .energy-orb,
  .roost-title,
  .active-badge {
    animation: none;
    transition: none;
  }

  .progress-fill::after {
    display: none;
  }
}

@keyframes hydraPulse {0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
@keyframes hydraGlitch {
  0%,100%{text-shadow:0 0 4px #0ff,0 0 10px #f0f}
  10%{text-shadow:-2px 0 #0ff,2px 0 #f0f}
  11%{text-shadow:2px 0 #0ff,-2px 0 #f0f}
  12%{text-shadow:0 0 4px #0ff,0 0 10px #f0f}
  55%{text-shadow:0 0 8px #ff0,0 0 14px #f80}
}
@keyframes beam {
  0%{width:0;opacity:0}
  5%{opacity:1}
  60%{width:120%}
  80%{opacity:1}
  100%{width:120%;opacity:0}
}
@keyframes core {
  0%,100%{transform:translate(-50%,-50%) scale(.8)}
  50%{transform:translate(-50%,-50%) scale(1.3)}
}
