/* Paleta inspirada Mundial 2026: verde cancha, oro trofeo, azul noche */
:root {
  --wc-green: #0b4f2c;
  --wc-green-bright: #1a936f;
  --wc-gold: #d4af37;
  --wc-gold-soft: #e8c547;
  --wc-night: #0a1628;
  --wc-card: #111f33;
  --wc-text: #e8f1ec;
  --wc-muted: #9fb3a8;
  --wc-danger: #e85d4c;
  --wc-ok: #3ecf8e;
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #143d28 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a3a5c 0%, transparent 50%),
    var(--wc-night);
  color: var(--wc-text);
}

a {
  color: var(--wc-gold-soft);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--wc-text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--wc-gold);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(var(--wc-gold), var(--wc-green-bright), var(--wc-gold));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
}
.btn:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.btn-primary {
  background: linear-gradient(135deg, var(--wc-green-bright), var(--wc-green));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--wc-text);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-gold {
  background: linear-gradient(135deg, var(--wc-gold-soft), #b8891a);
  color: #1a1203;
  border-color: rgba(0, 0, 0, 0.15);
}

.hero {
  padding: 3.5rem 0 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero p.lead {
  margin: 0 0 1.5rem;
  color: var(--wc-muted);
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-card {
  background: linear-gradient(160deg, rgba(26, 147, 111, 0.18), rgba(10, 22, 40, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.2);
  color: var(--wc-gold-soft);
  margin-bottom: 0.75rem;
}

.card {
  background: var(--wc-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.muted {
  color: var(--wc-muted);
  font-size: 0.92rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}
.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: var(--wc-text);
  font-family: var(--font);
  /* iOS Safari hace zoom si el texto del campo es <16px (p. ej. hereda 0.9rem del label) */
  font-size: max(16px, 1rem);
}

select.input-select {
  cursor: pointer;
  appearance: auto;
}
textarea {
  min-height: 80px;
  resize: vertical;
}

.flash {
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.flash-ok {
  background: rgba(62, 207, 142, 0.15);
  border: 1px solid rgba(62, 207, 142, 0.35);
}
.flash-err {
  background: rgba(232, 93, 76, 0.12);
  border: 1px solid rgba(232, 93, 76, 0.35);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sticker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.35rem;
}

.sticker-cell {
  aspect-ratio: 1;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  color: var(--wc-muted);
  user-select: none;
}
.sticker-cell.owned {
  background: rgba(26, 147, 111, 0.35);
  color: #fff;
  border-color: rgba(62, 207, 142, 0.45);
}
.sticker-cell.dup {
  box-shadow: inset 0 0 0 2px var(--wc-gold);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.stat {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--wc-gold-soft);
}

.match-block {
  margin-bottom: 1.25rem;
}
.match-block h4 {
  margin: 0 0 0.5rem;
  color: var(--wc-gold-soft);
  font-size: 0.95rem;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}
.match-row .team-away {
  text-align: right;
}

.score-inputs {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}
.score-inputs input {
  width: 3rem;
  text-align: center;
  font-size: max(16px, 1rem);
}

.btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}
.btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Álbum táctil */
.album-page__title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  margin: 0 0 1rem;
}
.album-hint {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 1rem;
}
.album-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.82rem;
  color: var(--wc-muted);
}
.album-legend__swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.2rem;
  margin-right: 0.35rem;
  vertical-align: -0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.album-legend__swatch--miss {
  background: rgba(232, 197, 71, 0.45);
  border-color: rgba(232, 197, 71, 0.55);
}
.album-legend__swatch--once {
  background: rgba(62, 207, 142, 0.65);
  border-color: rgba(62, 207, 142, 0.85);
}
.album-legend__swatch--dup {
  background: rgba(212, 175, 55, 0.55);
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}
.album-filters.card {
  background: rgba(0, 0, 0, 0.18);
}
.album-filters .album-filter-label {
  color: var(--wc-text);
  font-weight: 600;
}
.album-filter-select {
  width: auto;
  max-width: 100%;
  min-width: 12rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(232, 197, 71, 0.4);
  background: rgba(10, 22, 40, 0.98);
  color: var(--wc-text);
  font-weight: 600;
  font-size: max(16px, 1rem);
  font-family: var(--font);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color-scheme: dark;
  appearance: auto;
}
.album-filter-select:hover {
  border-color: rgba(232, 197, 71, 0.55);
}
.album-filter-select:focus {
  outline: none;
  border-color: var(--wc-gold-soft);
  box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.28);
}
.album-filter-select option {
  background: var(--wc-card);
  color: var(--wc-text);
  font-weight: 600;
}
.album-toolbar {
  margin-bottom: 0.75rem;
}
.album-toolbar--bottom {
  margin-top: 1.25rem;
  margin-bottom: 0;
}
.album-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.album-pager-jump {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.album-pager-jump__lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wc-muted);
  white-space: nowrap;
}
.album-pager-jump-select {
  min-width: 10.5rem;
  max-width: min(18rem, 92vw);
}
.album-pager-jump--compact .album-pager-jump__lbl {
  font-size: 0.75rem;
}
.album-pager__info {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 8rem;
  text-align: center;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.45rem;
  touch-action: manipulation;
}
@media (min-width: 400px) {
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(5.85rem, 1fr));
    gap: 0.5rem;
  }
}
@media (min-width: 768px) {
  .album-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 0.55rem;
  }
}

