/*
 * shared.css — Low-Code Battle
 * ─────────────────────────────────────────────────────────
 * Consumed by every page in the site. Each page defines its
 * own battle-colour variables before this file is loaded:
 *
 *   --a, --a-dark, --a-glow, --a-light   (Platform A — always Mendix blue)
 *   --b, --b-dark, --b-glow, --b-light   (Platform B — changes per battle)
 *
 * Structural rules reference those vars so fighter cards,
 * score pills, result bars, and orbs re-colour automatically.
 * ─────────────────────────────────────────────────────────
 */

/* ── BASE VARIABLES ── */
:root {
  --bg:           #080c14;
  --surface:      rgba(255,255,255,0.05);
  --surface-hover:rgba(255,255,255,0.09);
  --border:       rgba(255,255,255,0.1);
  --border-hover: rgba(255,255,255,0.22);
  --text:         #f0f4ff;
  --text-muted:   rgba(240,244,255,0.72);
  --radius:       18px;
}

/* prevent horizontal overflow from wide tables / matrices on comparison pages
   from shifting fixed-position nav elements outside the visual viewport;
   html (not just body) is needed on Android — wide content expands the ICB */
html, body { overflow-x: hidden; }

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -100%; left: 8px;
  background: var(--a); color: #fff;
  padding: 8px 18px; border-radius: 0 0 8px 8px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  z-index: 9999; transition: top 0.15s;
}
.skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── BACKGROUND ORBS ── */
.bg-orbs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  animation: drift 20s ease-in-out infinite alternate;
}
.orb-1 { width: 700px; height: 700px; background: var(--a); opacity: 0.13; top: -250px; left: -200px; animation-duration: 22s; }
.orb-2 { width: 600px; height: 600px; background: var(--b); opacity: 0.12; bottom: -200px; right: -150px; animation-duration: 28s; animation-delay: -10s; }
.orb-3 { width: 400px; height: 400px; background: #6d28d9; opacity: 0.08; top: 45%; left: 42%; animation-duration: 17s; animation-delay: -6s; }

@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px,30px) scale(1.1); }
}

/* ── SITE NAV ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 32px; height: 70px;
  background: rgba(8,12,20,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-nav-lcse {
  display: flex; align-items: center; flex-shrink: 0;
  margin-right: 6px; padding-right: 14px;
  border-right: 1px solid rgba(255,255,255,0.14);
  opacity: 0.92; transition: opacity 0.18s;
}
.site-nav-lcse:hover { opacity: 1; }
.site-nav-lcse img { height: 50px; width: auto; display: block; }
.site-nav-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; font-size: 14px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px; flex-shrink: 0;
}
.site-nav-logo span { opacity: 0.4; font-weight: 400; margin: 0 2px; }
/* right-zone wrapper — pushes everything after the logo to the far right */
.site-nav-right {
  display: flex; align-items: center; gap: 16px; margin-left: auto;
}
.site-nav-links { display: flex; align-items: center; gap: 4px; }
/* per-battle links hidden from desktop nav; drawer JS still picks them up */
.site-nav-links .nav-drawer-only { display: none; }
/* thin vertical separator between nav groups */
.nav-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.15); flex-shrink: 0;
  margin: 0 4px;
}
.site-nav-links a {
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,0.55); transition: all 0.18s; white-space: nowrap;
}
.site-nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav-links a.active { color: #fff; background: rgba(255,255,255,0.1); }
.site-nav-links a.cta {
  background: linear-gradient(135deg, var(--a, #0595DB), #3b5bdb);
  color: #fff !important; margin-left: 6px;
  box-shadow: 0 2px 12px var(--a-glow, rgba(5,149,219,0.35));
}
.site-nav-links a.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--a-glow, rgba(5,149,219,0.5));
}

/* ── DISCLAIMER BAR ── */
.disclaimer-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 24px;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.72rem; color: rgba(240,244,255,0.38);
  line-height: 1.4; text-align: center;
}
.disclaimer-bar svg { flex-shrink: 0; opacity: 0.4; }

/* ── DISCLAIMER DRAWER (mobile) ── */
@media (max-width: 768px) {
  .disclaimer-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
  }
  .disclaimer-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    font-size: 0.72rem;
    color: rgba(240,244,255,0.38);
    text-align: center;
    line-height: 1.5;
  }
  .disclaimer-bar.disc-open .disclaimer-body {
    max-height: 120px;
    padding: 6px 20px 4px;
  }
  .disclaimer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.73rem;
    color: rgba(240,244,255,0.5);
  }
  .disc-chevron {
    opacity: 0.6 !important;
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
  .disclaimer-bar.disc-open .disc-chevron {
    transform: rotate(180deg);
  }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--a, #0595DB), #3b5bdb);
  color: #fff; text-decoration: none; border-radius: 14px;
  padding: 17px 36px; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 32px var(--a-glow, rgba(5,149,219,0.4));
  transition: all 0.25s; letter-spacing: 0.2px; border: none; cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px var(--a-glow, rgba(5,149,219,0.55));
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text); text-decoration: none; border-radius: 14px;
  padding: 17px 32px; font-size: 16px; font-weight: 600;
  transition: all 0.25s; cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ── FIGHTER CARDS ── */
