.main-header {
  --header-menu-top: 57px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(10, 14, 20, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(129, 145, 163, 0.16);
}

.main-header .header-topbar,
.main-header .header-panel,
.main-header .header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.main-header .header-topbar {
  gap: 10px;
}

.main-header .header-panel {
  justify-content: space-between;
  gap: 12px;
}

.main-header .header-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.main-header .logo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(228px, calc(100vw - 74px));
  min-height: 38px;
  padding: 3px 10px 3px 4px;
  border: 1px solid rgba(129, 145, 163, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(114, 230, 164, 0.2), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(87, 200, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 35, 0.78), rgba(8, 13, 22, 0.58));
  font-size: inherit;
  font-weight: 400;
  text-transform: none;
  color: #f4f7fb;
  text-decoration: none;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(5, 8, 15, 0.22);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.main-header .logo::before {
  content: "";
  position: absolute;
  inset: -70% auto -70% -36%;
  z-index: -1;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0;
  transform: rotate(16deg) translateX(-120%);
  transition: opacity 0.2s ease, transform 0.7s ease;
}

.main-header .logo:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 230, 164, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 34px rgba(5, 8, 15, 0.28),
    0 0 28px rgba(87, 200, 255, 0.12);
}

.main-header .logo:hover::before {
  opacity: 1;
  transform: rotate(16deg) translateX(460%);
}

.main-header .header-menu-toggle {
  position: relative;
  flex: 0 0 38px;
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(129, 145, 163, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 0%, rgba(87, 200, 255, 0.22), transparent 34%),
    rgba(17, 24, 35, 0.86);
  color: #f4f7fb;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 14px 26px rgba(5, 8, 15, 0.22);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.main-header .header-menu-toggle:hover,
.main-header .header-menu-toggle:focus-visible {
  border-color: rgba(87, 200, 255, 0.42);
  box-shadow:
    0 14px 26px rgba(5, 8, 15, 0.24),
    0 0 0 3px rgba(87, 200, 255, 0.1);
}

.main-header .header-menu-toggle__line {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(87, 200, 255, 0.22);
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.16s ease, width 0.18s ease;
}

.main-header .header-menu-toggle__line:nth-of-type(1) {
  transform: translate(-50%, calc(-50% - 6px));
}

.main-header .header-menu-toggle__line:nth-of-type(2) {
  transform: translate(-50%, -50%);
}

.main-header .header-menu-toggle__line:nth-of-type(3) {
  transform: translate(-50%, calc(-50% + 6px));
}

.main-header.is-menu-open .header-menu-toggle__line:nth-of-type(1) {
  width: 20px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.main-header.is-menu-open .header-menu-toggle__line:nth-of-type(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.2);
}

.main-header.is-menu-open .header-menu-toggle__line:nth-of-type(3) {
  width: 20px;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.main-header .logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.26), transparent 22%),
    linear-gradient(135deg, #72e6a4 0%, #57c8ff 52%, #b884ff 100%);
  color: #09111b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -12px 20px rgba(8, 17, 26, 0.22),
    0 10px 24px rgba(87, 200, 255, 0.22);
}

.main-header .logo-mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 1px solid rgba(114, 230, 164, 0.22);
  opacity: 0.72;
  pointer-events: none;
}

.main-header .logo-mark__svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 36px;
  height: 36px;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.main-header .logo:hover .logo-mark__svg {
  transform: rotate(-4deg) scale(1.04);
  filter: drop-shadow(0 0 10px rgba(114, 230, 164, 0.34));
}

.main-header .logo-mark__frame {
  fill: rgba(6, 13, 22, 0.9);
  stroke: rgba(244, 247, 251, 0.34);
  stroke-width: 1.4;
}

.main-header .logo-mark__inner {
  fill: url("#logo-lockup-inner");
}

.main-header .logo-mark__case {
  fill: rgba(244, 247, 251, 0.96);
}

