/* RUS.DO · Игры: хаб /play и «Викторина дня». Только токены — тёмная тема работает сама. */

/* ---------- Хаб ---------- */
.pl-hub { display: grid; gap: 20px; }
.pl-hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 26px 28px;
  color: inherit; text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) ease;
  background: linear-gradient(120deg, var(--teal-50), transparent 55%), var(--glass-bg-strong);
}
.pl-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.pl-hero__ic {
  width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--teal), var(--teal-600)); color: #fff; box-shadow: 0 10px 24px rgba(0, 179, 166, .28);
}
.pl-hero__ic .i { width: 34px; height: 34px; }
.pl-hero__body h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; }
.pl-hero__body p { color: var(--ink-2); max-width: 560px; }
.pl-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; align-items: center; }
.pl-stat { color: var(--ink-3); font-size: 14px; display: inline-flex; gap: 6px; align-items: baseline; }
.pl-stat b { color: var(--ink); font-size: 18px; font-weight: 800; }
.pl-streak {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--amber-50); color: var(--amber); font-weight: 800; font-size: 13.5px;
}
.pl-hero__cta { pointer-events: none; }
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pl-soon h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.pl-soon__it { display: grid; gap: 8px; align-content: start; opacity: .92; }
.pl-soon__it h3 { font-size: 17px; font-weight: 800; }
.pl-soon__it p { font-size: 14px; }
.pl-soon__ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--coral-50); color: var(--coral-600); }

/* ---------- Карточки рейтингов ---------- */
.pl-card { display: grid; gap: 12px; align-content: start; }
.pl-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pl-card__head h2 { font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.pl-card__head h2 .i { color: var(--teal-600); }
.pl-card__sub { font-size: 13px; margin-top: -4px; }
.pl-tabs { display: flex; gap: 6px; }
.pl-tabs .chip { min-height: 36px; padding: 0 14px; font-size: 13px; cursor: pointer; }
.pl-pane[hidden] { display: none; }
.pl-empty { font-size: 14px; padding: 6px 0; }

.pl-league { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pl-league li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 70px auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); }
.pl-league li.is-me { background: var(--teal-50); }
.pl-league__pos { font-weight: 800; color: var(--ink-3); text-align: center; }
.pl-league li:first-child .pl-league__pos { color: var(--coral-600); }
.pl-league__name { font-weight: 700; display: grid; line-height: 1.2; min-width: 0; }
.pl-league__name small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.pl-league__bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pl-league__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-600)); }
.pl-league__avg { font-weight: 800; min-width: 40px; text-align: right; }

.pl-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pl-top li { display: grid; grid-template-columns: 26px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: var(--r-sm); }
.pl-top li.is-me { background: var(--teal-50); }
.pl-top__pos { font-weight: 800; color: var(--ink-3); text-align: center; font-size: 14px; }
.pl-top__pos--1, .pl-top__pos--2, .pl-top__pos--3 { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; }
.pl-top__pos--1 { background: var(--coral); } .pl-top__pos--2 { background: var(--teal); } .pl-top__pos--3 { background: var(--amber); }
.pl-top__who { display: grid; min-width: 0; line-height: 1.25; }
.pl-top__who a, .pl-top__who > span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-top__who a:hover { color: var(--teal-700); }
.pl-top__who small, .pl-top__res small { color: var(--ink-3); font-size: 12px; }
.pl-top__res { display: grid; text-align: right; line-height: 1.2; }
.pl-top__res b { font-weight: 800; }

.pl-nb { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.pl-nb a, .pl-nb li > span { display: grid; justify-items: center; gap: 4px; text-align: center; color: inherit; padding: 8px 4px; border-radius: var(--r-sm); }
.pl-nb a:hover { background: var(--surface-2); }
.pl-nb span span { font-size: 12.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-nb small { font-size: 11.5px; color: var(--teal-700); font-weight: 800; }

/* ---------- Страница игры ---------- */
.pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.pl-side { display: grid; gap: 20px; }
.pl-game { padding: 32px; min-height: 520px; display: grid; align-content: start; }
.pl-game [hidden] { display: none !important; }

.pl-intro { display: grid; justify-items: start; gap: 14px; max-width: 620px; }
.pl-kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); }
.pl-intro h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.pl-lead { font-size: 17px; color: var(--ink-2); }
.pl-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-rules li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.pl-rules .i { color: var(--teal-600); }
.pl-start { margin-top: 6px; min-width: 220px; }
.pl-note { font-size: 13.5px; }