.album-cell {
  position: relative;
  border-radius: 0.55rem;
  padding: 0.35rem 0.25rem 0.4rem;
  min-height: 3.65rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -moz-user-select: none;
}
.album-cell--miss {
  background: rgba(232, 197, 71, 0.14);
  border-color: rgba(232, 197, 71, 0.45);
  box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.2);
}
/* Una sola copia: completada (verde claro) */
.album-cell--once {
  background: rgba(26, 147, 111, 0.42);
  border-color: rgba(62, 207, 142, 0.75);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.35);
}
/* Más de una: base verde + acento dorado repetidas */
.album-cell--have.album-cell--dup {
  background: rgba(26, 120, 95, 0.38);
  border-color: rgba(62, 207, 142, 0.5);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.8), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.album-cell--filter-hide {
  display: none !important;
}
.album-cell--highlight {
  outline: 2px solid rgba(232, 197, 71, 0.9);
  outline-offset: 2px;
}
.album-cell--pulse {
  animation: album-cell-pulse 0.85s ease 2;
}
@keyframes album-cell-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 197, 71, 0.65);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(232, 197, 71, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 197, 71, 0);
  }
}
.album-cell--busy {
  opacity: 0.72;
  pointer-events: none;
}

/* Botón − solo en pantallas anchas (PC); en móvil se usa mantener pulsado */
.album-cell__minus {
  display: none;
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.28rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  color: #fff;
  background: rgba(185, 28, 28, 0.88);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.album-cell__minus:hover {
  background: rgba(220, 38, 38, 0.95);
  filter: brightness(1.05);
}
.album-cell__minus:active {
  transform: scale(0.94);
}
.album-cell__minus:focus-visible {
  outline: 2px solid var(--wc-gold-soft);
  outline-offset: 1px;
}
.album-cell__minus--off {
  display: none !important;
  pointer-events: none;
}
@media (min-width: 768px) {
  .album-cell__minus:not(.album-cell__minus--off) {
    display: flex;
  }
}

.album-cell__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.12rem 0.28rem;
  border-radius: 0.25rem;
  background: rgba(212, 175, 55, 0.92);
  color: #1a1203;
  z-index: 1;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.album-cell__hit {
  flex: 1 1 auto;
  width: 100%;
  min-height: 3.15rem;
  margin-top: 0.1rem;
  padding: 0.35rem 0.25rem;
  border: none;
  border-radius: 0.42rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  font-family: var(--font);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -moz-user-select: none;
  color: var(--wc-text);
  transition: filter 0.1s ease, transform 0.08s ease;
}
.album-cell__hit:active {
  filter: brightness(1.12);
  transform: scale(0.98);
}
.album-cell--miss .album-cell__hit {
  background: rgba(232, 197, 71, 0.38);
  color: var(--wc-gold-soft);
}
.album-cell--once .album-cell__hit {
  background: rgba(62, 207, 142, 0.45);
  color: #fff;
}
.album-cell--have.album-cell--dup .album-cell__hit {
  background: rgba(212, 175, 55, 0.28);
  color: #fff;
}

footer.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--wc-muted);
  font-size: 0.85rem;
}

.code-big {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.12em;
  font-size: 1.25rem;
  color: var(--wc-gold-soft);
}

/* Publicidad por polla (organizador) */
.pollas-ad-banner {
  padding: 0.75rem 1rem;
  overflow: hidden;
}
.pollas-ad-banner__link {
  display: block;
  line-height: 0;
}
.pollas-ad-banner__img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.pollas-ad-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pollas-ad-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  border: none;
  padding: 0;
}
.pollas-ad-popup__box {
  position: relative;
  z-index: 1;
  max-width: min(420px, 94vw);
  max-height: 90vh;
  overflow: auto;
  margin: 0;
}
.pollas-ad-popup__x {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  min-width: 2.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 1.35rem;
  line-height: 1;
}
.pollas-ad-popup__media {
  display: block;
  line-height: 0;
}
.pollas-ad-popup__img {
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
}
