/* ===== MONSTER LIBRARY STYLES ===== */

.monster-search-container {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2416 100%);
  padding: 25px;
  border-radius: 12px;
  border: 3px solid #d4af37;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

.monster-search-header {
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #d4af37;
  padding-bottom: 20px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
}

.monster-search-header h3 {
  color: #d4af37;
  font-size: 1.8em;
  margin: 0 0 8px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 10px rgba(212, 175, 55, 0.5);
  font-weight: 700;
  letter-spacing: 1px;
}

.monster-count {
  color: #a89968;
  font-size: 1em;
  margin: 0;
  font-weight: 500;
}

.monster-search-box {
  margin-bottom: 20px;
}

.monster-search-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(35, 28, 18, 0.9));
  color: #e0e0e0;
  font-size: 1.1em;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.monster-search-input::placeholder {
  color: #888;
  font-style: italic;
}

.monster-search-input:focus {
  outline: none;
  background: linear-gradient(135deg, rgba(40, 35, 25, 0.95), rgba(50, 40, 25, 0.95));
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.7), inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.3);
  border-color: #ffeb3b;
  transform: translateY(-2px);
}

.monster-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(30, 25, 20, 0.7), rgba(20, 20, 20, 0.7));
  border-radius: 10px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  color: #d4af37;
  font-size: 0.95em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.filter-group select,
.filter-group input {
  padding: 12px 15px;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(25, 20, 15, 0.9), rgba(15, 15, 15, 0.9));
  color: #e0e0e0;
  font-size: 0.95em;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.filter-group select:hover,
.filter-group input:hover {
  border-color: rgba(212, 175, 55, 0.7);
  background: linear-gradient(135deg, rgba(35, 30, 25, 0.95), rgba(25, 22, 18, 0.95));
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, rgba(45, 38, 28, 0.95), rgba(30, 25, 20, 0.95));
}

.filter-group select option {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 10px;
}

.filter-group input[type="number"]::-webkit-inner-spin-button,
.filter-group input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 30px;
}

/* Search Results Info */
.search-results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #1a1a1a;
  border-radius: 4px;
  border-left: 3px solid #d4af37;
}

.search-results-info span {
  color: #d4af37;
  font-weight: bold;
}

.btn-random {

.monster-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.monster-card {
  background: linear-gradient(135deg, rgba(35, 28, 22, 0.95), rgba(25, 20, 15, 0.95));
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.monster-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.5s ease;
}

.monster-card:hover::before {
  left: 100%;
}

.monster-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5), 0 0 30px rgba(255, 215, 0, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.1);
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(45, 35, 25, 0.98), rgba(35, 28, 20, 0.98));
}

.monster-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 10px;
}

.monster-card h4 {
  margin: 0;
  color: #d4af37;
  font-size: 1.2em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  flex: 1;
}

.monster-cr {
  background: linear-gradient(135deg, #d4af37, #ffeb3b);
  color: #1a1a1a;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(212, 175, 55, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.monster-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 0.88em;
}

.monster-type,
.monster-size,
.monster-ac,
.monster-hp {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
  color: #e8c547;
  padding: 5px 12px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-weight: 600;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.monster-type {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(123, 31, 162, 0.15));
  color: #ce93d8;
  border-color: rgba(156, 39, 176, 0.4);
}

.monster-size {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.3), rgba(255, 152, 0, 0.15));
  color: #ffb74d;
  border-color: rgba(255, 152, 0, 0.4);
}

.monster-ac {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.15));
  color: #81c784;
  border-color: rgba(76, 175, 80, 0.4);
}

.monster-hp {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.3), rgba(244, 67, 54, 0.15));
  color: #e57373;
  border-color: rgba(244, 67, 54, 0.4);
}

.monster-btn-details {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #d4af37, #e8c547);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  position: relative;
  overflow: hidden;
}

.monster-btn-details::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.monster-btn-details:hover::before {
  width: 300px;
  height: 300px;
}