.main-header .logo-mark__handle,
.main-header .logo-mark__cut {
  fill: none;
  stroke: #09111b;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.main-header .logo-mark__spark {
  fill: #f6b85f;
  filter: drop-shadow(0 0 5px rgba(246, 184, 95, 0.54));
}

.main-header .logo-mark__text {
  fill: #09111b;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.main-header .logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1;
}

.main-header .logo-text strong {
  display: flex;
  align-items: baseline;
  min-width: 0;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.main-header .logo-text strong span:first-child {
  color: #f4f7fb;
}

.main-header .logo-text strong span:last-child {
  margin-left: 2px;
  background: linear-gradient(135deg, #72e6a4 0%, #57c8ff 62%, #f6b85f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(87, 200, 255, 0.16);
}

.main-header .logo-text small {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7fe9b6;
  white-space: nowrap;
  opacity: 0.88;
}

.main-header .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.main-header .nav-links a {
  padding: 8px 10px;
  border-radius: 11px;
  text-decoration: none;
  color: #cdd7e3;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-header .nav-links a.is-active {
  background: linear-gradient(135deg, rgba(87, 200, 255, 0.18), rgba(114, 230, 164, 0.18));
  color: #f4f7fb;
  box-shadow:
    inset 0 0 0 1px rgba(114, 230, 164, 0.16),
    0 12px 24px rgba(5, 8, 15, 0.16);
}

.main-header .nav-links a:hover {
  background: rgba(87, 200, 255, 0.12);
  color: #f4f7fb;
  transform: translateY(-1px);
}

.main-header .steam-login {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.main-header .language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 38px;
  color: #cdd7e3;
  z-index: 60;
}

.main-header .language-switcher:empty {
  display: none;
}

.main-header .language-switcher__label {
  color: #7f90a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-header .language-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 5px 9px 5px 12px;
  border: 1px solid rgba(129, 145, 163, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(87, 200, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(18, 27, 41, 0.92), rgba(12, 19, 31, 0.92));
  color: #dbe7f4;
  font: inherit;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(5, 8, 15, 0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.main-header .language-switcher__trigger:hover,
.main-header .language-switcher.is-open .language-switcher__trigger {
  transform: translateY(-1px);
  border-color: rgba(87, 200, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(87, 200, 255, 0.1),
    0 18px 34px rgba(5, 8, 15, 0.3);
}

.main-header .language-switcher__trigger:focus-visible {
  outline: 2px solid rgba(114, 230, 164, 0.48);
  outline-offset: 3px;
}

.main-header .language-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.44);
  color: #f4f7fb;
  font-size: 13px;
  font-weight: 900;
}

.main-header .language-switcher__current-name {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-header .language-switcher__current-currency {
  color: #f6b85f;
}

.main-header .language-switcher__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #8fa0b5;
  border-bottom: 2px solid #8fa0b5;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.main-header .language-switcher.is-open .language-switcher__chevron {
  border-color: #72e6a4;
  transform: rotate(225deg) translateY(-1px);
}

.main-header .language-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(129, 145, 163, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 15% 0%, rgba(87, 200, 255, 0.18), transparent 34%),
    radial-gradient(circle at 95% 8%, rgba(114, 230, 164, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(14, 22, 35, 0.98), rgba(8, 13, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 26px 60px rgba(0, 0, 0, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.main-header .language-switcher.is-open .language-switcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.main-header .language-switcher__menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 10px;
  color: #7f90a4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-header .language-switcher__menu-head strong {
  color: #f4f7fb;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.main-header .language-switcher__options {
  display: grid;
  gap: 8px;
}

.main-header .language-switcher__option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(129, 145, 163, 0.12);
  border-radius: 18px;
  background: rgba(17, 24, 35, 0.72);
  color: #dbe7f4;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.main-header .language-switcher__option:hover,
.main-header .language-switcher__option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(87, 200, 255, 0.28);
  background: rgba(23, 34, 51, 0.94);
  outline: none;
}

.main-header .language-switcher__option.is-active {
  border-color: rgba(114, 230, 164, 0.38);
  background:
    linear-gradient(135deg, rgba(87, 200, 255, 0.18), rgba(114, 230, 164, 0.14)),
    rgba(17, 24, 35, 0.92);
  box-shadow: inset 0 0 0 1px rgba(114, 230, 164, 0.1);
}

.main-header .language-switcher__option-code,
.main-header .language-switcher__option-currency {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(5, 12, 21, 0.56);
  color: #72e6a4;
  font-size: 12px;
  font-weight: 900;
}

.main-header .language-switcher__option-currency {
  width: 38px;
  height: 38px;
  color: #f6b85f;
}

.main-header .language-switcher__option-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.main-header .language-switcher__option-main strong {
  color: #f4f7fb;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-header .language-switcher__option-main small {
  color: #8fa0b5;
  font-size: 12px;
  font-weight: 700;
}

.main-header .language-switcher__select {
  min-width: 112px;
  border: none;
  border-radius: 999px;
  padding: 7px 28px 7px 10px;
  background: rgba(10, 14, 20, 0.72);
  color: #f4f7fb;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.main-header .language-switcher__select:focus {
  outline: 2px solid rgba(114, 230, 164, 0.35);
  outline-offset: 2px;
}

.main-header .steam-login #user-info-placeholder {
  width: 100%;
}

.main-header .auth-slot[data-auth-state="loading"] {
  min-height: 42px;
}

.main-header .login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #57c8ff 0%, #72e6a4 100%);
  color: #08111a;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(87, 200, 255, 0.22);
}

.main-header .login-button:hover {
  transform: translateY(-1px);
}

.main-header .account-pill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  width: auto;
  min-width: 0;
  padding: 5px 6px;
  background:
    linear-gradient(180deg, rgba(17, 24, 35, 0.72), rgba(10, 16, 25, 0.72));
  border: 1px solid rgba(129, 145, 163, 0.12);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(6, 10, 18, 0.18);
}

.main-header .user-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 142px;
  color: #f4f7fb;
  text-decoration: none;
}

.main-header .user-info:hover .user-info__name {
  color: #72e6a4;
}

.main-header .user-info .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(114, 230, 164, 0.65);
  box-shadow: 0 0 0 4px rgba(114, 230, 164, 0.08);
}

.main-header .user-info__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-header .user-info__caption {
  display: none;
}

.main-header .user-info__name {
  max-width: 92px;
  font-size: 13px;
  font-weight: 800;
  color: #f4f7fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-header .balance-block {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  margin-left: auto;
  border-left: 1px solid rgba(129, 145, 163, 0.12);
}

.main-header .balance-block__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-header .balance-block__label {
  display: none;
}

.main-header .balance-block__value {
  font-size: 13px;
  font-weight: 850;
  color: #f6b85f;
  white-space: nowrap;
}

.main-header .balance-block #add-funds {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #57c8ff 0%, #72e6a4 100%);
  color: #08111a;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main-header .balance-block #add-funds:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(87, 200, 255, 0.28);
}

