.refugio-hero {
  background: linear-gradient(180deg, #25211d 0%, #1a1715 100%);
  border: 1px solid #4f4a43;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

.refugio-diorama-wrap {
  width: 100%;
  height: 190px;
  background: #0d0c0b;
  border: 2px solid #5a4a3a;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
}

.diorama-stage-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.diorama-base-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

/* SLOTS MODULARES */
.diorama-slot {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diorama-sprite-modulo {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.slot-antena {
  top: 10px;
  right: 28%;
}

.slot-gallinero {
  bottom: 24px;
  left: 12px;
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.gallina-animada-frame {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  background-size: contain;
  background-repeat: no-repeat;
  animation: animGallina 1.2s steps(1) infinite;
}

@keyframes animGallina {
  0%, 100% { background-image: url('../assets/sprites/refugio/sprite_gallina_frame1.png'); }
  50% { background-image: url('../assets/sprites/refugio/sprite_gallina_frame2.png'); }
}

.slot-huerto {
  bottom: 8px;
  left: 14px;
}

.slot-taller {
  bottom: 8px;
  right: 14px;
}

.slot-energia {
  bottom: 32px;
  right: 12px;
}

.energia-activa {
  filter: drop-shadow(0 0 6px #38bdf8);
  animation: pulsoLed 1.5s ease-in-out infinite alternate;
}

@keyframes pulsoLed {
  from { opacity: 0.8; }
  to { opacity: 1; filter: drop-shadow(0 0 8px #38bdf8); }
}

.slot-fogon {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fuego-animado-frame {
  width: 16px;
  height: 16px;
  position: absolute;
  top: -8px;
  image-rendering: pixelated;
  background-size: contain;
  background-repeat: no-repeat;
  animation: animFuego 0.4s steps(1) infinite;
}

@keyframes animFuego {
  0%, 100% { background-image: url('../assets/sprites/refugio/sprite_fuego_frame1.png'); }
  50% { background-image: url('../assets/sprites/refugio/sprite_fuego_frame2.png'); }
}

.refugio-stage-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--oro-torta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.refugio-titulo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.refugio-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Indicador de Bioenergía */
.bioenergia-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bioenergia-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bioenergia-barra-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}

.bioenergia-barra {
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #facc15);
  transition: width 0.3s ease;
}

/* Bolsa de Peso Real */
.bolsa-panel {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.bolsa-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bolsa-titulo {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bolsa-peso-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.bolsa-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.bolsa-item-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* ============================================================
   CICLO DÍA / NOCHE E ILUMINACIÓN NATURAL EN DIORAMA (PIX)
   ============================================================ */
.diorama-stage-container {
  transition: filter 1.2s ease, background 1.2s ease;
}

/* 1. Amanecer (06:00 - 10:59): Luz dorada tenue */
.diorama-amanecer {
  filter: sepia(0.2) brightness(1.05) hue-rotate(-8deg);
}

/* 2. Mediodía (11:00 - 17:59): Contraste nítido y sol cenital */
.diorama-mediodia {
  filter: brightness(1.02) contrast(1.06);
}

/* 3. Crepúsculo / Atardecer (18:00 - 20:59): Tonos ocres y brasas */
.diorama-crepusculo {
  filter: sepia(0.35) saturate(1.25) hue-rotate(-20deg) brightness(0.95);
}

/* 4. Noche Profunda (21:00 - 05:59): Azul noche fría y fogón */
.diorama-noche {
  filter: brightness(0.72) hue-rotate(190deg) saturate(0.85);
}

/* Badge flotante de fase horaria */
.diorama-fase-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  font-size: 0.68rem;
  color: #fff;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
