/* ── IceBreaker CSS ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

.ib-wrap {
  font-family: 'Nunito', -apple-system, sans-serif;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 32px;
  -webkit-font-smoothing: antialiased;
}

.ib-screen { display: block; }
.ib-hidden { display: none !important; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.ib-header { text-align: center; padding: 24px 0 20px; }
.ib-logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0F172A;
}
.ib-subtitle {
  font-size: .88rem;
  color: #64748B;
  margin-top: 4px;
}

/* ── Secciones ───────────────────────────────────────────────────────────── */
.ib-section { margin-bottom: 20px; }
.ib-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94A3B8;
  margin-bottom: 8px;
}

/* ── Jugadores ───────────────────────────────────────────────────────────── */
.ib-players-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.ib-input {
  flex: 1;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: #0F172A;
  transition: border-color .15s;
}
.ib-input:focus {
  outline: none;
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.ib-add-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.ib-add-btn:hover { background: #F8FAFC; }

.ib-players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.ib-player-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  border-radius: 99px;
  padding: 5px 10px 5px 12px;
  font-size: .85rem;
  font-weight: 700;
  color: #334155;
}
.ib-player-tag button {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

/* ── Categorías ──────────────────────────────────────────────────────────── */
.ib-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ib-cat-btn {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.ib-cat-btn.ib-cat-active { border-width: 2px; }
.ib-cat-icon { font-size: 1.3rem; display: block; margin-bottom: 5px; }
.ib-cat-name { font-size: .9rem; font-weight: 800; color: #0F172A; display: block; }
.ib-cat-desc { font-size: .72rem; color: #94A3B8; display: block; margin-top: 2px; }

/* ── Turnos ──────────────────────────────────────────────────────────────── */
.ib-turns-row {
  display: flex;
  gap: 8px;
}
.ib-turn-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all .15s;
}
.ib-turn-active {
  border-color: #FF6B35;
  background: #FFF4EF;
  color: #FF6B35;
}

/* ── Botón inicio ────────────────────────────────────────────────────────── */
.ib-start-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #FF6B35, #FF3E7F);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,107,53,.35);
  transition: opacity .15s, transform .12s;
  margin-top: 4px;
}
.ib-start-btn:hover { opacity: .92; transform: translateY(-1px); }

/* ── Turno bar ───────────────────────────────────────────────────────────── */
.ib-turn-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 16px;
}
.ib-turn-sub { font-size: .75rem; color: #94A3B8; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ib-turn-name { font-size: 1.2rem; font-weight: 900; color: #0F172A; margin-top: 2px; }
.ib-turn-count { font-size: .8rem; color: #CBD5E1; }

/* ── Elección pregunta/reto ──────────────────────────────────────────────── */
.ib-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.ib-choice-btn {
  padding: 20px 12px;
  border-radius: 16px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #0F172A;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .15s;
}
.ib-choice-btn:hover {
  border-color: #FF6B35;
  background: #FFF4EF;
}
.ib-choice-icon { font-size: 1.8rem; }

/* ── Carta ───────────────────────────────────────────────────────────────── */
.ib-card {
  border-radius: 18px;
  border: 1.5px solid #E2E8F0;
  padding: 24px 20px 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  background: #fff;
  animation: ibFlip .3s ease;
}

@keyframes ibFlip {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ib-card-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  align-self: flex-start;
}
.ib-card-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.5;
  flex: 1;
}
.ib-card-cat {
  font-size: .72rem;
  color: #CBD5E1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Acciones ────────────────────────────────────────────────────────────── */
.ib-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ib-next-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FF6B35, #FF3E7F);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
}
.ib-next-btn:hover { opacity: .9; }
.ib-skip-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background: none;
  color: #94A3B8;
  font-family: inherit;
  font-size: .88rem;
  cursor: pointer;
}
.ib-skip-btn:hover { color: #64748B; }

/* ── Marcador ────────────────────────────────────────────────────────────── */
.ib-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.ib-score-item {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.ib-score-name { font-size: .75rem; color: #94A3B8; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-score-num { font-size: 1.4rem; font-weight: 900; color: #0F172A; }

/* ── Fin de partida ──────────────────────────────────────────────────────── */
.ib-end-inner { text-align: center; padding: 20px 0; }
.ib-trophy { font-size: 3rem; margin-bottom: 12px; }
.ib-end-title { font-size: 1.4rem; font-weight: 900; color: #0F172A; margin-bottom: 6px; }
.ib-end-sub { font-size: .88rem; color: #94A3B8; margin-bottom: 20px; }
.ib-winner { font-size: 1.6rem; font-weight: 900; color: #FF6B35; margin: 8px 0 20px; }
.ib-final-scores { display: flex; flex-direction: column; gap: 6px; }
.ib-final-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .9rem;
}
.ib-final-row strong { font-weight: 800; }
.ib-replay-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #0F172A;
  cursor: pointer;
  margin-top: 16px;
  transition: background .15s;
}
.ib-replay-btn:hover { background: #F8FAFC; }
