/* Shared visual refinement: preserve the catalog layout and brand colors. */
:root {
  --control-radius: 9px;
  --control-border: rgba(255,255,255,.16);
  --control-surface: #252527;
  --card-radius: 8px;
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
:where(button):disabled { cursor: not-allowed; }
.btn, .header__action, .course-btn, .course-back, .admin-btn,
.admin-page__close, .browse__more, .sbtn, .game-card__watch, .footer__code {
  border-radius: var(--control-radius);
  line-height: 1.3;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease,
    color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn {
  justify-content: center;
  min-height: 48px;
  padding: 12px 23px;
  gap: 10px;
  font-size: 14px;
  border: 1px solid transparent;
}
.btn svg { flex-shrink: 0; width: 21px; height: 21px; }
.btn--play { background: #f5f5f4; color: #141414; box-shadow: 0 3px 12px #0003; }
.btn--play:hover { background: #fff; box-shadow: 0 5px 20px #0004; }
.btn--info, .btn--round {
  background: rgba(35,35,38,.9);
  border-color: rgba(255,255,255,.24);
  color: #f4f4f5;
}
.btn--info:hover, .btn--round:hover { background: #363639; border-color: #ffffff70; }
.btn--round { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.btn--hide { min-height: 40px; padding: 9px 13px; font-size: 12px; border-color: #ff78784d; }
.hero__buttons, .modal__hero-buttons { flex-wrap: wrap; gap: 10px; }
.hero__desc { line-height: 1.6; color: #dedee1; }

.header.is-scrolled {
  background: rgba(20,20,20,.96);
  border-bottom: 1px solid #ffffff0d;
  backdrop-filter: blur(16px);
}
.header__right { gap: 12px; }
.header__action {
  min-height: 38px;
  padding: 9px 14px;
  white-space: nowrap;
  border-color: var(--control-border);
  background: rgba(32,32,35,.85);
}
.header__action--ghost { background: #f4f4f5; color: #18181b; border-color: transparent; }
.header__action--ghost:hover { background: #fff; }
.header__action--aff { color: #e4e4e7; background: rgba(32,32,35,.85); border-color: var(--control-border); }
.header__action--aff:hover { background: #353538; border-color: #ffffff50; color: #fff; }
.header__action--affon { color: #ffe08a; border-color: #ffe08a55; }
.header__action--danger { color: #ffb5b9; background: #e509141a; border-color: #e5091440; }
.avatar { border-radius: 9px; }
.search { border-radius: 9px; }
.search__btn { min-width: 36px; min-height: 38px; align-items: center; justify-content: center; }
.nav__link { position: relative; }
@media (min-width: 901px) {
  .nav__link::after { content: ''; position: absolute; bottom: -10px; left: 0; right: 0;
    height: 2px; border-radius: 2px; background: var(--brand); opacity: 0; }
  .nav__link.is-active::after { opacity: 1; }
}

.course-btn, .course-back, .browse__more, .admin-page__close, .footer__code {
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid var(--control-border);
  background: var(--control-surface);
  color: #ededf0;
  font-size: 13px;
}
.course-btn:hover:not(:disabled), .course-back:hover, .browse__more:hover,
.admin-page__close:hover, .footer__code:hover { background: #333336; border-color: #ffffff40; }
.course-btn--mark.is-done { background: #173c2a; border-color: #46d36955; color: #a8edbd; }
.admin-btn { min-height: 36px; padding: 8px 12px; }
.admin-btn:hover { filter: none; border-color: #ffffff50; }
.admin-btn--ok:hover { background: #1fc46b35; border-color: #1fc46b88; }
.admin-btn--no:hover { background: #e5091435; border-color: #e5091488; }
.sbtn, .game-card__watch { min-height: 38px; padding: 10px 14px; background: #168b2d; }
.sbtn:hover, .game-card__watch:hover { background: #20aa39; }
.sfab { border-radius: 12px; background: #252527; border: 1px solid #ffffff26;
  padding: 13px 17px; font-size: 13px; box-shadow: 0 6px 24px #0005; }
.sfab:hover { background: #353538; border-color: #ffffff50; }
.sfab.is-open { background: #17371d; border-color: #67f04b66; }
.admin-nav__item.is-active { background: #67f04b1c; color: #a9ff98; box-shadow: inset 3px 0 var(--brand); }
.admin-card, .admin-stat, .spanel { border-color: #ffffff12; }
.row__seeall { min-height: 36px; display: inline-flex; align-items: center; padding: 8px 10px; }
.lang-toggle { padding: 3px; gap: 3px; background: #171719; border-radius: 9px; }
.lang-toggle button, .vp__source { border-radius: 6px; min-height: 36px; }

@media (hover: hover) {
  .btn:not(:disabled):hover, .sbtn:not(:disabled):hover { transform: translateY(-1px); }
}
.btn:not(:disabled):active, .header__action:not(:disabled):active,
.course-btn:not(:disabled):active, .sbtn:not(:disabled):active { transform: translateY(1px); }
button:disabled { opacity: .45; box-shadow: none; }
@media (max-width: 1100px) and (min-width: 901px) {
  .header__left { gap: 22px; }
  .nav { gap: 12px; }
  .nav__link { font-size: 12px; }
  .header__action { padding-inline: 10px; }
}
@media (max-width: 600px) {
  .header { padding: 14px 4%; }
  .header__left { gap: 12px; }
  .logo { gap: 6px; font-size: 22px; }
  .logo__mark { width: 36px; height: 36px; }
  .header__right { gap: 7px; }
  .header__action { min-height: 36px; padding: 8px 11px; }
  .avatar { display: none; }
  .hero__content { right: 4%; }
  .hero__buttons .btn { padding: 11px 15px; font-size: 13px; min-height: 46px; }
  .search.is-open { position: absolute; left: 4%; right: 4%; top: 66px; background: #1d1d20; }
  .search.is-open .search__input { width: 100%; min-width: 0; }
  .sfab { right: 16px; bottom: 16px; min-width: 46px; min-height: 46px; justify-content: center; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
