/* Wrestling card — uses the generated trading-card frame as background and
   layers the wrestler's photo + name + 5 stat bars into its slots. */

.wc-card {
  --wc-w: min(380px, 80vw);
  width: var(--wc-w);
  aspect-ratio: 2 / 3;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.55),
    0 0 0 2px rgba(255, 215, 110, 0.25) inset;
  background: #050913;
  isolation: isolate;
  user-select: none;
}

.wc-card .wc-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Photo fills the large octagonal cutout in the center of the frame.
   Geometry tuned by eye against the frame image so the photo sits inside
   the gold-bordered opening. */
.wc-photo-wrap {
  position: absolute;
  /* clip-path mirrors the octagon cutout so the photo doesn't bleed past the
     gold frame on the card template. */
  clip-path: polygon(
    26% 18.5%, 74% 18.5%,
    86% 24%,
    86% 68%,
    74% 73.5%, 26% 73.5%,
    14% 68%,
    14% 24%
  );
  -webkit-clip-path: polygon(
    26% 18.5%, 74% 18.5%,
    86% 24%,
    86% 68%,
    74% 73.5%, 26% 73.5%,
    14% 68%,
    14% 24%
  );
  inset: 0;
  z-index: 1;
  background: #0b1020;
}

.wc-photo {
  position: absolute;
  /* position/size tuned so the wrestler fills the octagon without hitting the
     red side panels */
  top: 17.5%;
  left: 12%;
  width: 76%;
  height: 56%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  background: #0b1020;
}

/* Dark bottom gradient over the photo so faces stay in frame and the
   transition into the nameplate looks natural. */
.wc-photo-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(5,9,19,0.85) 100%);
  pointer-events: none;
}

/* Top banner — wrestler nickname / title */
.wc-top-banner {
  position: absolute;
  z-index: 4;
  top: 7.5%;
  left: 18%;
  width: 64%;
  text-align: center;
  font-family: "Impact", "Oswald", "Arial Black", system-ui, sans-serif;
  letter-spacing: 0.14em;
  font-size: calc(var(--wc-w) * 0.055);
  color: #fff3c2;
  text-shadow:
    0 2px 0 #5a0a0a,
    0 0 8px rgba(255, 200, 90, 0.4);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Name plate at the bottom of the card. */
.wc-name {
  position: absolute;
  z-index: 4;
  left: 10%;
  width: 80%;
  bottom: 13%;
  text-align: center;
  font-family: "Impact", "Oswald", "Arial Black", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: calc(var(--wc-w) * 0.075);
  color: #fff;
  text-shadow:
    0 2px 0 #3a0606,
    0 0 10px rgba(255, 220, 140, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

/* Record / win-loss strip under the name. */
.wc-record {
  position: absolute;
  z-index: 4;
  left: 25%;
  width: 50%;
  bottom: 5.5%;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: calc(var(--wc-w) * 0.034);
  color: #ffd76a;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 0 #000;
}

/* Stat slots stacked down the right side panel. The five slots on the
   generated frame line up with the five trainable stats. */
.wc-stats {
  position: absolute;
  z-index: 4;
  top: 35%;
  right: 4.5%;
  width: 20%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--wc-w) * 0.042);
}

.wc-stat {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: calc(var(--wc-w) * 0.038);
  color: #fff;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(255, 200, 90, 0.5);
  letter-spacing: 0.04em;
  /* subtle inner tint to match the gold-bordered rectangles on the frame */
  background: linear-gradient(90deg, rgba(20,30,60,0.55), rgba(40,10,15,0.55));
  border-radius: 4px;
}

.wc-stat .wc-stat-val {
  font-variant-numeric: tabular-nums;
}

.wc-stat .wc-stat-bar {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 12%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.wc-stat .wc-stat-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff5a4d, #ffd76a);
  box-shadow: 0 0 6px rgba(255, 120, 60, 0.8);
  width: 0%;
  transition: width 400ms ease;
}
.wc-stat .wc-stat-lab {
  font-size: calc(var(--wc-w) * 0.024);
  opacity: 0.75;
  margin-right: 4px;
  text-transform: uppercase;
}

/* HP / stamina strip under the card during a match — small overlay so the
   card itself stays clean. */
.wc-bars {
  margin-top: 10px;
  width: var(--wc-w);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wc-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wc-bar-row .wc-bar-lab { flex: 0 0 56px; }
.wc-bar-row .wc-bar {
  flex: 1;
  height: 10px;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #334155;
}
.wc-bar-row .wc-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #f59e0b);
  width: 100%;
  transition: width 300ms ease;
}
.wc-bar-row.stam .wc-bar > i {
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
}
.wc-bar-row .wc-bar-num { flex: 0 0 60px; text-align: right; font-variant-numeric: tabular-nums; }

/* Fight area: the two cards side by side with VS between them */
.fight-arena {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.fight-slot { text-align: center; }
.fight-slot .wc-card { margin: 0 auto; }
.fight-vs {
  align-self: center;
  font-family: "Impact", system-ui, sans-serif;
  font-size: 48px;
  color: #ffd76a;
  text-shadow: 0 0 12px rgba(255,120,60,0.6);
  letter-spacing: 0.1em;
}
@media (max-width: 700px) {
  .fight-vs { font-size: 32px; width: 100%; }
}

/* Editable "your wrestler" card: slightly raised */
#wrestlerCardWrap {
  position: relative;
  display: inline-block;
}
#wrestlerCardWrap .wc-card {
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
#wrestlerCardWrap:hover .wc-card {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(0,0,0,0.65), 0 0 0 2px rgba(255, 215, 110, 0.5) inset;
}

.wc-card.mirrored { transform: scaleX(-1); }
.wc-card.mirrored .wc-photo { transform: scaleX(-1); }