body.modal-open {
  overflow: hidden;
}

.topup-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.topup-modal[hidden] {
  display: none;
}

.topup-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.68);
  backdrop-filter: blur(14px);
}

.topup-modal__dialog {
  position: relative;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(129, 145, 163, 0.18);
  background:
    radial-gradient(circle at top right, rgba(87, 200, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(14, 20, 31, 0.98), rgba(10, 15, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 28px 60px rgba(5, 8, 15, 0.42);
  color: #eef3fa;
}

.topup-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topup-modal__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #7f90a4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topup-modal__head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.06;
  color: #f4f7fb;
}

.topup-modal__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(129, 145, 163, 0.14);
  border-radius: 50%;
  background: rgba(18, 26, 38, 0.86);
  color: #cdd7e3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topup-modal__close:hover {
  transform: translateY(-1px);
  border-color: rgba(87, 200, 255, 0.22);
  color: #f4f7fb;
}

.topup-modal__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topup-modal__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #8fa0b5;
  font-size: 13px;
}

.topup-modal__section-head strong {
  color: #dbe4ef;
  font-size: 13px;
  font-weight: 700;
}

.topup-modal__methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.topup-method {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(129, 145, 163, 0.12);
  border-radius: 18px;
  background: rgba(18, 26, 38, 0.78);
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.topup-method:hover,
.topup-method.is-active {
  transform: translateY(-2px);
  border-color: rgba(87, 200, 255, 0.24);
  background: rgba(23, 33, 49, 0.96);
  box-shadow: 0 18px 32px rgba(5, 8, 15, 0.24);
}

.topup-method:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.65);
}

