/* =========================
   Maeri RPG - Etapa 2: Complementos
   Estilos para seleção de Seres, Estudos, Técnicas Marciais e Estudos Mágicos
========================= */

.complementos-container {
  animation: fadeIn 0.3s ease;
}

/* ===== SEÇÃO DE SERES ===== */
.complementos-intro {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.seres-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ser-button {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 100%);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.ser-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.ser-button:hover:not(.loading):not(.error) {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.ser-button:hover::before {
  transform: translateX(100%);
}

.ser-button.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--surface) 0%, #2a2a4a 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.ser-button.loading,
.ser-button.error {
  cursor: not-allowed;
  opacity: 0.7;
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
}

.ser-button.error {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.ser-details {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ser-details.closing {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.ser-title {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.ser-caracteristicas,
.ser-descricao {
  margin-bottom: 1.5rem;
}

.ser-caracteristicas:last-child,
.ser-descricao:last-child {
  margin-bottom: 0;
}

.ser-caracteristicas h4,
.ser-descricao h4 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--gold);
}

.caracteristica-item {
  background: rgba(212, 175, 55, 0.05);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.1);
  font-family: 'Crimson Text', serif;
  line-height: 1.6;
}

.caracteristica-item:last-child {
  margin-bottom: 0;
}

.caracteristica-item strong {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  display: inline-block;
  margin-right: 0.5rem;
}

/* ===== SEÇÃO DE ESTUDOS ===== */
.estudos-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
  animation: fadeIn 0.3s ease;
}

.estudos-intro {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.estudos-subtitle {
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.estudos-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.estudo-button {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 100%);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.estudo-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.estudo-button:hover:not(.loading):not(.error) {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.estudo-button:hover::before {
  transform: translateX(100%);
}

.estudo-button.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--surface) 0%, #2a2a4a 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.estudo-button.loading,
.estudo-button.error {
  cursor: not-allowed;
  opacity: 0.7;
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
}

.estudo-button.error {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.estudo-details {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.estudo-details.closing {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.estudo-title {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.estudo-descricao {
  background: rgba(212, 175, 55, 0.05);
  padding: 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--gold);
}

.estudo-descricao p {
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.estudo-conhecimentos h4 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--gold);
}

.conhecimentos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.conhecimento-item {
  background: rgba(26, 26, 46, 0.8);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  font-family: 'Crimson Text', serif;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.conhecimento-item:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
}

.conhecimento-item strong {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  display: inline-block;
  margin-right: 0.5rem;
}

/* ===== SEÇÃO DE TÉCNICAS MARCIAIS ===== */
.tecnicas-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
  animation: fadeIn 0.3s ease;
}

.tecnicas-subtitle {
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.tecnicas-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tecnica-button {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 100%);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.tecnica-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.tecnica-button:hover:not(.loading):not(.error) {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.tecnica-button:hover::before {
  transform: translateX(100%);
}

.tecnica-button.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--surface) 0%, #2a2a4a 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.tecnica-button.loading,
.tecnica-button.error {
  cursor: not-allowed;
  opacity: 0.7;
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
}

.tecnica-button.error {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.tecnica-details {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tecnica-details.closing {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.tecnica-title {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.tecnica-descricao {
  background: rgba(212, 175, 55, 0.05);
  padding: 1.2rem;
  border-radius: 8px;
  border-left: 4px solid var(--gold);
}

.tecnica-descricao p {
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== SEÇÃO DE ESTUDOS MÁGICOS ===== */
.magias-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
  animation: fadeIn 0.3s ease;
}

.magias-subtitle {
  color: var(--text-muted);
  font-family: 'Crimson Text', serif;
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.magias-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.magia-button {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 100%);
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.magia-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.magia-button:hover:not(.loading):not(.error) {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.magia-button:hover::before {
  transform: translateX(100%);
}

.magia-button.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--surface) 0%, #2a2a4a 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.magia-button.loading,
.magia-button.error {
  cursor: not-allowed;
  opacity: 0.7;
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
}

.magia-button.error {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.magia-details {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.magia-details.closing {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.magia-title {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.magia-descricao {
  background: rgba(212, 175, 55, 0.05);
  padding: 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--gold);
}

.magia-descricao p {
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.magia-descricao p:last-child {
  margin-bottom: 0;
}

.magia-efeitos h4 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--gold);
}

.efeitos-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.efeito-item {
  background: rgba(26, 26, 46, 0.8);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  font-family: 'Crimson Text', serif;
  line-height: 1.5;
  transition: all 0.2s ease;
  position: relative;
  padding-left: 2rem;
}

.efeito-item::before {
  content: '✦';
  color: var(--gold);
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  font-size: 1rem;
}

.efeito-item:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVO ===== */
@media (min-width: 768px) {
  .seres-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .estudos-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .tecnicas-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .magias-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .ser-details,
  .estudo-details,
  .tecnica-details,
  .magia-details {
    padding: 2rem;
  }
  
  .ser-caracteristicas p,
  .ser-descricao p,
  .estudo-descricao p,
  .tecnica-descricao p,
  .magia-descricao p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .seres-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .estudos-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tecnicas-buttons {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .magias-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ser-button,
  .estudo-button,
  .tecnica-button,
  .magia-button {
    padding: 0.8rem 0.3rem;
    font-size: 0.9rem;
  }
  
  .ser-details,
  .estudo-details,
  .tecnica-details,
  .magia-details {
    padding: 1rem;
  }
  
  .ser-title,
  .estudo-title,
  .tecnica-title,
  .magia-title {
    font-size: 1.3rem;
  }
  
  .ser-caracteristicas h4,
  .ser-descricao h4,
  .estudo-conhecimentos h4,
  .magia-efeitos h4 {
    font-size: 1rem;
  }
  
  .caracteristica-item,
  .conhecimento-item,
  .efeito-item {
    padding: 0.8rem;
    font-size: 0.95rem;
  }
  
  .efeito-item {
    padding-left: 1.8rem;
  }
  
  .efeito-item::before {
    left: 0.6rem;
    top: 0.8rem;
  }
  
  .caracteristica-item strong,
  .conhecimento-item strong {
    display: block;
    margin-bottom: 0.3rem;
  }
  
  .estudo-descricao,
  .tecnica-descricao,
  .magia-descricao {
    padding: 1rem;
  }
}