/* Dynamic Game Value List Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: 'Segoe UI', system-ui, sans-serif; 
  background: #0a0a0f; 
  color: #fff;
  min-height: 100vh;
}

.pets-section {
  max-width: 950px;
  margin: 80px auto 40px;
  padding: 20px;
}

/* Search and Controls Row */
.about-search-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.about-btn-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.search-bar-col {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 450px;
}

.controls-col {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.about-list-btn {
  display: inline-block;
  background: #23232b;
  color: #fff;
  border-radius: 8px;
  padding: 10px 22px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s;
  cursor: pointer;
}

.about-list-btn:hover {
  background: #353545;
  color: #e0e0ff;
}

#searchBar {
  width: 100%;
  max-width: 450px;
  min-width: 220px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #2a2a35;
  font-size: 1rem;
  background: #17171a;
  color: #dbe7ff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.2s;
}

#searchBar:focus {
  outline: none;
  border-color: #667eea;
}

.calculator-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.calculator-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Pets Grid - 4 columns on desktop */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.pet-card {
  background: linear-gradient(145deg, #1a1a24 0%, #12121a 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a35;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pet-card:hover {
  transform: translateY(-5px);
  border-color: #667eea;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.pet-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pet-image {
  width: 100%;
  height: 130px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0f0f15;
}

.pet-name {
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 12px 5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pet-updated {
  font-size: 0.75rem;
  color: #888;
  padding: 0 12px 8px;
}

.pet-number {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

.values-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 8px;
  padding: 6px;
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: #a8b4f8;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.values-btn:hover {
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .pets-section {
    margin-top: 70px;
    padding: 10px;
  }
  
  .about-search-row {
    flex-direction: column;
    gap: 12px;
    padding: 0 5px;
  }
  
  .about-btn-col,
  .controls-col,
  .search-bar-col {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  
  .search-bar-col {
    order: -1; /* Put search bar at top on mobile */
  }
  
  #searchBar {
    max-width: 100%;
    width: 100%;
  }
  
  .about-list-btn,
  .calculator-btn {
    width: 100%;
    text-align: center;
    display: block;
  }
  
  .pets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .pet-image {
    height: 100px;
  }
  
  .pet-name {
    font-size: 0.95rem;
    padding: 8px 10px 4px;
  }
  
  .pet-updated {
    font-size: 0.7rem;
    padding: 0 10px 6px;
  }
  
  .values-btn {
    font-size: 0.85rem;
    padding: 6px;
    margin: 0 10px 8px;
    width: calc(100% - 20px);
  }
  
  .pet-number {
    padding: 6px 10px;
    font-size: 0.95rem;
  }
}

/* Pet Detail Modal */
.pet-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.pet-modal {
  background: linear-gradient(145deg, #1e1e2a 0%, #14141c 100%);
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #333;
}

.pet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.pet-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.pet-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.pet-modal-close:hover {
  color: #fff;
}

.pet-modal-image {
  width: 100%;
  height: 200px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0f0f15;
}

.pet-modal-body {
  padding: 20px;
}

.pet-modal-demand {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.pet-modal-demand.high { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.pet-modal-demand.medium { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.pet-modal-demand.low { background: rgba(244, 67, 54, 0.2); color: #f44336; }

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.variant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}

.variant-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.variant-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.variant-value {
  font-weight: 700;
  color: #667eea;
}
