/* ============ Pink Predictions — app de juego ============ */

.play-body { background: var(--bg); }

.play-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(15, 13, 17, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.play-tabs { display: flex; gap: 4px; }
.play-tab {
  padding: 9px 16px;
  border-radius: 3px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}
.play-tab:hover { color: var(--cream); }
.play-tab.is-active { color: var(--pink); border-color: var(--line); background: rgba(240, 29, 111, 0.07); }

.play-user { display: flex; align-items: center; gap: 12px; }
.user-chip {
  font-weight: 700;
  font-size: 0.88rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 40px) 90px;
}

.play-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 34px;
}
.play-head h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); }

.loading-note { color: var(--muted); padding: 20px 0; }

/* ============ Canchas ============ */
.comp-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px 30px 4px 4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 1300'%3E%3Cg fill='none' stroke='%23f01d6f' stroke-opacity='0.06' stroke-width='3' transform='rotate(14 450 650)'%3E%3Crect x='60' y='60' width='780' height='1180' rx='4'/%3E%3Cline x1='60' y1='650' x2='840' y2='650'/%3E%3Ccircle cx='450' cy='650' r='110'/%3E%3Crect x='230' y='60' width='440' height='180'/%3E%3Crect x='230' y='1060' width='440' height='180'/%3E%3C/g%3E%3C/svg%3E") right -80px center / 620px no-repeat,
    linear-gradient(160deg, var(--panel), var(--bg-soft));
  padding: clamp(22px, 4vw, 40px);
  margin-bottom: 54px;
}
.comp-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.comp-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 10px;
}
.comp-name { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
.comp-sub { color: var(--muted); margin-top: 8px; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.match-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  background: rgba(15, 13, 17, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 3px 16px 3px 3px;
  cursor: pointer;
  color: var(--cream);
  font-family: var(--body);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.match-card:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
  box-shadow: 8px 10px 0 rgba(240, 29, 111, 0.16);
}
.match-card.is-locked { opacity: 0.55; }
.match-when {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.match-teams { display: flex; align-items: center; gap: 16px; }
.match-vs {
  font-size: 0.95rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--pink);
}
.match-names { font-weight: 700; font-size: 0.95rem; }
.match-names i { font-style: normal; color: var(--muted); font-weight: 400; }
.match-cta {
  color: var(--pink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
}
.match-cta.is-ready { color: #35d0a0; }
.match-card.has-pick {
  border-color: rgba(53, 208, 160, 0.4);
  background: linear-gradient(rgba(53, 208, 160, 0.05), rgba(15, 13, 17, 0.72));
}
.match-card.has-pick:hover { border-color: var(--pink); }

/* Insignias de equipo: colores oficiales del club */
.team-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18), 3px 3px 0 rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.team-badge b {
  font-family: var(--display);
  font-size: 0.62rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  letter-spacing: 0.03em;
}
.team-badge.lg { width: 54px; height: 54px; border-radius: 13px; }
.team-badge.lg b { font-size: 0.78rem; }

/* Pools rail */
.pools-rail { min-width: 260px; }
.rail-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.rail-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rail-empty { color: var(--muted); font-size: 0.85rem; }
.pool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--cream);
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.pool-chip em { font-style: normal; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; }
.pool-chip.is-active { border-color: var(--pink); background: rgba(240, 29, 111, 0.09); }
.pool-chip.is-active em { color: var(--pink); }

/* Próximas canchas */
.soon .kicker { margin-bottom: 18px; }
.soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.soon-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  min-height: 120px;
  justify-content: flex-end;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}
.soon-card svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}
.soon-card em {
  font-style: normal;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--coral);
}

/* ============ Picks ============ */
.jornada-nav { display: flex; gap: 8px; }

/* Banner de reuso de picks entre quinielas */
.reuse-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 780px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--pink);
  border-radius: 3px 14px 3px 3px;
  background: linear-gradient(120deg, rgba(240, 29, 111, 0.09), var(--panel));
}
.reuse-copy { display: block; max-width: 440px; }
.reuse-copy b { display: block; font-size: 0.95rem; margin-bottom: 3px; }
.reuse-copy span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.reuse-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.picks-list { display: flex; flex-direction: column; gap: 14px; max-width: 780px; }