.topup-method:disabled:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.topup-method.is-active {
  border-color: rgba(114, 230, 164, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(114, 230, 164, 0.08),
    0 18px 34px rgba(87, 200, 255, 0.16);
}

.topup-method__badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(87, 200, 255, 0.16), rgba(114, 230, 164, 0.18));
  color: #eef3fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topup-method__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.topup-method__title {
  color: #f4f7fb;
  font-size: 15px;
  font-weight: 700;
}

.topup-method__hint {
  color: #90a2b8;
  font-size: 12px;
  line-height: 1.4;
}

.topup-modal__presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.topup-preset {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(129, 145, 163, 0.12);
  border-radius: 14px;
  background: rgba(18, 26, 38, 0.78);
  color: #dbe4ef;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.topup-preset:hover,
.topup-preset.is-active {
  transform: translateY(-1px);
  border-color: rgba(87, 200, 255, 0.24);
  background: rgba(23, 33, 49, 0.96);
}

.topup-preset.is-active {
  border-color: rgba(114, 230, 164, 0.28);
  background: linear-gradient(135deg, rgba(87, 200, 255, 0.18), rgba(114, 230, 164, 0.18));
  color: #f4f7fb;
}

.topup-modal__amount {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #8fa0b5;
  font-size: 13px;
}

.topup-modal__amount input {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(129, 145, 163, 0.14);
  border-radius: 14px;
  background: rgba(18, 26, 38, 0.84);
  color: #eef3fa;
  font-size: 15px;
}

.topup-modal__amount input:focus {
  outline: none;
  border-color: rgba(114, 230, 164, 0.34);
  box-shadow: 0 0 0 3px rgba(114, 230, 164, 0.12);
}

.topup-modal__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.topup-modal__summary-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(129, 145, 163, 0.12);
  background: rgba(18, 26, 38, 0.78);
}

.topup-modal__summary-label {
  display: block;
  margin-bottom: 8px;
  color: #7f90a4;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topup-modal__summary-card strong {
  font-size: 20px;
  font-weight: 800;
  color: #f4f7fb;
}

.topup-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.topup-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(129, 145, 163, 0.14);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.topup-modal__button:hover {
  transform: translateY(-1px);
}

.topup-modal__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.topup-modal__button--ghost {
  background: rgba(18, 26, 38, 0.82);
  color: #dbe4ef;
}

