/* ── VS Card — split-screen composite ── */

.vs-card-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Selectors row ── */
.vs-card-selectors {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
}

.vs-card-selectors label {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted, #b8c2d9);
}

.vs-card-selectors select {
  background: rgba(15, 25, 42, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  padding: 8px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  min-width: 220px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.vs-card-selectors select:focus {
  outline: none;
  border-color: var(--primary, #00d4ff);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

.vs-card-selectors .selector-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vs-card-selectors .vs-label {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary, #00d4ff);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
  padding: 0 16px;
  align-self: center;
}

/* ── Card ──
   Mirrors the generated PNG (core/services/vs_card/generator.py):
   20° diagonal seam, thin cyan line, frosted VS badge.
   --sep-offset MUST equal tan(--sep-angle) × --card-h: it drives BOTH the
   panel widths and the clip-paths, so the seam always lands exactly on the
   line whatever the card width. */
.vs-card {
  --card-h: 500px;
  --sep-angle: 20deg;
  --sep-offset: 182px;          /* tan(20°) × 500 ≈ 182 */
  --vs-primary: #00d4ff;
  --vs-muted: #b8c2d9;
  --vs-danger: #ff7a7a;

  position: relative;
  width: 100%;
  height: var(--card-h);
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1c, #0e1525);
  font-family: 'Inter', sans-serif;
  color: #ffffff;
  border-radius: 8px;
}

/* ── Ship panels ── */
.vs-card .ship-panel {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
}

.vs-card .ship-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.vs-card .ship-panel.left {
  left: 0;
  width: calc(50% + var(--sep-offset) / 2);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--sep-offset)) 100%, 0 100%);
}

.vs-card .ship-panel.left img {
  object-position: 60% center;
}

.vs-card .ship-panel.right {
  right: 0;
  width: calc(50% + var(--sep-offset) / 2);
  clip-path: polygon(var(--sep-offset) 0, 100% 0, 100% 100%, 0 100%);
}

.vs-card .ship-panel.right img {
  object-position: 40% center;
}

/* ── Separator — thin cyan line on the seam ──
   skewX about the centre maps the line ends to 50% ± (card-h / 2 × tan θ),
   i.e. exactly the clip-path corners above. */
.vs-card .separator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) skewX(calc(-1 * var(--sep-angle)));
  width: 3px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 212, 255, 0.4) 30%,
    rgba(0, 212, 255, 0.6) 50%,
    rgba(0, 212, 255, 0.4) 70%,
    transparent 100%
  );
}

/* ── VS badge — frosted glass, hides the line behind it ── */
.vs-card .vs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  pointer-events: none;
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 50%;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

/* ── Bottom bar ── */
.vs-card .bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(5, 10, 20, 0.6) 30%,
    rgba(5, 10, 20, 0.85) 100%
  );
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
  z-index: 20;
}

/* Both names white; the FROM/TO distinction is carried by the underline
   colour (red = source, cyan = target). Mirrored in the generated PNG. */
.vs-card .ship-name {
  flex: 1;
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  padding: 0 12px;
  transition: opacity 0.3s ease;
}

.vs-card .ship-name > span:not(.underline) {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-card .ship-name .underline {
  display: block;
  width: 60%;
  margin: 4px auto 0;
  height: 2px;
}

.vs-card .ship-name.from .underline {
  background: linear-gradient(90deg, transparent, var(--vs-danger), transparent);
  opacity: 0.6;
}

.vs-card .ship-name.to .underline {
  background: linear-gradient(90deg, transparent, var(--vs-primary), transparent);
  opacity: 0.8;
}

/* ── Empty state ── */
.vs-card .ship-panel .placeholder-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(0, 212, 255, 0.3);
  text-transform: uppercase;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .vs-card {
    --card-h: 260px;
    --sep-offset: 95px;         /* tan(20°) × 260 ≈ 95 — panels + clip follow */
  }

  .vs-card .vs-badge {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }

  /* Smaller names */
  .vs-card .ship-name {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .vs-card .bottom-bar {
    height: 36px;
    padding-bottom: 6px;
  }

  /* Smaller placeholder */
  .vs-card .ship-panel .placeholder-text {
    font-size: 10px;
    letter-spacing: 1.5px;
  }

  /* Selectors stack vertically */
  .vs-card-selectors {
    flex-direction: column;
    gap: 10px;
  }
  .vs-card-selectors .vs-label {
    font-size: 14px;
    padding: 0;
  }
  .vs-card-selectors select {
    min-width: 180px;
    font-size: 13px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .vs-card {
    --card-h: 200px;
    --sep-offset: 73px;         /* tan(20°) × 200 ≈ 73 */
  }

  .vs-card .vs-badge {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .vs-card .ship-name {
    font-size: 9px;
    letter-spacing: 0.5px;
  }

  .vs-card .bottom-bar {
    height: 30px;
    padding-bottom: 4px;
  }

  .vs-card .ship-panel .placeholder-text {
    font-size: 8px;
    letter-spacing: 1px;
  }
}
