/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #0d0d0d;
  color: white;
}

/* HEADER */
.header {
  background: linear-gradient(90deg, #000000, #1a1a1a);
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid #d4af37;
}

.header h1 {
  color: #d4af37;
  letter-spacing: 2px;
}

/* CONTENEDOR */
.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

/* BUSCADOR */
.search-box {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #d4af37;
  margin-bottom: 20px;
  text-align: center;
}

.search-box h2 {
  margin-bottom: 15px;
  color: #d4af37;
}

.search-box input {
  padding: 10px;
  width: 60%;
  border: none;
  border-radius: 5px;
  margin-right: 10px;
  outline: none;
}

.search-box textarea {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  outline: none;
  resize: vertical;
}

.search-box button {
  padding: 10px 20px;
  background: #d4af37;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.search-box button:hover {
  background: #b8962e;
}

#deckCompareSection input,
#duelPlannerSection textarea {
  display: block;
  width: 100%;
  margin: 0 0 12px 0;
}

#deckCompareSection button,
#duelPlannerSection button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

#deckCompareResultado,
#duelPlannerResultado {
  margin-top: 14px;
}

/* RESULTADOS */
.resultado {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* BATALLA */
.battle {
  background: #1a1a1a;
  border-left: 5px solid #d4af37;
  padding: 15px;
  border-radius: 8px;
  transition: 0.3s;
}

.battle:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.battle h3 {
  margin-bottom: 5px;
  color: #d4af37;
}

.battle p {
  font-size: 14px;
  color: #ccc;
}
.player-card {
  background: #1a1a1a;
  padding: 15px;
  border: 1px solid gold;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.player-history {
  font-size: 13px;
  color: #d7d7d7;
  margin-top: 6px;
}

.history-card {
  background: #111;
  border: 2px solid #d4af37;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.history-header h2 {
  color: #d4af37;
}

.history-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  background: #1a1a1a;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
}

.history-pagination button {
  padding: 8px 12px;
  min-height: 34px;
  line-height: 1.2;
  border: none;
  border-radius: 6px;
  background: #d4af37;
  color: black;
  font-weight: bold;
  cursor: pointer;
}

.history-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.history-pagination span {
  color: #fff;
  font-weight: 600;
  margin: 0 4px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.filtros {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.filtros button {
  padding: 8px 15px;
  border: none;
  background: #d4af37;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
}
.btn-copy {
  margin-top: 10px;
  padding: 8px 12px;
  background: #d4af37;
  border: none;
  border-radius: 6px;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-copy:hover {
  background: #b8962e;
  transform: scale(1.05);
}
.acciones {
  display: flex;
  align-items: center; /* ðŸ”¥ CLAVE */
  gap: 10px;
  margin-top: 10px;
}
.btn-link {
  margin-top: 10px;
  padding: 8px 12px;
  background: #00c853;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}
.btn-copy,
.btn-link {
  height: 40px; /* ðŸ”¥ misma altura */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ðŸ”¥ EVO (brillo violeta) */
.card.evo {
  border: 2px solid #a855f7;
  box-shadow: 0 0 10px #a855f7;
}

/* ðŸ”¥ HERO (borde dorado) */
.card.hero {
  border: 2px solid gold;
  box-shadow: 0 0 10px gold;
}
/*BATTLE*/
.battle-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.battle-table th,
.battle-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.victory {
  color: #2ecc71;
  font-weight: bold;
}

.defeat {
  color: #e74c3c;
  font-weight: bold;
}
.btn-clash {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background: #ffcc00;
  color: black;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
}

.duel-match {
  margin-top: 10px;
}
.duel-group {
  border: 2px solid gold;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #0f0f0f;
}

.duel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.player, .opponent {
  width: 40%;
}

.vs {
  width: 20%;
  text-align: center;
  font-size: 20px;
}
.filtros {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
}

.filtros button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #d4af37;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.filtros button:hover {
  transform: scale(1.05);
}

/* ðŸ“± MOBILE */
@media (max-width: 600px) {
  .filtros {
    flex-direction: column;
    align-items: stretch;
  }

  .filtros button {
    width: 100%;
    font-size: 14px;
  }
}
.filtros button.active {
  background: #fff;
  color: #000;
}
.stats-card h3 {
  margin-top: 15px;
  color: gold;
}

.stats-card img {
  margin: 5px;
}
/* ===============================
   âš”ï¸ COMPARADOR
=============================== */
.compare-box {
  border: 2px solid #d4af37;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  background: #111;
  text-align: center;
}

.compare-box h2 {
  color: #d4af37;
  margin-bottom: 10px;
}

.compare-box input {
  padding: 10px;
  margin: 5px;
  border-radius: 6px;
  border: none;
  width: 200px;
  max-width: 100%;
}

.compare-box button {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  background: #d4af37;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.compare-box button:hover {
  transform: scale(1.05);
}

/* ===============================
   ðŸ“Š RESULTADO COMPARACIÃ“N
=============================== */
.compare-card {
  border: 2px solid #d4af37;
  padding: 15px;
  margin-top: 20px;
  border-radius: 12px;
  background: #111;
  text-align: center;
}

.duel-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.duel-plan-block {
  background: #1a1a1a;
  border: 1px solid #d4af37;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  margin-top: 12px;
}

.duel-plan-deck {
  margin-top: 10px;
}

.duel-plan-deck p {
  margin-bottom: 6px;
  color: #d4af37;
}

.card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  border: 1px solid #d4af37;
  color: #fff;
  font-size: 11px;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.compare-row div {
  width: 40%;
}

.vs {
  width: 20%;
  font-size: 22px;
  font-weight: bold;
  color: #d4af37;
}

/* ===============================
   ðŸ“± RESPONSIVE
=============================== */
@media (max-width: 600px) {

  .compare-row {
    flex-direction: column;
    gap: 10px;
  }

  .compare-row div {
    width: 100%;
  }

  .vs {
    width: 100%;
  }

  .compare-box input {
    width: 100%;
  }

  .duel-plan-grid {
    grid-template-columns: 1fr;
  }
}
.ranking-card {
  margin-top: 20px;
  padding: 15px;
  border: 2px solid gold;
  border-radius: 10px;
  background: #111;
}

/* ===============================
ðŸ“„ TABLA BATTLE LOG RESPONSIVE
=============================== */

.tabla-card {
  background: #111;
  border: 2px solid gold;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
  overflow: hidden;
}

.tabla-card h2 {
  text-align: center;
  margin-bottom: 10px;
}

/* ðŸ”¥ contenedor scroll horizontal */
.tabla-card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* clave para scroll */
}

/* ðŸ‘‡ scroll en mobile */
.tabla-card {
  overflow-x: auto;
}

/* columnas */
.tabla-card th,
.tabla-card td {
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

/* header */
.tabla-card th {
  background: #222;
  color: gold;
}

/* filas */
.tabla-card tr:nth-child(even) {
  background: #1a1a1a;
}

/* resultado */
td.win {
  color: #00ff88;
  font-weight: bold;
}

td.lose {
  color: #ff4d4d;
  font-weight: bold;
}

/* link deck */
.tabla-card a {
  color: #00aaff;
  text-decoration: none;
  font-weight: bold;
}

/* ===============================
ðŸ”¥ DECKS RESPONSIVE
=============================== */

.decks-card {
  background: #111;
  border: 2px solid gold;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
}

#topCards .decks-card,
#topDecks .decks-card {
  width: 100%;
}

#topCards .decks-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 18px;
}

#topCards .decks-card h2 {
  flex: 0 0 100%;
}

.deck-item {
  margin-bottom: 15px;
}

#topCards .deck-item,
#topDecks .deck-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#topCards .deck-item {
  width: 150px;
  margin-bottom: 0;
}

#topCards .deck-cards {
  justify-content: center;
  flex-wrap: nowrap;
}

