/**
 * Free Fire Nation — Compare Tool (single-compare.php)
 * assets/css/compare.css
 *
 * Deliberately reuses the --fcb-* variable names already defined in
 * skill-combo.css (same site, same palette: --primary-color #241164,
 * --secondary-color #e76c1e, Google Sans Flex) so this page feels like
 * a sibling of the Skill Combo Builder, not a bolted-on new style.
 *
 * Design note: per the one-signature-element rule, the single bold
 * moment on this page is the tag-driven "ability pulse" animation on
 * each side of the VS card (see .fcp-pulse-* below) — everything else
 * (grid, type, spacing) stays disciplined and matches the rest of the
 * site so the animation reads as a feature, not as decoration.
 */

:root {
  --fcp-bg:         var(--fcb-bg, #ffffff);
  --fcp-surface:    var(--fcb-surface, #ffffff);
  --fcp-surface2:   var(--fcb-surface2, #f8f9fc);
  --fcp-border:     var(--fcb-border, #e0e4ed);
  --fcp-accent:     var(--fcb-accent, #e76c1e);
  --fcp-accent2:    var(--fcb-accent2, #f7c948);
  --fcp-blue:       var(--fcb-blue, #241164);
  --fcp-green:      var(--fcb-green, #1a8f46);
  --fcp-text:       var(--fcb-text, #0f0f0f);
  --fcp-text-muted: var(--fcb-text-muted, #5c6b8a);
  --fcp-radius:     var(--fcb-radius, 10px);
  --fcp-radius-sm:  var(--fcb-radius-sm, 6px);
  --fcp-font:       var(--fcb-font, "Google Sans Flex", sans-serif);
}

#ffn-compare {
  font-family: var(--fcp-font);
  color: var(--fcp-text);
  background: var(--fcp-bg);
}

.fcp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ============================================================
   HEADER — matches .fcb-header gradient convention
   ============================================================ */

.fcp-badge {
  display: inline-block;
  background: var(--fcp-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.fcp-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.15;
}
.fcp-title span { color: var(--fcp-accent); }

/* ============================================================
   VS MATCHUP CARD — the centerpiece
   ============================================================ */
.fcp-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}
@media (max-width: 720px) {
  .fcp-matchup { grid-template-columns: 1fr; }
  .fcp-vs-badge { margin: 4px auto; }
}

.fcp-side {
  background: var(--fcp-surface);
  border: 1px solid var(--fcp-border);
  border-radius: var(--fcp-radius);
  padding: 22px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.fcp-side.tier-s { border-top: 4px solid var(--fcp-accent); }
.fcp-side.tier-a { border-top: 4px solid var(--fcp-accent2); }
.fcp-side.tier-b { border-top: 4px solid var(--fcp-blue); }
.fcp-side.tier-c { border-top: 4px solid #9aa3b2; }

.fcp-portrait-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}


.fcp-portrait-fallback {
  font-size: 56px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--fcp-surface2);
  border: 3px solid var(--fcp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.fcp-tier-chip {
  position: absolute;
  top: -6px;
  right: calc(50% - 66px - 4px);
  background: var(--fcp-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  z-index: 3;
}

.fcp-name { font-size: 19px; font-weight: 800; margin: 0 0 2px; }
.fcp-role { color: var(--fcp-text-muted); font-size: 13px; margin: 0 0 12px; }

.fcp-skill-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--fcp-blue);
  margin: 0 0 4px;
}
.fcp-skill-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.fcp-skill-type.active  { background: var(--orange-light, #ffe9dc); color: var(--fcp-accent); }
.fcp-skill-type.passive { background: var(--fcb-primary-light, #eae1f9); color: var(--fcp-blue); }

.fcp-skill-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fcp-text);
  margin: 0 0 14px;
}

.fcp-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fcp-tag {
  font-size: 11px;
  background: var(--fcp-surface2);
  border: 1px solid var(--fcp-border);
  color: var(--fcp-text-muted);
  padding: 2px 8px;
  border-radius: 12px;
}
.fcp-tag.fcp-tag-shared {
  background: var(--orange-light, #ffe9dc);
  border-color: var(--fcp-accent);
  color: var(--fcp-accent);
  font-weight: 600;
}

.fcp-vs-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fcp-blue);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(36,17,100,0.25);
  z-index: 4;
}

/* ============================================================
   SIGNATURE ELEMENT — tag-driven ability pulse
   One ring animation per side, color + speed mapped to the item's
   own tags, so two different matchups visibly move differently.
   Respects prefers-reduced-motion at the bottom of this file.
   ============================================================ */
.fcp-pulse-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}
.fcp-pulse-ring::before,
.fcp-pulse-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
}
.fcp-pulse-ring.fcp-pulse-active::before { animation: fcp-pulse-out 2.4s ease-out infinite; }
.fcp-pulse-ring.fcp-pulse-active::after  { animation: fcp-pulse-out 2.4s ease-out infinite 1.2s; }

/* tag → color + feel mapping */
.fcp-pulse-heal     { color: var(--fcp-green); }
.fcp-pulse-speed     { color: var(--fcp-accent2); }
.fcp-pulse-shield, .fcp-pulse-defense { color: var(--fcp-blue); }
.fcp-pulse-damage, .fcp-pulse-aggressive { color: #d8392a; }
.fcp-pulse-default   { color: var(--fcp-text-muted); }

@keyframes fcp-pulse-out {
  0%   { transform: scale(0.86); opacity: 0.55; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* fast "speed" tag = quicker streak instead of slow ripple */
.fcp-pulse-ring.fcp-pulse-speed.fcp-pulse-active::before,
.fcp-pulse-ring.fcp-pulse-speed.fcp-pulse-active::after {
  animation-duration: 1.1s;
  border-style: dashed;
}

/* ============================================================
   STAT BARS (weapons mainly — characters can skip)
   ============================================================ */
.fcp-stats-block { margin-top: 26px; }
.fcp-stats-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fcp-text-muted);
  margin-bottom: 12px;
}
.fcp-stat-row { margin-bottom: 14px; }
.fcp-stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 5px;
}
.fcp-stat-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  height: 8px;
}
.fcp-stat-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--fcp-surface2);
  overflow: hidden;
  position: relative;
}
.fcp-stat-fill {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}
.fcp-stat-bar.fcp-side-a .fcp-stat-fill { right: 0; background: var(--fcp-blue); }
.fcp-stat-bar.fcp-side-b .fcp-stat-fill { left: 0;  background: var(--fcp-accent); }

/* ============================================================
   AI VERDICT BLOCK
   ============================================================ */
.fcp-verdict-section {
  background: var(--fcp-surface2);
  border: 1px solid var(--fcp-border);
  border-radius: var(--fcp-radius);
  padding: 24px;
  margin-bottom: 28px;
}
.fcp-verdict-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fcp-accent);
  margin-bottom: 10px;
}
.fcp-verdict-overview { font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
.fcp-verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .fcp-verdict-grid { grid-template-columns: 1fr; } }
.fcp-verdict-card {
  background: var(--fcp-surface);
  border: 1px solid var(--fcp-border);
  border-radius: var(--fcp-radius-sm);
  padding: 16px;
}
.fcp-verdict-card h4 { margin: 0 0 4px; font-size: 14px; }
.fcp-verdict-best-for {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--orange-light, #ffe9dc);
  color: var(--fcp-accent);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.fcp-verdict-card p { font-size: 13.5px; line-height: 1.55; margin: 0; color: var(--fcp-text); }
.fcp-verdict-stale-note {
  font-size: 11px;
  color: var(--fcp-text-muted);
  margin-top: 14px;
  font-style: italic;
}

/* ============================================================
   FAQ
   ============================================================ */
.fcp-faq-section { margin-bottom: 28px; }
.fcp-faq-item {
  border-bottom: 1px solid var(--fcp-border);
  padding: 14px 0;
}
.fcp-faq-q { font-weight: 700; font-size: 14.5px; margin: 0 0 6px; }
.fcp-faq-a { font-size: 13.5px; line-height: 1.6; color: var(--fcp-text-muted); margin: 0; }

/* ============================================================
   RELATED MATCHUPS
   ============================================================ */
.fcp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.fcp-related-card {
  display: block;
  background: var(--fcp-surface);
  border: 1px solid var(--fcp-border);
  border-radius: var(--fcp-radius-sm);
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--fcp-text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.fcp-related-card:hover {
  border-color: var(--fcp-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ============================================================
   MOTION SAFETY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fcp-pulse-ring::before,
  .fcp-pulse-ring::after { animation: none !important; }
  .fcp-stat-fill { transition: none !important; }
}
