/* ===== Квиз-Дуэль: стили экранов (стилистика Т-Банка 2.0) ===== */

/* --- Onboarding --- */
.onb-logo { text-align: center; padding: 32px 0 12px; animation: popIn .35s ease; }
.onb-logo .logo-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.onb-logo .logo-dot { color: var(--yellow-deep); }
.onb-logo .logo-sub { color: var(--ink-soft); font-size: 14px; margin-top: 4px; font-weight: 700; }

/* --- Onboarding Flow (Wizard) --- */
.steps-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #E2E5E9; transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.step-dot.is-active {
  background: var(--yellow-deep);
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(245, 196, 0, 0.6);
}
.step-dot.is-done { background: var(--ok); }
.step-line { width: 32px; height: 2px; background: #E2E5E9; border-radius: 999px; }

.onboarding-flow .card { animation: slideIn .4s cubic-bezier(.2, 1, .3, 1); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Главное меню --- */
.menu-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F0F2F5;
}
.menu-team .team-name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
  color: var(--ink);
}
.menu-stats { display: flex; gap: 10px; margin-top: 14px; }
.stat-box {
  flex: 1;
  background: #F8F9FB;
  border: 1px solid #ECEFF2;
  border-radius: var(--radius-s);
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform .12s ease;
}
.stat-box:hover {
  transform: translateY(-1px);
}
.stat-box .stat-val {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.stat-box .stat-cap {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 4px;
}
.menu-cta {
  margin-top: 16px;
  padding: 18px 20px;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.in-duel-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
  font-weight: 700;
}
.menu-row { display: flex; gap: 10px; margin-top: 10px; }
.menu-row .btn { flex: 1; }

/* --- Приглашение (invite) --- */
.invite-link-card { text-align: center; padding: 24px 20px; }
.invite-radar {
  width: 68px; height: 68px; margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--yellow-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--ink);
}
.invite-radar::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--yellow);
  animation: radarWave 2s infinite cubic-bezier(0.2, 0.8, 0.4, 1);
  opacity: 0.8;
}
@keyframes radarWave {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.invite-url {
  background: #F0F2F5;
  border: 1px solid #E2E5E9;
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
  color: var(--ink-soft);
  margin: 14px 0;
  user-select: all;
}
.waiting { text-align: center; padding: 4px 0 2px; font-weight: 800; font-size: 18px; color: var(--ink); }
.dots::after { content: ''; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.invite-ttl {
  text-align: center; color: var(--ink-soft);
  font-size: 13px; font-weight: 700; margin-top: 6px;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* --- Принятие вызова (accept) --- */
.accept-hero { text-align: center; padding: 8px 0 4px; }
.accept-hero .hero-icon-box {
  width: 64px; height: 64px; margin: 0 auto 10px;
  border-radius: 20px;
  background: var(--yellow-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(245, 196, 0, 0.3);
}
.accept-hero .hero-text { font-size: 17px; font-weight: 800; margin-top: 8px; line-height: 1.35; color: var(--ink); }
.accept-hero .hero-text .hl {
  background: var(--yellow-grad);
  border-radius: 8px; padding: 2px 8px;
  box-shadow: 0 2px 6px rgba(245, 196, 0, 0.25);
}

/* --- Финал --- */
.final-celebration { text-align: center; padding: 10px 0; position: relative; }
.final-trophy-box {
  width: 76px; height: 76px; margin: 0 auto 10px;
  border-radius: 24px;
  background: var(--yellow-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-yellow);
  animation: popIn .45s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink);
}
.final-verdict { text-align: center; font-size: 22px; font-weight: 800; margin-top: 4px; color: var(--ink); }
.final-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 6px;
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.final-score .colon { color: var(--ink-faint); font-size: 32px; }
.final-players { display: flex; gap: 10px; margin-top: 10px; }
.final-player {
  flex: 1;
  background: #F8F9FB;
  border: 1px solid #ECEFF2;
  border-radius: var(--radius-s);
  padding: 12px 10px;
  text-align: center;
  transition: all .2s ease;
}
.final-player .p-name { font-weight: 800; font-size: 15px; word-break: break-word; color: var(--ink); }
.final-player .p-team { color: var(--ink-soft); font-size: 12px; font-weight: 700; margin-top: 3px; word-break: break-word; }
.final-player.is-winner {
  background: var(--yellow-grad);
  border-color: rgba(245, 196, 0, 0.5);
  box-shadow: var(--shadow-yellow);
}
.final-player.is-winner .p-team { color: var(--ink); }

.round-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.round-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #F8F9FB;
  border: 1px solid #ECEFF2;
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 700;
}
.round-row .r-idx { flex: 0 0 22px; color: var(--ink-faint); font-weight: 800; text-align: center; }
.round-row .r-who { flex: 1; color: var(--ink-soft); word-break: break-word; }
.round-row .r-mark { flex: 0 0 auto; font-weight: 800; display: inline-flex; align-items: center; }
.round-row .r-mark.ok { color: var(--ok); }
.round-row .r-mark.fail { color: var(--danger); }
.round-row .r-pts { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 800; }

/* --- Заголовки списков --- */
.list-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 20px 0 10px 4px;
}
.empty-note { text-align: center; color: var(--ink-faint); font-weight: 700; padding: 28px 0; font-size: 14px; }

/* --- Активные дуэли --- */
.active-list { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; }
.active-card {
  background: var(--card);
  border: var(--border-subtle);
  border-radius: var(--radius-s);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease;
}
.active-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.active-card:active { transform: scale(0.98); }
.active-score { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.active-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-soft); }

/* --- Модальное окно правил --- */
.onb-help-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 auto 16px; background: #fff; border: var(--border-subtle);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--ink-soft); cursor: pointer; transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.onb-help-btn:hover { background: #F4F5F7; color: var(--ink); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(29, 32, 36, 0.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px); animation: fadeIn .2s ease;
}
.modal-card {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 420px;
  max-height: 85vh; overflow-y: auto; padding: 24px; position: relative;
  box-shadow: var(--shadow-lg); animation: popIn .3s cubic-bezier(.2, 1.4, .4, 1);
  border: var(--border-subtle);
}
.modal-close {
  position: absolute; top: 16px; right: 16px; background: #F0F2F5; border: none;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: background .15s;
}
.modal-close:hover { background: #E4E7EB; color: var(--ink); }
.help-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.help-item { display: flex; gap: 12px; align-items: flex-start; }
.help-icon {
  flex: 0 0 34px; height: 34px; background: var(--yellow-soft); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.help-text { font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
.help-text b { color: var(--ink); display: block; margin-bottom: 2px; }