/* cartas */
.deck-cards {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.deck-cards img {
  width: 70px;
}

/* info */
.deck-info {
  text-align: center;
  margin-top: 5px;
}

#topCards .deck-info,
#topDecks .deck-info {
  width: 100%;
}

/* ===============================
ðŸ“± MOBILE
=============================== */

@media (max-width: 768px) {

  /* tabla */
  .tabla-card th,
  .tabla-card td {
    font-size: 12px;
    padding: 6px;
  }

  /* cartas mÃ¡s chicas */
  .deck-cards img {
    width: 50px;
  }

  /* tÃ­tulos */
  h2 {
    font-size: 18px;
  }

  /* botones filtros */
  .filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .filtros button {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* inputs */
  input {
    width: 100%;
    margin-bottom: 10px;
  }

  button {
    width: 100%;
  }
}

/* ===============================
   ðŸŽ´ CARTAS (NUEVO SISTEMA)
=============================== */

/* contenedor */
.deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  justify-items: center;
}

/* imagen base */
.deck img {
  width: 100%;
  max-width: 95px;
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

/* clase principal */
.card {
  width: 100%;
  max-width: 95px;
  border-radius: 10px;
  margin: 4px;
  transition: transform 0.2s ease;
}

/* hover */
.card:hover {
  transform: scale(1.1);
}

/* EVO */
.card.evo {
  border: 2px solid #a855f7;
  box-shadow: 0 0 12px #a855f7;
}

/* HERO */
.card.hero {
  border: 2px solid gold;
  box-shadow: 0 0 12px gold;
}
@media (max-width: 768px) {
  .deck {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
  }

  .deck img {
   width: 70px;
}

.card {
  width: 70px;
}

  .battle {
    padding: 10px;
  }

  .container {
    padding: 10px;
  }

  .search-box input {
    width: 100%;
    margin-bottom: 10px;
  }

  .search-box button {
    width: 100%;
  }

  .duel-row {
    flex-direction: column; /* ðŸ‘ˆ CLAVE */
    align-items: center;
    gap: 10px;
  }

  .player,
  .opponent {
    width: 100%;
    text-align: center;
  }

  .vs {
    margin: 10px 0;
    font-size: 18px;
  }
}
/* ===============================
   ðŸ”¥ RESULTADOS PRO
=============================== */

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.battle-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid #d4af37;
  color: #d4af37;
  font-size: 12px;
  font-weight: 700;
}

