:root {
  --bg: #061427;
  --bg-2: #0c2045;
  --card: rgba(255, 255, 255, 0.96);
  --card-soft: rgba(255, 255, 255, 0.88);
  --ink: #142033;
  --muted: #637087;
  --line: rgba(20, 32, 51, 0.12);
  --primary: #0aa36e;
  --primary-dark: #057a58;
  --accent: #f6c445;
  --accent-2: #ff6b35;
  --sky: #33c3f0;
  --danger: #c81e3a;
  --ok: #078b5f;
  --warn: #d97706;
  --shadow: 0 22px 70px rgba(4, 10, 24, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(51, 195, 240, .30), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(246, 196, 69, .28), transparent 28%),
    linear-gradient(180deg, var(--bg), #10234a 38%, #eef4fb 38.1%, #f5f8fc 100%);
  color: var(--ink);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px clamp(18px, 4vw, 54px) 42px;
  min-height: 300px;
  color: white;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 260px) auto;
  gap: 24px;
  align-items: start;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 32px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -180px;
  top: -200px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,.22) 0 2px, transparent 3px 100%),
    conic-gradient(from 20deg, rgba(255,255,255,.10), rgba(10,163,110,.22), rgba(246,196,69,.24), rgba(51,195,240,.18), rgba(255,255,255,.10));
  background-size: 28px 28px, auto;
  filter: blur(.2px);
  opacity: .72;
}

.hero-copy, .hero-visual, .header-actions { position: relative; z-index: 1; }

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 8vw, 78px);
  line-height: .92;
  letter-spacing: -0.065em;
  font-weight: 950;
  text-wrap: balance;
  text-shadow: 0 12px 32px rgba(0,0,0,.30);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
}

.eyebrow::before { content: "🏟️"; letter-spacing: 0; }

.subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  line-height: 1.55;
  opacity: 0.94;
  font-size: clamp(16px, 2.2vw, 20px);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.95);
  font-weight: 800;
  font-size: 13px;
}

.hero-visual {
  align-self: center;
  display: grid;
  place-items: center;
}

.match-card-mini {
  position: relative;
  min-width: 190px;
  border-radius: 30px;
  padding: 26px 22px;
  color: #06203a;
  background:
    linear-gradient(150deg, rgba(255,255,255,.98), rgba(255,255,255,.78)),
    linear-gradient(135deg, var(--accent), var(--sky));
  box-shadow: 0 28px 80px rgba(0,0,0,.30);
  transform: rotate(3deg);
  border: 1px solid rgba(255,255,255,.65);
}

.match-card-mini::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(10, 37, 64, .17);
  border-radius: 22px;
}

.ball-mark { display: block; font-size: 38px; margin-bottom: 8px; }
.match-card-mini strong { display: block; font-size: 46px; line-height: 1; letter-spacing: -.06em; }
.match-card-mini small { display: block; margin-top: 8px; font-weight: 900; color: #4a5870; }

.header-actions { display: grid; gap: 8px; justify-items: end; }

.status-pill {
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 850;
}

.logout-btn {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.30);
  color: white;
  padding: 9px 13px;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: -24px auto 0;
  padding: 0 18px 22px;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 28px;
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  text-align: center;
  max-width: 650px;
  margin: 28px auto 0;
}

.login-card::before {
  content: "⚽";
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fff6c7);
  box-shadow: 0 12px 28px rgba(246, 196, 69, .35);
  font-size: 28px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.2vw, 30px);
  letter-spacing: -.035em;
}