.vs-arena {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch;
}
.fighter-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.fighter-card.a:hover { transform: translateY(-4px); box-shadow: 0 20px 60px var(--a-glow); }
.fighter-card.b:hover { transform: translateY(-4px); box-shadow: 0 20px 60px var(--b-glow); }
.fighter-head {
  padding: 28px 28px 24px; color: #fff;
  position: relative; overflow: hidden;
}
.fighter-head.a { background: linear-gradient(140deg, var(--a), var(--a-dark) 80%); }
.fighter-head.b { background: linear-gradient(140deg, var(--b), var(--b-dark) 80%); }
.fighter-head::after {
  content: ''; position: absolute;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.07); top: -80px; right: -60px;
}
.fighter-tag {
  display: inline-block; background: rgba(255,255,255,0.2);
  border-radius: 100px; padding: 3px 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 10px; position: relative;
}
.fighter-name { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.5px; position: relative; }
.fighter-owned { font-size: 0.78rem; opacity: 0.65; margin-top: 4px; position: relative; }
.fighter-body { background: rgba(255,255,255,0.03); padding: 22px 28px; }
.fighter-stat {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.85rem;
}
.fighter-stat:last-child { border-bottom: none; padding-bottom: 0; }
.fighter-stat-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; margin-top: 1px; }
.fighter-stat-label {
  color: rgba(240,244,255,0.45); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 2px;
}
.fighter-stat-val { color: var(--text); font-weight: 600; line-height: 1.35; }

/* ── VS DIVIDER ── */
.vs-divider {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.vs-badge {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; letter-spacing: -1px; color: rgba(255,255,255,0.5);
}
.vs-line { width: 1px; flex: 1; background: rgba(255,255,255,0.08); min-height: 40px; }

/* ── UTILITY ── */
.hidden { display: none !important; }
.page { position: relative; z-index: 1; }
/* clip slide-in/out animation overflow so Android browsers don't widen the
   layout viewport and misplace position:fixed elements (hamburger, nav) */
.stage { overflow-x: hidden; }

/* ── LANGUAGE SWITCHER ── */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  margin-left: 12px; flex-shrink: 0;
}
.lang-opt {
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  color: rgba(240,244,255,0.45); text-decoration: none; transition: all 0.2s;
}
.lang-opt:hover { color: #fff; background: rgba(255,255,255,0.07); }
.lang-opt.active { color: #fff; background: rgba(255,255,255,0.15); font-weight: 800; }

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none; cursor: pointer;
  padding: 0; margin-left: 8px; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 100%; height: 2px;
  background: rgba(240,244,255,0.8); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── SLIDE-IN DRAWER ── */
.nav-drawer {
  position: fixed; top: 0; right: 0;
  width: 280px; height: 100vh;
  background: rgba(10, 12, 28, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200; padding: 80px 20px 32px;
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-links {
  display: flex; flex-direction: column; gap: 4px;
}
.nav-drawer-links a {
  display: block; padding: 10px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  color: rgba(240,244,255,0.65); text-decoration: none;
  transition: all 0.2s;
}
.nav-drawer-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-drawer-links a.active { color: #fff; background: rgba(255,255,255,0.1); }
.nav-drawer-links a.cta {
  margin-top: 8px; color: rgba(124,58,237,0.9);
  border: 1px solid rgba(124,58,237,0.3);
}
.nav-drawer-links a.cta:hover { background: rgba(124,58,237,0.12); color: #a78bfa; }

.nav-drawer-divider {
  height: 1px; background: rgba(255,255,255,0.08);
  margin: 16px 0;
}
.nav-drawer-lang {
  display: flex; gap: 6px; padding: 0 14px;
}
.nav-drawer-lang .lang-opt {
  padding: 6px 16px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  color: rgba(240,244,255,0.7); text-decoration: none; transition: all 0.2s;
  background: rgba(255,255,255,0.05);
}
.nav-drawer-lang .lang-opt:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-drawer-lang .lang-opt.active { color: #fff; background: rgba(255,255,255,0.15); }

/* ── OVERLAY ── */
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 199;
}
.nav-overlay.active { opacity: 1; pointer-events: all; }

/* ── BATTLE BAR (mobile — when JS moves it to body) ── */
body > .battle-bar {
  position: fixed; top: 70px; left: 0; right: 0; height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 299;
}

/* ── RESPONSIVE BASE ── */

/* Nav collapses to hamburger at ≤900px — compact 3-link desktop nav fits above that.
   Battle bar JS also moves to body at ≤900px; push stage below nav+bar. */
@media (max-width: 900px) {
  .site-nav-links { display: none; }
  .nav-sep { display: none; }
  .lang-switch { display: none; }
  .nav-hamburger {
    display: flex;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
  }
  .stage { padding-top: 130px; }
}

/* Mobile-only layout adjustments */
@media (max-width: 768px) {
  .site-nav { padding: 0 18px; }
  .vs-arena { grid-template-columns: 1fr; }
  .vs-divider { flex-direction: row; }
  .vs-line { width: 40px; height: 1px; min-height: unset; }
  .btn-print { display: none !important; }
}

@media (max-width: 600px) {
  /* battle game mobile fixes */
  .q-card { padding: 24px 20px 28px; }
  .option-desc { display: none !important; }
  .breakdown-verdict { display: none; }
  .option:hover { transform: none; }
  .option.selected { transform: none; }
}
