/* BkL: разделы Игры и Рейтинг, нижнее меню, разделители дней. Подключается после style.css. */

/* ---------- разделители по дням ---------- */
.day { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 6px 0 -4px; color: var(--muted); }
.day i { flex: 1; height: 1px; background: var(--line); }
.day b { font-size: 14px; font-weight: 800; letter-spacing: .04em; color: var(--text); padding: 3px 11px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.more { text-align: center; padding: 22px 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.strip .num { width: auto; min-width: 34px; padding: 0 6px; }

/* ---------- нижнее меню разделов ---------- */
.mnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 4px;
  padding: 6px 10px calc(6px + var(--safe-b)); background: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.mnav button {
  position: relative; flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px 6px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  transition: color .2s, background .2s, transform .15s var(--ease);
}
.mnav button:active { transform: scale(.94); }
.mnav button.on { color: var(--text); font-weight: 800; }
.mnav button.on::before { content: ""; position: absolute; top: -7px; left: 22%; right: 22%; height: 3px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.mnav button.on svg { color: var(--gold); }
:root[data-theme="light"] .mnav button.on svg { color: var(--red); }
main { padding-bottom: calc(96px + var(--safe-b)); }
.toast { bottom: calc(86px + var(--safe-b)); }
@media (min-width: 900px) {
  /* на широком экране меню уходит наверх, в середину шапки */
  .mnav { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); z-index: 25; padding: 9px 0 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mnav button { flex-direction: row; gap: 8px; max-width: none; padding: 10px 18px; font-size: 15px; }
  .mnav button.on::before { top: auto; bottom: -6px; left: 14px; right: 14px; }
  main { padding-bottom: 40px; }
  .toast { bottom: 24px; }
}

/* ---------- игры и рейтинг ---------- */
.sec { animation: rise .35s var(--ease) both; }
.sechead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 2px 14px; flex-wrap: wrap; }
.sechead h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sechead span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.wallet { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 15px; }
.wallet small { font-weight: 700; font-size: 12.5px; opacity: .8; }
.gates { max-width: 440px; margin: 0 auto; text-align: center; padding: 40px 12px; }
.gates h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.gates p { margin: 0 0 20px; color: var(--muted); }
.gamegrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .gamegrid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.gcard {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px; text-align: left; color: inherit;
  background: var(--surface); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
  transition: transform .25s var(--ease), background .25s;
}
.gcard:hover { transform: translateY(-3px); background: var(--surface2); }
.gcard:active { transform: scale(.985); }
.gcard.soon { cursor: default; opacity: .6; }
.gcard.soon:hover { transform: none; background: var(--surface); }
.gcard .gico { width: 52px; height: 52px; display: grid; place-items: center; background: var(--gold); color: #000; }
.gcard .gico svg { width: 28px; height: 28px; }
.gcard h3 { margin: 6px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.gcard p { margin: 0; color: var(--muted); font-size: 14px; }
.gcard .gline { height: 4px; margin-top: 6px; background: linear-gradient(90deg, var(--red), var(--orange)); box-shadow: 0 0 14px rgba(229, 37, 45, .7); }
.gcard .gmeta { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--text); }

.melody { max-width: 720px; margin: 0 auto; }
.gback { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 12px; padding: 8px 14px 8px 8px; border-radius: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.stage { position: relative; padding: 22px 18px 20px; background: var(--surface); text-align: center;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); margin-bottom: 14px; }
.stage .state { font-size: 20px; font-weight: 800; letter-spacing: -.015em; min-height: 28px; }
.stage .sub { margin-top: 4px; color: var(--muted); font-size: 14.5px; min-height: 22px; }
.stage .big { font-size: 54px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 6px 0 0; color: var(--gold); letter-spacing: -.03em; }
:root[data-theme="light"] .stage .big { color: var(--red); }
.bars { height: 6px; background: var(--surface2); margin: 14px 0 0; overflow: hidden; }
.bars i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--orange)); }
.playbtn { width: 96px; height: 96px; margin: 8px auto 4px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 10px 30px -8px rgba(229, 37, 45, .8); transition: transform .15s var(--ease), background .2s; }
.playbtn:hover { background: var(--red-hi); }
.playbtn:active { transform: scale(.93); }
.playbtn svg { width: 40px; height: 40px; fill: currentColor; stroke: none; margin-left: 5px; }
.spin { width: 44px; height: 44px; margin: 10px auto; border-radius: 50%; border: 4px solid var(--surface2); border-top-color: var(--red); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: stretch; width: 100%; text-align: left; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.opt .n { flex: none; width: 44px; display: grid; place-items: center; background: var(--gold); color: #000; font-weight: 800; font-size: 18px; }
.opt .t { flex: 1; min-width: 0; padding: 12px 14px; font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.opt:not(:disabled):hover { background: var(--surface2); }
.opt:not(:disabled):active { transform: scale(.985); }
.opt:disabled { cursor: default; opacity: .5; }
.opt.right { opacity: 1 !important; background: #1f6b35; color: #fff; box-shadow: none; }
.opt.wrong { opacity: 1 !important; background: #8c1c22; color: #fff; box-shadow: none; }
.opt.right .n, .opt.wrong .n { background: #fff; }
.verdict { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.verdict.ok { color: #2fbf5b; }
.verdict.bad { color: var(--red-hi); }
.gact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; justify-content: center; }
.gact .btn { flex: 1 1 200px; }

.rank { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 8px; max-width: 720px; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 0; min-height: 52px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rank .pl { flex: none; width: 44px; align-self: stretch; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: var(--surface2); font-variant-numeric: tabular-nums; }
.rank li:nth-child(-n+3) .pl { background: var(--gold); color: #000; }
.rank .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .pt { flex: none; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.rank li.me { box-shadow: inset 0 0 0 2px var(--gold); }
.rank li.me .nm::after { content: " (вы)"; color: var(--muted); font-weight: 600; }

/* ---------- монета БКЛка и кошелёк ---------- */
.coin { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; background: url(assets/coin.png) center / 20px 20px no-repeat; image-rendering: pixelated; flex: none; }
.big .coin { width: 40px; height: 40px; background-size: 40px 40px; vertical-align: -6px; }
.coinfly { position: fixed; left: 0; top: 0; z-index: 70; width: 24px; height: 24px; pointer-events: none; background: url(assets/coin_spin.png) 0 0 / 288px 24px no-repeat; image-rendering: pixelated; animation: coinspin .6s steps(12) infinite; opacity: 0; }
@keyframes coinspin { to { background-position: -288px 0; } }
.whdr { margin-left: auto; margin-right: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; max-width: 58vw; }
.whdr .wn { min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.whdr .wc { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.whdr .wv { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.whdr.flash { animation: wflash .5s ease-out; }
@keyframes wflash { 0% { background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 210, 0, .8); color: var(--gold-ink); } 100% { box-shadow: 0 0 0 12px rgba(255, 210, 0, 0); } }
@media (max-width: 380px) { .whdr .wn { display: none; } }
@media (min-width: 900px) { .whdr { margin-right: 10px; } .whdr .wn { max-width: 180px; } }
.rank .pt { display: inline-flex; align-items: center; gap: 6px; }
.word { white-space: nowrap; }
.brand { flex: none; }
@media (max-width: 460px) {
  .word { font-size: 19px; }
  .brand { gap: 7px; }
  .whdr { padding: 0 9px; gap: 6px; margin-right: 2px; min-width: 0; }
  .whdr .wn { max-width: 56px; }
  .ib { width: 38px; }
}