.pick-row {
  border: 1px solid var(--line-soft);
  border-radius: 3px 16px 3px 3px;
  background: var(--panel);
  padding: 18px clamp(14px, 3vw, 26px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.pick-row.is-locked { opacity: 0.6; }
.pick-row.is-focus { border-color: var(--pink); box-shadow: 8px 10px 0 rgba(240, 29, 111, 0.16); }

.pick-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pick-open { color: var(--coral); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.pick-lock, .pick-final { color: var(--muted); font-size: 0.8rem; }
.pick-final b { color: var(--pink); }

.pick-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.pick-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pick-team-name { font-weight: 700; font-size: 0.92rem; }

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stepper output {
  font-family: var(--display);
  font-size: 1.5rem;
  min-width: 34px;
  text-align: center;
  color: var(--cream);
}
.step-btn {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.step-btn:hover:not(:disabled) { border-color: var(--pink); color: var(--pink); }
.step-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.pick-status { color: var(--muted); font-size: 0.8rem; margin-top: 10px; min-height: 1.2em; text-align: center; }

/* ============ Tabla ============ */
.code-chip { color: var(--pink); letter-spacing: 0.14em; }

.standings { list-style: none; max-width: 780px; }
.standing-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(14px, 3vw, 24px);
  border-bottom: 1px solid var(--line-soft);
}
.standing-row:first-child { border-top: 1px solid var(--line-soft); }
.standing-row.is-you { background: rgba(240, 29, 111, 0.07); border-left: 3px solid var(--pink); }
.standing-row .pos {
  font-size: 1.1rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--pink);
  min-width: 34px;
}
.standing-row .who { font-weight: 700; }
.standing-row .who em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.standing-row .detail { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.standing-row .pts { font-family: var(--display); color: var(--pink); font-size: 1.05rem; min-width: 70px; text-align: right; }

/* ============ Formularios de pool ============ */
.pool-forms { display: flex; flex-direction: column; gap: 16px; }
.pool-form label, .field label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.pool-form input, .field input {
  width: 100%;
  background: var(--bg);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: var(--body);
  margin-bottom: 10px;
}
.pool-form input:focus, .field input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 3px 3px 0 rgba(240, 29, 111, 0.3);
}
.field { margin-bottom: 18px; }
#join-code-input { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700; }

/* ============ Switch (toggle público/privado) ============ */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-soft);
  margin-bottom: 12px;
  cursor: pointer;
}
.switch-copy { display: block; }
.switch-copy b { display: block; font-size: 0.9rem; margin-bottom: 3px; text-transform: none; letter-spacing: 0; }
.switch-copy em { font-style: normal; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--line);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 0.18s ease;
}
.switch:checked { background: var(--pink); border-color: var(--pink); }
.switch:checked::after { transform: translateX(20px); background: #16060d; }

.pool-visibility-row { max-width: 780px; margin-bottom: 22px; }
#visibility-state { color: var(--pink); }

/* ============ Quinielas públicas ============ */
.public-pools { margin-bottom: 54px; }
.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.public-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 3px 14px 3px 3px;
  transition: border-color 0.16s ease;
}
.public-card:hover { border-color: var(--pink); }
.public-card-body h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.public-card-body p { color: var(--muted); font-size: 0.8rem; }

.gate-overlay { z-index: 200; }

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .play-top { flex-wrap: wrap; }
  .play-tabs { order: 3; width: 100%; justify-content: space-between; }
  .play-tab { flex: 1; text-align: center; padding: 9px 4px; }
  .play-head { flex-direction: column; align-items: flex-start; }
  .match-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .team-badge.lg { width: 44px; height: 44px; }
  .pick-teams { gap: 6px; }
  .standing-row .detail { display: none; }
}
