/* =========================
   Maeri RPG - Character List
   ========================= */

.chars-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: slideIn 0.3s ease;
}

.chars-section-title {
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-icon {
  font-size: 1.4rem;
}

.chars-counter {
  margin-left: auto;
  font-size: 1rem;
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  min-height: 200px;
}

.ready-chars:empty::before {
  content: 'Carregando personagens...';
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

.char-card {
  background: var(--surface);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
}

.char-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

.char-card:active {
  transform: translateY(-2px);
}

.char-card--empty {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 100%);
  border-style: dashed;
  min-height: 180px;
}

.char-card--empty .char-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  gap: 0.8rem;
}

.char-plus {
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold);
  opacity: 0.7;
  line-height: 1;
}

.char-label {
  font-family: 'Crimson Text', serif;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.char-card--ready {
  background: var(--surface);
}

.char-card-image {
  height: 100px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.5rem;
}

.warrior-bg { background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%); }
.mage-bg { background: linear-gradient(135deg, #4b0082 0%, #663399 100%); }
.cleric-bg { background: linear-gradient(135deg, #daa520 0%, #b8860b 100%); }
.rogue-bg { background: linear-gradient(135deg, #2f4f4f 0%, #1e3a3a 100%); }
.druid-bg { background: linear-gradient(135deg, #2e8b57 0%, #228b22 100%); }
.paladin-bg { background: linear-gradient(135deg, #b22222 0%, #8b0000 100%); }

.char-class {
  background: rgba(0, 0, 0, 0.7);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.char-card-info {
  padding: 1rem 0.8rem;
}

.char-name {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-desc {
  font-family: 'Crimson Text', serif;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 480px) {
  .chars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .chars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .char-card-image {
    height: 120px;
  }
}