.muted { color: var(--muted); line-height: 1.48; }
.mini-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.account-line {
  border: 1px solid rgba(10, 163, 110, .18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(10,163,110,.08), rgba(51,195,240,.08));
  padding: 12px 14px;
  color: #44536a;
  font-weight: 700;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
label { display: grid; gap: 7px; color: #253248; font-weight: 850; }

input {
  width: 100%;
  border: 1px solid rgba(20, 32, 51, .14);
  border-radius: 18px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input:focus {
  border-color: rgba(10, 163, 110, .55);
  box-shadow: 0 0 0 4px rgba(10, 163, 110, .13);
}

.check { display: flex; align-items: center; gap: 10px; margin-top: 29px; }
.check input { width: auto; }

button {
  border: 0;
  border-radius: 17px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #0bbf80);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(10, 163, 110, .22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button:hover { transform: translateY(-1px); filter: brightness(.98); box-shadow: 0 16px 34px rgba(10, 163, 110, .28); }
button:active { transform: translateY(0); }
button.secondary { background: #edf2f7; color: var(--ink); box-shadow: none; }
button.active-need { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 12px 26px rgba(249, 115, 22, .20); }
button.active-dupe { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 12px 26px rgba(16, 185, 129, .20); }

.map-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 16px; margin-top: 16px; }
#map {
  width: 100%;
  min-height: 350px;
  border-radius: 24px;
  border: 1px solid rgba(20, 32, 51, .14);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 12px 30px rgba(5, 20, 44, .08);
}
.map-help {
  border: 1px dashed rgba(10, 163, 110, .28);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(10,163,110,.07), rgba(51,195,240,.07)),
    #fff;
}
.map-help strong { font-size: 17px; }

.tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tools input { flex: 1 1 260px; }

.stickers { display: grid; gap: 14px; }
.team-block {
  border: 1px solid rgba(20, 32, 51, .10);
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 28px rgba(17, 24, 39, .05);
}
.team-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: -.01em;
  background: #0c2045;
  color: #fff;
}
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; }
.sticker-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 32, 51, .10);
  border-radius: 20px;
  padding: 12px;
  display: grid;
  gap: 9px;
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sticker-item::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246,196,69,.22), transparent 60%);
}
.sticker-item:hover { transform: translateY(-2px); border-color: rgba(10, 163, 110, .24); box-shadow: 0 14px 32px rgba(5, 20, 44, .08); }
.sticker-code { font-weight: 1000; font-size: 18px; letter-spacing: -.02em; }
.sticker-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.sticker-actions button { padding: 9px 10px; font-size: 13px; flex: 1; border-radius: 14px; }

