/* === Grid & Spacing === */

#players_row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.playercard_col_class {
  max-width: 140px;
  min-width: 140px;
  padding: 5px;
}

/* === Flip Behavior === */

.card_flip_wrapper {
  perspective: 1000px;
  width: 100%;
  height: 210px;
  position: relative;
  cursor: pointer;
}

.card_flip_inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card_flip_inner.flipped {
  transform: rotateY(180deg);
}

/* === Foil Wrapper with Default Silver-Blue Border === */

.playercard_foil_wrap {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 2px;
  border-radius: 10px;
  box-sizing: border-box;
  background: #111;
}

.playercard_foil_wrap::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(130deg, #b0c4de, #add8e6, #b0c4de, #add8e6);
  background-size: 300% 300%;
  border-radius: 12px;
  z-index: 0;
  animation: shimmerFoil 3s linear infinite;
  animation-delay: var(--foil-delay, 0ms);
  pointer-events: none;
  box-shadow: 0 0 6px 3px rgba(173, 216, 230, 0.3);
}

/* === Holographic for non-spares === */

.playercard_foil_wrap.holographic::before {
  background: linear-gradient(45deg, red, orange, yellow, green, cyan, blue, violet, red);
  background-size: 600% 600%;
  animation: rainbowFoil 6s ease infinite;
  animation-delay: var(--foil-delay, 0ms);
  box-shadow: 0 0 6px 3px rgba(255, 255, 255, 0.2);
}

@keyframes shimmerFoil {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes rainbowFoil {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* === Card Base === */

.playercard_class {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.front {
  background: #111;
  z-index: 2;
}

.back {
  background: #1c1c1c;
  transform: rotateY(180deg);
  color: white;
  justify-content: center;
  align-items: center;
  padding: 8px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 2;
}

/* === Front Content === */

.playercard_img_class {
  flex: 1;
  width: 100%;
  object-fit: cover;
  display: block;
}

.playercard_name_class {
  height: 30px;
  background: #1976d2;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 30px;
  text-transform: uppercase;
  font-family: 'Roboto Condensed', sans-serif;
  letter-spacing: 0.4px;
  border-top: 2px solid #ffffff;
  border-bottom: none;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Back Stats === */

.playercard_statsdiv_class {
  text-align: center;
  font-family: 'Source Sans Pro', sans-serif;
  width: 100%;
}

.playercard_statsheader_class {
  font-weight: bold;
  font-size: 12px;
  color: #fff;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.playercard_stats_class {
  font-size: 11px;
  margin-bottom: 8px;
  white-space: pre-line;
  color: #eee;
}

.playercard_seasonlink_class, .playercard_lifetimelink_class {
  display: inline-block;
  margin: 3px 2px;
  padding: 4px 6px;
  font-size: 10px;
  background-color: #333;
  color: gold;
  border-radius: 4px;
  border: 1px solid gold;
  text-decoration: none;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.playercard_seasonlink_class:hover, .playercard_lifetimelink_class:hover {
  background-color: #555;
}

/* === Role Badge === */

.playercard_role_badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: #e91e63;
  color: white;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 3;
}