/* Прогресс-точки, таймер */
.pl-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pl-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.pl-dots li { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); border: 2px solid transparent; transition: background var(--dur) ease, transform var(--dur) var(--ease); }
.pl-dots li.is-cur { border-color: var(--teal); background: transparent; transform: scale(1.15); }
.pl-dots li.is-ok { background: var(--teal); }
.pl-dots li.is-bad { background: var(--coral); }
.pl-count { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.pl-pts { margin-left: auto; font-weight: 800; font-size: 18px; }
.pl-pts small { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.pl-timer { position: relative; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: visible; margin: 0 44px 22px 0; }
.pl-timer i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-600)); transform-origin: left center; transition: background var(--dur) ease; }
.pl-timer.is-low i { background: linear-gradient(90deg, var(--coral), var(--coral-600)); }
.pl-timer__n { position: absolute; right: -44px; top: 50%; transform: translateY(-50%); width: 36px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-timer.is-low .pl-timer__n { color: var(--coral-600); }

/* Вопрос и варианты */
.pl-q { display: grid; gap: 14px; }
.pl-q__topic { justify-self: start; }
.pl-q__text { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; letter-spacing: -.015em; line-height: 1.25; outline: none; }
.pl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pl-opt {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; text-align: left;
  border-radius: var(--r); border: 2px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 15.5px; line-height: 1.3; cursor: pointer;
  transition: border-color var(--dur) ease, background var(--dur) ease, transform .12s ease, box-shadow var(--dur) ease;
}
.pl-opt:hover:not(:disabled) { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }
.pl-opt:active:not(:disabled) { transform: scale(.98); }
.pl-opt:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.pl-opt:disabled { cursor: default; }
.pl-opt__k { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); font-weight: 800; font-size: 13px; }
.pl-opt.is-picked { border-color: var(--ink-3); }
.pl-opt.is-right { border-color: var(--teal); background: var(--teal-50); animation: pl-pop .42s var(--ease); }
.pl-opt.is-right .pl-opt__k { background: var(--teal); color: #fff; }
.pl-opt.is-wrong { border-color: var(--coral); background: var(--coral-50); animation: pl-shake .36s ease; }
.pl-opt.is-wrong .pl-opt__k { background: var(--coral); color: #fff; }
.pl-opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }

.pl-fb { border-radius: var(--r); padding: 16px 18px; display: grid; gap: 8px; animation: pl-rise .3s var(--ease); }
.pl-fb.is-ok { background: var(--teal-50); }
.pl-fb.is-bad { background: var(--coral-50); }
.pl-fb__h { font-weight: 800; font-size: 17px; display: inline-flex; gap: 8px; align-items: center; }
.pl-fb.is-ok .pl-fb__h { color: var(--teal-700); }
.pl-fb.is-bad .pl-fb__h { color: var(--coral-600); }
.pl-fb p:not(.pl-fb__h) { color: var(--ink-2); }
.pl-fb__act { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.pl-fb__act .btn--primary { min-height: 48px; min-width: 150px; }

/* Результат */
.pl-res { display: grid; gap: 18px; justify-items: start; }
.pl-res__title { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.025em; outline: none; }
.pl-res__marks { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.pl-res__marks li { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; animation: pl-pop .4s var(--ease) both; animation-delay: var(--d); }
.pl-res__marks li.is-ok { background: var(--teal); }
.pl-res__marks li.is-bad { background: var(--coral); }
.pl-res__marks .i { width: 22px; height: 22px; stroke-width: 2.6; }
.is-perfect .pl-res__marks li { box-shadow: 0 8px 20px rgba(0, 179, 166, .3); }
.pl-res__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; width: 100%; }
.pl-res__stats > div { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.pl-res__stats dt { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pl-res__stats dd { margin: 2px 0 0; font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.pl-res__stats dd small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pl-res__streak dd { color: var(--amber); }
.pl-save { width: 100%; }
.pl-save .btn { margin-top: 10px; }
.pl-share { width: 100%; display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r); border: 1px dashed var(--line-2); }
.pl-share__h { font-weight: 800; }
.pl-share__txt { margin: 0; font: 600 14px/1.5 var(--font); white-space: pre-wrap; color: var(--ink-2); background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-sm); }
.pl-share__act { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-share__act .btn { min-height: 48px; }
.pl-res__next { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }

@keyframes pl-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes pl-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes pl-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pl-opt, .pl-fb, .pl-res__marks li, .pl-hero, .pl-dots li { animation: none !important; transition: none !important; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .pl-layout { grid-template-columns: 1fr; }
  .pl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pl-hero { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .pl-hero__ic { width: 56px; height: 56px; border-radius: 18px; }
  .pl-hero__cta { width: 100%; }
  .pl-grid { grid-template-columns: 1fr; gap: 14px; }
  .pl-game { padding: 20px 16px; min-height: 0; }
  .pl-opts { grid-template-columns: 1fr; gap: 10px; }
  .pl-opt { min-height: 56px; }
  .pl-res__stats { grid-template-columns: 1fr 1fr; }
  .pl-res__marks li { width: 44px; height: 44px; }
  .pl-start, .pl-fb__act .btn, .pl-save .btn { width: 100%; }
  .pl-share__act .btn { flex: 1 1 140px; }
  .pl-count { display: none; }
}