.topup-modal__button--primary {
  border: none;
  background: linear-gradient(135deg, #57c8ff 0%, #72e6a4 100%);
  color: #08111a;
  box-shadow: 0 16px 30px rgba(87, 200, 255, 0.2);
}

.pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination button {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
}

@media (max-width: 1280px) {
  .main-header {
    display: block;
    padding: 6px 10px;
  }

  .main-header .header-topbar {
    justify-content: space-between;
  }

  .main-header .header-menu-toggle {
    display: grid;
  }

  .main-header .header-panel {
    position: fixed;
    top: var(--header-menu-top);
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    z-index: 1001;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-height: calc(100dvh - var(--header-menu-top) - 10px);
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(129, 145, 163, 0.18);
    border-radius: 24px;
    background:
      radial-gradient(circle at top right, rgba(87, 200, 255, 0.18), transparent 34%),
      linear-gradient(180deg, rgba(11, 18, 29, 0.98), rgba(8, 13, 22, 0.98));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .main-header.is-menu-open .header-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .main-header .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .main-header .nav-links a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(129, 145, 163, 0.12);
    background: rgba(17, 24, 35, 0.72);
  }

  .main-header .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 0;
  }

  .main-header .steam-login,
  .main-header .language-switcher,
  .main-header .login-button {
    width: 100%;
  }

  .main-header .steam-login #user-info-placeholder {
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }

  .main-header .account-pill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    width: min(100%, 430px);
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background:
      radial-gradient(circle at left top, rgba(87, 200, 255, 0.12), transparent 36%),
      rgba(12, 18, 28, 0.82);
  }

  .main-header .user-info {
    max-width: none;
  }

  .main-header .user-info__name {
    max-width: none;
  }

  .main-header .balance-block {
    width: auto;
    padding-left: 8px;
    margin-left: 0;
    border-left: 1px solid rgba(129, 145, 163, 0.12);
    border-top: none;
    padding-top: 0;
  }

  .main-header .language-switcher {
    display: block;
    justify-content: space-between;
    min-height: 0;
  }

  .main-header .language-switcher__trigger {
    width: 100%;
    justify-content: space-between;
  }

  .main-header .language-switcher__current {
    flex: 1;
    justify-content: center;
  }

  .main-header .language-switcher__menu {
    position: static;
    width: 100%;
    min-width: 100%;
    margin-top: 8px;
    transform-origin: top center;
  }

  .main-header .language-switcher:not(.is-open) .language-switcher__menu {
    display: none;
  }

  .main-header .login-button {
    min-height: 42px;
  }

  body.header-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .main-header .logo {
    max-width: calc(100vw - 72px);
    padding-right: 8px;
  }

  .main-header .logo-mark {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .main-header .logo-mark__svg {
    width: 32px;
    height: 32px;
  }

  .main-header .logo-text strong {
    font-size: 14px;
  }

  .main-header .logo-text small {
    display: none;
  }

  .main-header .nav-links {
    grid-template-columns: 1fr;
  }

  .main-header .account-pill {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
    border-radius: 16px;
  }

  .main-header .balance-block {
    width: auto;
    padding-left: 8px;
    margin-left: 0;
    border-left: 1px solid rgba(129, 145, 163, 0.12);
    border-top: none;
    padding-top: 0;
  }

  .topup-modal {
    padding: 14px;
  }

  .topup-modal__dialog {
    padding: 18px;
    border-radius: 22px;
  }

  .topup-modal__head h2 {
    font-size: 26px;
  }

  .topup-modal__methods,
  .topup-modal__presets,
  .topup-modal__summary {
    grid-template-columns: 1fr;
  }

  .topup-modal__footer {
    flex-direction: column-reverse;
  }

  .topup-modal__button {
    width: 100%;
  }
}