.matches { display: grid; gap: 14px; margin-top: 14px; }
.match-card {
  border: 1px solid rgba(10, 163, 110, .18);
  border-radius: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(10,163,110,.07), rgba(246,196,69,.08)), #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .06);
}
.match-card h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef8ff, #fff9dc);
  border: 1px solid rgba(20, 32, 51, .10);
  padding: 6px 10px;
  margin: 4px;
  font-size: 13px;
  font-weight: 950;
}
.good { color: var(--ok); }
.bad { color: var(--danger); }
.warn { color: var(--warn); }
footer { text-align: center; color: #6b7486; padding: 28px 18px 34px; }
code { background: #eef2f7; padding: 2px 5px; border-radius: 6px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr auto; }
  .hero-visual { display: none; }
}

@media (max-width: 760px) {
  body { background: linear-gradient(180deg, var(--bg), #10234a 34%, #eef4fb 34.1%, #f5f8fc 100%); }
  .hero { display: block; padding: 26px 18px 38px; min-height: auto; }
  .hero::before { inset: 10px; border-radius: 24px; }
  .header-actions { justify-items: start; margin-top: 16px; }
  .status-pill { display: inline-block; }
  .hero h1 { font-size: clamp(38px, 13vw, 54px); }
  .hero-chips span { font-size: 12px; }
  .layout { margin-top: -18px; padding-inline: 12px; }
  .grid2, .map-row { grid-template-columns: 1fr; }
  .check { margin-top: 0; }
  .tools { display: grid; grid-template-columns: 1fr; }
  .tools input { min-width: 0; }
  .sticker-grid { grid-template-columns: 1fr; }
}

/* UMQM: selector por país para evitar listado gigante */
.album-card { overflow: hidden; }
.album-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin: 16px 0 14px;
  border-radius: 999px;
  background: #edf3fb;
  border: 1px solid rgba(20, 32, 51, .09);
}
.mode-tab {
  box-shadow: none;
  border-radius: 999px;
  background: transparent;
  color: #536176;
  padding: 10px 14px;
}
.mode-tab.active {
  background: linear-gradient(135deg, var(--primary), #0bbf80);
  color: #fff;
  box-shadow: 0 12px 26px rgba(10, 163, 110, .22);
}
.album-workbench {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-top: 6px;
}
.country-picker, .selected-team-panel, .my-list-box {
  border: 1px solid rgba(20, 32, 51, .10);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 28px rgba(17, 24, 39, .05);
}
.country-picker { padding: 14px; }
.search-label { font-size: 14px; }
.team-suggestions { display: grid; gap: 8px; margin-top: 12px; }
.suggestion-hint {
  margin: 0;
  padding: 13px;
  border-radius: 18px;
  background: #f1f6fb;
  font-size: 13px;
}
.team-suggestion {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(20, 32, 51, .10);
  box-shadow: none;
  padding: 10px;
  border-radius: 18px;
}
.team-suggestion:hover, .team-suggestion.selected {
  border-color: rgba(10, 163, 110, .30);
  box-shadow: 0 14px 32px rgba(5, 20, 44, .08);
}
.team-flag {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef5ff;
  font-size: 26px;
}
.team-name { display: grid; gap: 2px; min-width: 0; }
.team-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-name small { color: var(--muted); font-weight: 800; }
.team-counts { display: grid; gap: 4px; justify-items: end; }
.team-counts span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: #536176;
  font-size: 12px;
  font-weight: 950;
}
.selected-team-panel { padding: 14px; min-height: 220px; }
.empty-team-message {
  display: grid;
  place-content: center;
  min-height: 200px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10,163,110,.06), rgba(51,195,240,.07));
  padding: 18px;
}
.empty-team-message strong { color: var(--ink); font-size: 18px; }
.empty-team-message p { margin: 8px auto 0; max-width: 430px; line-height: 1.45; }
.selected-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.selected-team-head > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.big-flag { grid-row: span 2; font-size: 36px; }
.selected-team-head strong { font-size: 22px; letter-spacing: -.03em; }
.selected-team-head small { color: var(--muted); font-weight: 850; }
.mode-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 10px;
  background: #0c2045;
  color: white;
  font-size: 12px;
  font-weight: 950;
}
.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.number-chip-wrap {
  display: grid;
  gap: 6px;
}
.number-chip {
  position: relative;
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(20, 32, 51, .11);
  box-shadow: none;
  border-radius: 17px;
  padding: 8px 6px;
  width: 100%;
}
.number-chip strong { font-size: 20px; line-height: 1; }
.number-chip small { color: var(--muted); font-weight: 900; }
.number-chip.need-on {
  background: linear-gradient(135deg, #fff3d5, #ffedd5);
  border-color: rgba(249, 115, 22, .35);
  color: #8a3b08;
}
.number-chip.dupe-on {
  background: linear-gradient(135deg, #dcfce7, #eafff4);
  border-color: rgba(16, 185, 129, .38);
  color: #065f46;
}
.number-chip.both-on { outline: 3px solid rgba(51, 195, 240, .18); }
.mini-state {
  position: absolute;
  top: 5px;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 10px;
  font-weight: 1000;
}
.need-state { right: 5px; background: #f97316; }
.dupe-state { right: 27px; background: #10b981; }
.qty-badge {
  position: absolute;
  left: 5px;
  top: 5px;
  min-width: 28px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #0c2045;
  color: #fff;
  font-size: 10px;
  font-weight: 1000;
}
.qty-controls {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 5px;
}
.qty-btn {
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  box-shadow: none;
  background: #0c2045;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}
.qty-label {
  min-height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #065f46;
  font-size: 12px;
  font-weight: 1000;
}
.my-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.my-list-box { padding: 14px; }
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.list-head strong { font-size: 18px; letter-spacing: -.02em; }
.list-head span {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #0c2045;
  color: #fff;
  font-weight: 1000;
}
.code-chip-list { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.summary-chip {
  border-radius: 999px;
  padding: 7px 10px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}
.summary-chip.need-summary { background: #fff3d5; color: #8a3b08; }
.summary-chip.dupe-summary { background: #dcfce7; color: #065f46; }
.more-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: #edf2f7;
  color: #536176;
  font-size: 13px;
  font-weight: 900;
}
.compact-tools { justify-content: flex-end; margin-top: 14px; }

@media (max-width: 760px) {
  .album-tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; width: 100%; }
  .mode-tab { border-radius: 16px; }
  .album-workbench, .my-lists { grid-template-columns: 1fr; }
  .team-suggestion { grid-template-columns: 38px 1fr; }
  .team-counts { grid-column: 1 / -1; display: flex; justify-content: flex-start; }
  .selected-team-head { display: grid; }
  .mode-pill { width: max-content; }
  .number-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .compact-tools { justify-content: stretch; }
}