.victory {
  color: #00ff88;
  font-weight: bold;
}

.defeat {
  color: #ff4d4d;
  font-weight: bold;
}

.battle-extra {
  font-size: 12px;
  color: #aaa;
}

.battle-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #333;
  font-size: 12px;
  color: #bfbfbf;
}

/* ===============================
   ðŸ“± MOBILE FIX FINAL
=============================== */

@media (max-width: 768px) {

  .duel-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .player, .opponent {
    width: 100%;
    text-align: center;
  }

  .vs {
    margin: 8px 0;
  }

}
.duel-group {
  margin-bottom: 20px;
}

.duel-battle {
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #333;
}

.duel-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}
.score {
  font-weight: bold;
  margin: 0 10px;
  color: #FFD700;
}

.deck-label {
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: bold;
  color: #d4af37;
  text-align: center;
}

/* ===============================
   🔍 MATCHUPS (COUNTERS & FREE)
=============================== */

.detected-deck-item {
  cursor: pointer;
  background: #1a1a1a;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d4af37;
  transition: all 0.25s ease-in-out;
  width: 100%;
  max-width: 450px;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.detected-deck-item:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #fff;
  box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
}

.matchups-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.matchup-item {
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 15px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.matchup-item:hover {
  transform: translateY(-2px);
}

.matchup-item.counter {
  border: 1px solid #ff4d4d;
  background: linear-gradient(145deg, #1f1212, #120909);
}

.matchup-item.counter:hover {
  box-shadow: 0 6px 12px rgba(255, 77, 77, 0.2);
}

.matchup-item.free {
  border: 1px solid #00ff88;
  background: linear-gradient(145deg, #121f18, #09120e);
}

.matchup-item.free:hover {
  box-shadow: 0 6px 12px rgba(0, 255, 136, 0.2);
}

/* Responsive Matchups */
@media (max-width: 768px) {
  .matchups-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* ==========================================
   📋 CRL DUELO LOCKED CARDS TRACKER
   ========================================== */

.crl-board {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 15px;
  padding: 12px;
  background: linear-gradient(135deg, #2b0606 0%, #111 40%, #111 60%, #061a33 100%);
  border-radius: 12px;
  border: 2px solid #333;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.6);
  min-height: 380px;
  scrollbar-width: thin;
  scrollbar-color: #ffd700 #222;
}

.crl-board::-webkit-scrollbar {
  height: 6px;
}

.crl-board::-webkit-scrollbar-track {
  background: #222;
  border-radius: 4px;
}

.crl-board::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 4px;
}

.crl-column {
  flex: 1;
  min-width: 150px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  border: 1px solid #444;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.crl-column-header {
  color: #ffd700;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 6px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.crl-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  justify-items: center;
  gap: 6px;
  align-content: start;
}

.crl-card-container {
  position: relative;
  cursor: pointer;
  width: 42px !important;
  height: 52px !important;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #444;
  transition: all 0.15s ease-in-out;
  background: #222;
}

.crl-card-container:hover {
  transform: translateY(-2px) scale(1.1);
  border-color: #fff;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.crl-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crl-lock-x {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 10px;
  color: white;
  z-index: 8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.crl-x-blue {
  bottom: 4px;
  left: 4px;
  background: #00aaff;
  border: 1.5px solid white;
}

.crl-x-red {
  bottom: 4px;
  right: 4px;
  background: #ff4d4d;
  border: 1.5px solid white;
}

.crl-click-zone {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 6;
}

.crl-click-zone.zone-left {
  left: 0;
}

.crl-click-zone.zone-right {
  right: 0;
}

/* Filtros de Bloqueo */
.crl-card-container.locked .crl-card-img {
  filter: brightness(0.35) grayscale(0.3);
}
.crl-card-container.locked::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 170, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}
.crl-card-container.locked .crl-lock-x {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 18px !important;
  height: 18px !important;
  font-size: 9px !important;
  background: #00aaff !important;
  border: 1px solid white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6) !important;
  bottom: auto !important;
  right: auto !important;
}

.crl-champion {
  border: 2px solid gold !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.crl-champion:hover {
  box-shadow: 0 0 12px gold;
}

/* Adaptación Móvil Base */
@media (max-width: 600px) {
  /* Evitamos que fuerce a 3 columnas para conservar la relación de aspecto y scroll horizontal exacto del CRL */
  .crl-column-grid {
    align-content: start;
  }
}

/* Cabecera del tablero estilo Foto */
.crl-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 0px; /* Pegado al tablero */
  padding: 15px 25px;
  background: #111111;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border: 2px solid #333;
  border-bottom: none;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
}

.crl-player-badge {
  background: #ffffff;
  color: #111;
  font-weight: 900;
  font-size: 18px;
  padding: 10px 30px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transform: skewX(-15deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  min-width: 180px;
  text-align: center;
}

.crl-player-badge.badge-blue {
  border-bottom: 4px solid #00aaff;
  border-left: 4px solid #00aaff;
  color: #004488;
}

.crl-player-badge.badge-red {
  border-bottom: 4px solid #ff4d4d;
  border-right: 4px solid #ff4d4d;
  color: #880000;
}

.crl-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.crl-logo-locked {
  color: #00aaff;
}

.crl-logo-cards {
  color: #ff4d4d;
}

/* Tablero Ajustes de Borde */
.crl-board {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  margin-top: 0 !important;
}

/* Grids de Columnas específicas de la Foto (Removidas para hacerlo responsive) */

.crl-col-wincons,
.crl-col-spells,
.crl-col-buildings,
.crl-col-other {
  flex: 1 1 200px;
}

/* Leyenda estilo Foto */
.crl-board-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  padding: 10px 15px;
  background: #111;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 2px solid #333;
  border-top: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.crl-legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crl-legend-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.crl-legend-x.badge-blue {
  background: #00aaff;
  border: 1.5px solid white;
}

.crl-legend-x.badge-red {
  background: #ff4d4d;
  border: 1.5px solid white;
}

.crl-legend-text {
  font-weight: 800;
  letter-spacing: 0.8px;
  font-size: 12px;
  text-transform: uppercase;
}

.crl-legend-text.blue-text {
  color: #00aaff;
}

.crl-legend-text.red-text {
  color: #ff4d4d;
}

/* Responsividad extra para la cabecera */
@media (max-width: 768px) {
  .crl-board-header {
    flex-direction: column;
    padding: 15px;
    gap: 12px;
    border-bottom: 1px solid #333;
  }
  .crl-player-badge {
    min-width: 85%;
    font-size: 15px;
    padding: 8px 15px;
  }
  .crl-logo {
    font-size: 20px;
    order: -1; /* Muestra el logo primero arriba */
  }
  .crl-board-legend {
    padding: 15px;
  }
  .crl-legend-text {
    font-size: 11px;
  }
}

/* Rarity Borders */
.crl-card-container.crl-common {
  border: 1.5px solid #666 !important;
}
.crl-card-container.crl-rare {
  border: 1.5px solid #ff9900 !important;
  box-shadow: inset 0 0 4px rgba(255, 153, 0, 0.4);
}
.crl-card-container.crl-epic {
  border: 1.5px solid #b800e6 !important;
  box-shadow: inset 0 0 4px rgba(184, 0, 230, 0.4);
}
.crl-card-container.crl-legendary {
  border: 1.5px solid #00ffff !important;
  box-shadow: 0 0 4px rgba(0, 255, 255, 0.4), inset 0 0 4px rgba(0, 255, 255, 0.4);
}
.crl-card-container.crl-champion {
  border: 2px solid gold !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6), inset 0 0 4px rgba(255, 215, 0, 0.4);
}

.crl-card-container.crl-common:hover {
  border-color: #aaa !important;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}
.crl-card-container.crl-rare:hover {
  border-color: #ffaa00 !important;
  box-shadow: 0 4px 12px rgba(255, 170, 0, 0.5);
}
.crl-card-container.crl-epic:hover {
  border-color: #d000ff !important;
  box-shadow: 0 4px 12px rgba(208, 0, 255, 0.5);
}
.crl-card-container.crl-legendary:hover {
  border-color: #00ffff !important;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.7);
}
.crl-card-container.crl-champion:hover {
  border-color: gold !important;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.8);
}