/* Shared pages, including editorial routes without seo.css. */
.skip-link { position:fixed; left:16px; top:16px; z-index:1100; padding:10px 14px; border-radius:8px; background:var(--gb-accent,#b6f400); color:#11130b; font-size:13px; font-weight:700; text-decoration:none; transform:translateY(-200%); }
.skip-link:focus { transform:translateY(0); }

/* Canonical CASECS2 graphite header. Retired blue/glass decoration must never win, even without theme.css. */
.main-header { padding: 18px 28px; gap: 30px; background: rgba(17,17,16,.96); border-bottom-color: #262623; box-shadow:none; }
.main-header .logo { border:0; border-radius:0; background:none; box-shadow:none; padding:0; gap:9px; }
.main-header .logo::before { display:none; }
.main-header .logo:hover { box-shadow:none; }
.main-header .logo-text strong { font-size:26px; letter-spacing:-1.2px; }
.main-header .logo-text small { display:none; }
.main-header .logo-mark { background:none; border:0; box-shadow:none; }
.main-header .logo-mark__svg { filter:none; }
.main-header .logo-text strong span:last-child { color:var(--gb-accent); }
.main-header .nav-links { gap:6px; }
.main-header .nav-links a { padding:12px 13px; font-size:13px; color:#9c9c94; font-weight:650; border-radius:10px; }
.main-header .nav-links a.is-active { background:#272723; color:#f7f7f0; box-shadow:none; }
.main-header .nav-links a:hover { background:#242421; color:#f7f7f0; transform:none; }
.main-header .account-pill { background:#232320; border:1px solid #33332d; border-radius:12px; box-shadow:none; padding:8px 10px; }
.main-header .balance-block__value { color:var(--gb-text); font-variant-numeric:tabular-nums; }
.main-header .balance-block #add-funds { background:var(--gb-accent); width:32px; height:32px; border-radius:9px; box-shadow:none; }
.main-header .user-info .avatar { border:1px solid #525249; box-shadow:none; }
.main-header .login-button { background:var(--gb-accent); color:#171b0c; border:0; border-radius:12px; min-height:46px; box-shadow:none; }
.main-header .language-switcher__trigger { border-radius:10px; border-color:#33332d; background:#232320; box-shadow:none; padding:5px 10px; }
.main-header .language-switcher__current { background:none; padding:5px 0; font-weight:600; }
.main-header .language-switcher__current-currency { color:#a4a49b; }
.main-header .language-switcher__menu { background:#20201d; border-color:#35352f; border-radius:12px; box-shadow:0 18px 50px #0008; }
.main-header .header-menu-toggle { background:#272723; border-color:#35352e; box-shadow:none; border-radius:10px; }
.main-header .gamification-mini { background:#282c20; border:0; border-radius:9px; box-shadow:none; }
.main-header .gamification-mini__level { background:none; color:var(--gb-accent); border-radius:6px; font-weight:700; }
.main-header .balance-block #add-funds { color:var(--brand-on-accent,#111); }
@media(max-width:1280px){.main-header{padding:12px 18px;gap:16px;--header-menu-top:76px}.main-header .header-panel{background:#191917;border-color:#33332d;box-shadow:0 24px 40px #0006;border-radius:14px}.main-header .nav-links a{background:#252522;border-color:#33332d}}
@media(max-width:600px){.main-header{padding:10px 14px;--header-menu-top:68px}.main-header .logo-text strong{font-size:24px}}

/* Session availability is distinct from signed-out; status does not grow header height. */
.main-header .auth-slot{display:flex;align-items:center;gap:6px;min-height:42px}
.auth-session-description{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.auth-session-retry{flex:0 0 34px;width:34px;min-height:34px;padding:0;border:1px solid #a38b36;border-radius:8px;background:#302b19;color:#ffe48a;font-size:23px;cursor:pointer}
.auth-session-retry:focus-visible{outline:3px solid #fff;outline-offset:3px}.auth-session-retry:disabled{opacity:.5;cursor:wait}

.auth-session-noscript{display:none}@media(max-width:1280px){.auth-session-noscript{display:block;margin-top:8px}.main-header .auth-session-noscript .login-button{width:auto}}

/* Financial/profile snapshots are not a session-proof fallback. */
.auth-slot[data-session-state="loading"] #user-balance,
.auth-slot[data-session-state="temporarily_unavailable"] #user-balance{position:relative;color:transparent!important}
.auth-slot[data-session-state="loading"] #user-balance::after,
.auth-slot[data-session-state="temporarily_unavailable"] #user-balance::after{content:"—";position:absolute;left:0;color:var(--gb-text,#eee)}
[data-auth-session-state="loading"] .gamification-mini,
[data-auth-session-state="temporarily_unavailable"] .gamification-mini,
[data-auth-session-state="loading"] .gamification-float,
[data-auth-session-state="temporarily_unavailable"] .gamification-float{visibility:hidden}
body.profile-page[data-profile-state]:not([data-profile-state="authenticated"]) #saved-calculations{visibility:hidden;pointer-events:none}
