/* ============================================================
   Share Card — Discord-thumb stat card (1000×600 PNG export)
   Visible preview is scaled to ~500×300 via CSS transform.
   ============================================================ */

.v2-share-section {
  margin-top: 28px;
}

.v2-share-card-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.6), rgba(11, 15, 29, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.5);
}

.v2-share-card-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.v2-share-frame {
  position: relative;
  width: 500px;
  height: 300px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  background: #06080f;
}

.v2-share-controls {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: 'Inter', system-ui, sans-serif;
}

.v2-share-helper {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #8c92a8;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
}

.v2-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.v2-share-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.8px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 6px 18px -6px rgba(129, 140, 248, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: filter 0.2s ease, transform 0.1s ease, background 0.2s ease;
}
.v2-share-btn:hover { filter: brightness(1.08); }
.v2-share-btn:active { transform: translateY(1px); }
.v2-share-btn:disabled { opacity: 0.7; cursor: progress; }
.v2-share-btn.copied {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  color: #06210f;
  box-shadow:
    0 6px 18px -6px rgba(34, 197, 94, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}
.v2-share-btn.secondary {
  background: rgba(238, 242, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f7fb;
  box-shadow: none;
  font-weight: 700;
}

/* === The card itself, rendered at native 1000×600 === */
.v2-share-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 1000px;
  height: 600px;
  transform: scale(0.5);
  transform-origin: top left;
  background:
    radial-gradient(ellipse 800px 500px at 100% 0%, rgba(52, 211, 153, 0.18), transparent 55%),
    radial-gradient(ellipse 700px 500px at 0% 100%, rgba(129, 140, 248, 0.10), transparent 55%),
    linear-gradient(180deg, #0c1020 0%, #06080f 100%);
  color: #f5f7fb;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 40px 52px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  --sc-stroke: #22d3ee;
  --sc-stroke-glow: rgba(34, 211, 238, 0.53);
  --sc-fill: 0%;
  --sc-pace: 0%;
}

/* Dotted nodemap background texture */
.v2-share-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(129, 140, 248, 0.5) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.18;
  pointer-events: none;
}

.v2-share-medallion {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 170px;
  height: 170px;
  opacity: 0.9;
  pointer-events: none;
  filter:
    drop-shadow(0 8px 22px rgba(34, 211, 238, 0.25))
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4));
  object-fit: contain;
  z-index: 1;
}

.sc-eyebrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}
.sc-eyebrow-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sc-stroke);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--sc-stroke) 20%, transparent),
    0 0 20px var(--sc-stroke);
}
.sc-eyebrow-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  letter-spacing: 3.5px;
  color: var(--sc-stroke);
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-hero {
  position: relative;
  margin-top: -8px;
  z-index: 2;
}
.sc-hero-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  letter-spacing: 3px;
  color: #8c92a8;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
/* Goal name in the kicker — slight indigo lift so the eye reads
   "TRACKING TO" (gray) → "EMERALD IV" (indigo) → "SILVER II" (gradient hero) */
.sc-kicker-goal {
  color: #818cf8;
  font-weight: 800;
  letter-spacing: 3.2px;
  text-shadow: 0 0 18px rgba(129, 140, 248, 0.35);
}
.sc-kicker-goal[hidden] { display: none; }
.sc-hero-title {
  margin: 0;
  font-family: 'Bebas Neue', system-ui, sans-serif;
  font-size: 180px;
  line-height: 0.85;
  letter-spacing: 0.005em;
  font-weight: 700;
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 22px rgba(52, 211, 153, 0.4));
  text-transform: uppercase;
  white-space: nowrap;
}

.sc-foot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 2;
}
.sc-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.sc-stat-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  letter-spacing: 3px;
  color: #8c92a8;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.sc-stat-value {
  font-family: 'Bebas Neue', system-ui, sans-serif;
  font-size: 72px;
  letter-spacing: 0.01em;
  line-height: 0.9;
  font-weight: 700;
  color: #f5f7fb;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.sc-stat-value.accent { color: var(--sc-stroke); }
.sc-stat-unit {
  font-size: 22px;
  color: #8c92a8;
}
.sc-stat-sub {
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 2px;
  color: #5a6078;
  font-weight: 700;
  text-transform: uppercase;
}

.sc-bar {
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset;
}
.sc-bar-fill {
  position: absolute;
  inset: 0;
  width: var(--sc-fill);
  background: linear-gradient(90deg, #818cf8, var(--sc-stroke));
  box-shadow:
    0 0 18px var(--sc-stroke-glow),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: width 0.4s ease;
}
.sc-bar-marker {
  position: absolute;
  left: var(--sc-pace, 0%);
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.sc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 700;
  white-space: nowrap;
}
.sc-meta-pts { color: #f5f7fb; }
.sc-meta-url { color: #f5a623; font-weight: 800; letter-spacing: 2.4px; }

/* Mobile: stack and let frame fill width (JS rescales the card) */
@media (max-width: 720px) {
  .v2-share-card-row { flex-direction: column; align-items: stretch; }
  .v2-share-frame {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 5 / 3;
    margin: 0 auto;
  }
  .v2-share-actions { justify-content: stretch; }
  .v2-share-btn { flex: 1; min-width: 140px; }
}
