/* ============================================================
   Matchup in 30s — style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Barlow+Condensed:wght@400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --gold:        #C89B3C;
  --gold-light:  #F0E6B2;
  --gold-dim:    #785A28;
  --bg-deep:     #010A13;
  --bg-card:     #0A1428;
  --bg-card2:    #091020;
  --bg-border:   #1E2D3D;
  --red:         #C8474A;
  --green:       #4FC88A;
  --blue:        #0BC4E3;
  --text-muted:  #5B6F7C;
  --text-body:   #A9B4C0;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-deep);
  color: var(--text-body);
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layer 1 — Summoner's Rift map (top-down, from LoL wiki) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../img/rift-map.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* Fade out toward edges so it blends naturally */
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%,
    rgba(0,0,0,1)   0%,
    rgba(0,0,0,.55) 50%,
    rgba(0,0,0,.1)  75%,
    transparent     100%
  );
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%,
    rgba(0,0,0,1)   0%,
    rgba(0,0,0,.55) 50%,
    rgba(0,0,0,.1)  75%,
    transparent     100%
  );
  opacity: .28;
  pointer-events: none;
  z-index: 0;
  will-change: auto;
  transform: translateZ(0);
}

/* Layer 2 — Dark overlays + gold ambient glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 10% 5%,  rgba(200,155,60,.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 95% 100%, rgba(1,10,19,.45)   0%, transparent 70%),
    linear-gradient(180deg, rgba(1,10,19,.3) 0%, transparent 25%, transparent 75%, rgba(1,10,19,.4) 100%);
  pointer-events: none;
  z-index: 0;
  will-change: auto;
  transform: translateZ(0);
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Topbar / Header ────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(1,10,19,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,155,60,.15);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.brand-sub {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .15em;
}

/* Nav */
.nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  transition: all .2s;
}

.nav-link:hover  { color: var(--gold-light); background: rgba(200,155,60,.08); }
.nav-link.active { color: var(--gold); background: rgba(200,155,60,.12); border-color: rgba(200,155,60,.2); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: linear-gradient(135deg, rgba(10,20,40,.85) 0%, rgba(9,16,32,.9) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--bg-border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 8px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  animation: fadeUp .5s ease both;
}

/* Top shimmer line */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Corner ambient */
.card::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(200,155,60,.05), transparent 70%);
  pointer-events: none;
}

/* ── Hero card (index) ──────────────────────────────────────── */
.hero { animation-delay: .05s; }

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--gold-light);
  text-shadow: 0 0 60px rgba(200,155,60,.25);
  margin-bottom: 12px;
}

.hero .muted:first-of-type {
  font-size: 15px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero strong { color: var(--gold-light); font-weight: 500; }

/* Controls grid */
.controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

select,
input[type="search"] {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--bg-border);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--text-body);
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}

select { cursor: pointer; }

select:focus,
input[type="search"]:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200,155,60,.1);
  color: var(--gold-light);
}

input[type="search"]::placeholder { color: var(--text-muted); }

/* Actions row */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--bg-border);
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover { border-color: var(--gold-dim); color: var(--gold-light); }

.btn.primary {
  padding: 11px 28px;
  background: linear-gradient(135deg, var(--gold-dim) 0%, var(--gold) 100%);
  border-color: transparent;
  color: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.1);
  opacity: 0;
  transition: opacity .2s;
}

.btn.primary:hover::before  { opacity: 1; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,155,60,.3); }
.btn.primary:active { transform: translateY(0); }

/* Hint */
.hint {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: .05em;
}

code {
  background: rgba(200,155,60,.08);
  border: 1px solid rgba(200,155,60,.15);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--gold-dim);
  font-size: 10px;
}

/* ── Section title (shared) ─────────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(200,155,60,.1);
}

.section-title h2 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Matchup grid (shared .grid) ────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── .item — card gerado pelo app.js / matchup.js ───────────── */
.item {
  background: linear-gradient(135deg, rgba(10,20,40,.78) 0%, rgba(9,16,32,.84) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color .22s, transform .22s, box-shadow .22s;
  will-change: transform;
  contain: layout style;
  position: relative;
  overflow: hidden;
  animation: fadeUp .5s ease both;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold-dim);
  opacity: 0;
  transition: opacity .2s;
}