.monster-btn-details:hover {
  background: linear-gradient(135deg, #ffd700, #ffeb3b);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.7), 0 0 40px rgba(255, 235, 59, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.02);
}

.monster-btn-details:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: #888;
  font-size: 1.1em;
  font-style: italic;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 8px;
  border: 2px dashed rgba(212, 175, 55, 0.3);
}

/* Monster Detail Modal */
.monster-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;

/* Monster Detail Modal */
.monster-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: modalFadeIn 0.3s ease;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear, opacity 0.3s ease;
  pointer-events: none;
}

.monster-modal.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.monster-modal-content {
  background: linear-gradient(135deg, #1a1a1a, #2d2416);
  border: 3px solid #d4af37;
  border-radius: 15px;
  padding: 35px;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.4);
  animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.monster-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2.5em;
  cursor: pointer;
  color: #d4af37;
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 100;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
}

.monster-modal-close:hover {
  color: #ff4444;
  transform: rotate(90deg) scale(1.2);
  background: rgba(255, 68, 68, 0.2);
}

.monster-detail {
  color: #e0e0e0;
}

.monster-detail h2 {
  color: #ffd700;
  border-bottom: 3px solid #d4af37;
  padding-bottom: 15px;
  margin: 0 0 20px 0;
  font-size: 2em;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 215, 0, 0.5);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), transparent);
  padding-left: 10px;
  position: relative;
}

.monster-detail h2::before {
  content: '⚔️';
  position: absolute;
  left: -35px;
  opacity: 0.6;
}

.monster-detail p {
  margin: 12px 0;
  line-height: 1.7;
  font-size: 1em;
}

.monster-detail strong {
  color: #ffeb3b;
  font-weight: 700;
}

.monster-description {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
  padding: 20px;
  border-left: 5px solid #d4af37;
  margin: 20px 0;
  border-radius: 8px;
  line-height: 1.8;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 2px 15px rgba(212, 175, 55, 0.1);
  border-right: 1px solid rgba(212, 175, 55, 0.2);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.monster-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1em;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37, #ffd700);
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
  border: 2px solid #ffeb3b;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffd700, #ffeb3b);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7), 0 0 35px rgba(255, 235, 59, 0.5);
  transform: translateY(-3px) scale(1.03);
  border-color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, #424242, #616161);
  color: #d4af37;
  border: 2px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 3px rgba(212, 175, 55, 0.1);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #616161, #757575);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4), 0 0 25px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px) scale(1.02);
  border-color: #d4af37;
  color: #ffd700;
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0);
}
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 968px) {
  .monster-filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .monster-results {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .monster-search-container {
    padding: 20px;
  }

  .monster-search-header h3 {
    font-size: 1.5em;
  }

  .monster-filters {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .monster-results {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .monster-modal-content {
    padding: 25px;
    max-width: 95%;
  }

  .monster-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .monster-search-container {
    padding: 15px;
  }

  .monster-search-header h3 {
    font-size: 1.3em;
  }

  .monster-results {
    grid-template-columns: 1fr;
  }

  .monster-modal-content {
    padding: 20px;
  }

  .monster-card-info {
    font-size: 0.8em;
  }
}

/* Scrollbar personalizada para modal */
.monster-modal-content::-webkit-scrollbar {
  width: 10px;
}

.monster-modal-content::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.6);
  border-radius: 5px;
}
  border-radius: 10px;
}

.monster-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #d4af37, #a89968);
  border-radius: 10px;
  border: 2px solid rgba(20, 20, 20, 0.5);
}

.monster-modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ffd700, #d4af37);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Efectos adicionales del modal */
.monster-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, #d4af37, #ffd700, #d4af37, transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.monster-detail p {
  position: relative;
  padding-left: 5px;
}

.monster-detail p::before {
  content: '⚔';
  position: absolute;
  left: -20px;
  color: #d4af37;
  opacity: 0.3;
  font-size: 0.8em;
}

