/* PREMIUM BIOMES EXPLORER STYLES */

#biomesModal.hidden {
  display: none;
}

#biomesModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.biomes-modal-content {
  max-width: 1200px;
  width: 95vw;
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #0d0e14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 210, 255, 0.1);
  animation: modalScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.biomes-modal-header {
  padding: 1.5rem 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.biomes-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #a0a0b0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.biomes-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  padding: 2.5rem;
  overflow-y: auto;
  min-height: 0; /* Critica para que o overflow-y funcione em flex container */
  background: radial-gradient(circle at 50% 0%, rgba(107, 159, 255, 0.08), transparent 600px);
}

.biome-category-title {
  grid-column: 1 / -1;
  margin: 2.5rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.biome-category-title h3 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #4a4d5e;
  white-space: nowrap;
}

.biome-category-title::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.biome-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: max-content;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.biome-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(107, 159, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.biome-card-header {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.biome-name-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.biome-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.biome-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* VISUAL PREVIEW BOXES */
.biome-visual-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.biome-preview-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.box-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6a6e85;
  letter-spacing: 0.1em;
}

.pixel-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.box-footer {
  font-size: 0.65rem;
  color: #a0a0b0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* GALLERY */
.biome-gallery-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.biome-gallery-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  align-items: center;
}

.gallery-sprite {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  image-rendering: pixelated;
  transition: transform 0.2s;
}

.gallery-sprite:hover {
  transform: scale(1.2) rotate(5deg);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* PARAMS GRID */
.biome-param-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 12px;
}

.biome-param-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.biome-param-name {
  font-size: 0.6rem;
  color: #6a6e85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.biome-param-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #00d2ff;
  font-weight: 600;
}

.biome-info-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

#btnCloseBiomes {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#btnCloseBiomes:hover {
  transform: scale(1.05);
  background: #00d2ff;
  color: #fff;
}