.item:hover {
  border-color: rgba(200,155,60,.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.3), 0 0 0 1px rgba(200,155,60,.1);
}

.item:hover::before { opacity: 1; }

/* staggered animations removed for performance */

.item > div:first-child {
  flex: 1;
  min-width: 0;
}

.item > div:last-child {
  display: flex !important;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.item-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--gold-light);
  line-height: 1.2;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub {
  font-size: 13px;
  line-height: 1.4;
  color: #7A8B96;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Pill counters (IDs — não conflitam com .pill dos badges) ── */
#countPill,
#relCount {
  width: 28px; height: 28px;
  background: rgba(200,155,60,.1);
  border: 1px solid rgba(200,155,60,.2);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── .pill — badges dos cards (difficulty + tldr) ───────────── */
.item .pill {
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.08);
  width: auto;
  height: auto;
  display: inline-block;
}

.item .pill.warn {
  background: rgba(200,71,74,.15);
  color: var(--red);
  border: 1px solid rgba(200,71,74,.3);
}

.item .pill.good {
  background: rgba(79,200,138,.1);
  color: var(--green);
  border: 1px solid rgba(79,200,138,.25);
}

.item .pill:not(.warn):not(.good):first-of-type {
  background: rgba(200,155,60,.1);
  color: var(--gold);
  border: 1px solid rgba(200,155,60,.25);
}

/* ── matchup.html — page-specific ──────────────────────────── */

/* Back link */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.backlink:hover { color: var(--gold); }

/* Matchup hero header */
.matchup-hero { animation-delay: .05s; }

.matchup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.matchup-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(200,155,60,.2);
  line-height: 1.1;
  margin-bottom: 14px;
}

/* Lane / difficulty pills in the hero */
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta .pill {
  padding: 4px 12px;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  width: auto; height: auto;
  display: inline-block;
  /* default: lane (neutral) */
  background: rgba(255,255,255,.06);
  color: var(--text-body);
  border: 1px solid var(--bg-border);
}

.meta .pill.warn {
  background: rgba(200,71,74,.15);
  color: var(--red);
  border-color: rgba(200,71,74,.3);
}

.meta .pill.good {
  background: rgba(79,200,138,.1);
  color: var(--green);
  border-color: rgba(79,200,138,.25);
}

/* VS block */
.vs {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.champ {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200,155,60,.08);
  border: 1px solid rgba(200,155,60,.2);
  border-radius: 6px;
  padding: 10px 18px;
  min-width: 80px;
  text-align: center;
}

.vsText {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--text-muted);
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,155,60,.2), transparent);
  margin-bottom: 28px;
}

/* Two-column layout inside hero card */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Inner cards (TL;DR, Win condition) */
.card-inner {
  background: rgba(0,0,0,.25);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  padding: 20px 22px;
}

.card-inner h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* 2-column grid for Do/Don't and Key Window/Fatal */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.grid-2 .card {
  margin-top: 0;
  animation-delay: .1s;
}

.grid-2 .card h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text-body);
}

.grid-2 .card h2.good { color: var(--green); }
.grid-2 .card h2.bad  { color: var(--red); }

/* Keywindow / Fatal text */
.grid-2 .card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

/* Lists (TL;DR, Do, Don't) */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
  padding-left: 16px;
  position: relative;
}

.list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
  font-size: 10px;
  top: 3px;
}

/* Utility */
.muted { color: var(--text-muted); }

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0 48px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  position: relative;
  z-index: 1;
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .container { padding: 0 20px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .two-col  { grid-template-columns: 1fr; }
  .grid-2   { grid-template-columns: 1fr; gap: 0; }
  .matchup-header { flex-direction: column; }
  .vs { align-self: flex-start; }
}

@media (max-width: 600px) {
  .controls { grid-template-columns: 1fr; }
  .grid     { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .card { padding: 24px 20px; }
  .card-inner { padding: 16px; }
}
/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-border);
  grid-column: 1 / -1;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--bg-border);
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
  letter-spacing: .04em;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--gold-dim);
  color: var(--gold-light);
  background: rgba(200,155,60,.08);
}

.page-btn.active {
  background: rgba(200,155,60,.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

.page-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 4px;
  user-select: none;
}