/* ==========================================================
   RUSTY NAIL — LAYOUT
   Header, Footer
   ========================================================== */

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.site-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Логотип */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  transition: transform .2s;
}

.site-logo:hover .site-logo-mark {
  transform: rotate(-6deg) scale(1.05);
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.site-logo-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
}

.site-logo-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1.3px;
  margin-top: 3px;
}

/* Навигация */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.site-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .18s, background .18s;
  white-space: nowrap;
}

.site-nav-item i {
  font-size: 14px;
  color: var(--text-3);
  transition: color .18s;
}

.site-nav-item:hover {
  color: var(--text);
  background: var(--bg-1);
}

.site-nav-item:hover i { color: var(--text-2); }

.site-nav-item.is-active {
  color: var(--accent);
  background: var(--accent-08);
}

.site-nav-item.is-active i { color: var(--accent); }

.site-nav-badge {
  display: inline-flex;
  align-items: center;
  height: 14px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-left: 2px;
}

/* Правая часть */
.site-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-30);
  background: var(--accent-08);
  transform: translateY(-1px);
}

.steam-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: var(--accent-grad);
  color: #fff;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 700;
  transition: all .18s;
  white-space: nowrap;
}

.steam-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 52, 44, 0.4);
}

/* Адаптив */
@media (max-width: 1000px) {
  .site-nav-item span:not(.site-nav-badge) { display: none; }
  .site-nav-item { padding: 0 10px; }
}

@media (max-width: 700px) {
  .site-header-inner { gap: 12px; padding: 0 16px; height: 60px; }
  .site-logo-text { display: none; }
  .icon-btn { display: none; }
  .steam-btn span { display: none; }
  .steam-btn { padding: 0 12px; }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  flex-shrink: 0;
}

.site-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .site-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 18px 24px;
  }
}

/* Бренд */
.site-footer-brand { max-width: 320px; }

.site-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 14px;
}

.site-footer-logo:hover { text-decoration: none; }

.site-footer-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.site-footer-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.site-footer-logo-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
}

.site-footer-logo-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 1.3px;
  margin-top: 3px;
}

.site-footer-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 18px;
  font-weight: 500;
}

.site-footer-socials {
  display: flex;
  gap: 8px;
}

.site-footer-social {
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition: all .18s;
}

.site-footer-social:hover {
  color: var(--accent);
  background: var(--accent-08);
  border-color: var(--accent-30);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Колонки */
.site-footer-col-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin: 0 0 14px;
}

.site-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-list a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-footer-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Нижняя строка */
.site-footer-bottom {
  border-top: 1px solid var(--border);
  background: var(--bg-0);
}

.site-footer-bottom-inner {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px !important;
  grid-template-columns: unset !important;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .site-footer-bottom-inner {
    padding: 14px 18px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.site-footer-copy {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.site-footer-inn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-num);
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 100px;
  color: var(--text-2);
  letter-spacing: 0.3px;
}

.site-footer-inn i {
  color: var(--accent);
  font-size: 12px;
}

/* ==========================================================
   COOKIE BANNER
   ========================================================== */
.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 250;
  max-width: 420px;
  width: calc(100% - 40px);
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: #1a1a1f;
  border: 1px solid #2c2c38;
  border-radius: var(--r-lg);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .85),
    0 0 0 1px rgba(255, 255, 255, .04),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  opacity: 0;
  transform: translateY(20px) scale(.98);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}

.cookie-banner.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cookie-banner-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  background: var(--accent-08);
  border: 1px solid var(--accent-30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
}

.cookie-banner-body { flex: 1; min-width: 0; }

.cookie-banner-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.cookie-banner-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 14px;
}

.cookie-banner-text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.cookie-banner-text a:hover {
  color: var(--accent-hi);
  border-bottom-style: solid;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.cookie-btn i { font-size: 13px; }

.cookie-btn-accept {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 52, 44, .25);
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(224, 52, 44, .4);
}

.cookie-btn-decline {
  background: var(--bg-2);
  color: var(--text-2);
}

.cookie-btn-decline:hover {
  background: var(--bg-3);
  color: var(--text);
}

@media (max-width: 480px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    padding: 14px 16px;
  }
  .cookie-banner-icon { width: 32px; height: 32px; font-size: 14px; }
  .cookie-banner-title { font-size: 13px; }
  .cookie-banner-text { font-size: 11px; margin-bottom: 12px; }
  .cookie-banner-actions { flex-direction: column; }
  .cookie-btn { width: 100%; }
}

/* ==========================================================
   TOAST
   ========================================================== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateX(20px);
  transition: all .3s cubic-bezier(.22, 1, .36, 1);
  pointer-events: auto;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================
   ЛОГОТИПЫ ПЛАТЁЖНЫХ СИСТЕМ В ФУТЕРЕ (внутри колонки)
   ========================================================== */
.site-footer-payments-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.site-footer-payments-logos > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
  text-decoration: none;
}

.site-footer-payments-logos > *:hover {
  transform: translateY(-2px);
  opacity: 1;
  text-decoration: none;
}

.payment-logo {
  height: 26px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  display: block;
  filter: none;
}

.site-footer-payments-logos img[alt="МИР"] {
  height: 24px;
  max-width: 72px;
}

.site-footer-payments-logos img[alt="СБП"] {
  height: 28px;
  max-width: 80px;
}

.site-footer-payments-logos img[alt="T-Pay"] {
  height: 26px;
  max-width: 76px;
}

@media (max-width: 560px) {
  .site-footer-payments-logos {
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
  }
  .payment-logo {
    height: 22px;
  }
}

/* ==========================================================
   СТРАНИЦА ПОПОЛНЕНИЯ БАЛАНСА
   ========================================================== */
.topup-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.topup-preset {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 16px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}

.topup-preset:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.topup-preset.is-active {
  background: var(--accent-08);
  border-color: var(--accent);
  color: var(--accent);
}

.topup-custom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}

.topup-custom-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 8px;
}

.topup-custom-input {
  position: relative;
}

.topup-custom-input input {
  width: 100%;
  height: 50px;
  background: var(--bg-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 0 40px 0 16px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  outline: none;
  transition: border-color .18s;
}

.topup-custom-input input:focus {
  border-color: var(--accent);
}

.topup-custom-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 18px;
  font-weight: 700;
  pointer-events: none;
}

.topup-info {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-radius: var(--r);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.topup-info p {
  margin: 0 0 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.topup-info p:last-child {
  margin-bottom: 0;
}

.topup-info i {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================
   TOPUP DRAWER
   ========================================================== */
.topup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.topup-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.topup-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 520px;
  background: var(--bg-1);
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  border: 1px solid var(--border-2);
  border-bottom: none;
  z-index: 310;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topup-drawer.is-open {
  transform: translateX(-50%) translateY(0);
}

.topup-drawer-inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topup-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.topup-sub {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.topup-sub b {
  color: var(--accent);
  font-family: var(--font-num);
  font-weight: 800;
}

.topup-close {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all .15s;
  flex-shrink: 0;
}

.topup-close:hover {
  color: var(--text);
  background: var(--bg-3);
  transform: rotate(90deg);
}

.topup-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
}

.topup-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.topup-preset {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}

.topup-preset:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.topup-preset.is-active {
  background: var(--accent-08);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-08);
}

.topup-custom {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}

.topup-custom-label {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.topup-custom-input {
  position: relative;
}

.topup-custom-input input {
  width: 100%;
  height: 52px;
  background: var(--bg-0);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 0 42px 0 16px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 800;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.topup-custom-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-08);
}

.topup-custom-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 18px;
  font-weight: 800;
  pointer-events: none;
}

.topup-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: var(--accent-grad);
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s cubic-bezier(.34, 1.4, .64, 1);
  box-shadow: 0 6px 20px rgba(224, 52, 44, 0.3);
  position: relative;
  overflow: hidden;
}

.topup-pay-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left .6s ease;
}

.topup-pay-btn:hover:not(:disabled)::before { left: 100%; }

.topup-pay-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(224, 52, 44, 0.5);
}

.topup-pay-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.topup-pay-btn i { font-size: 16px; }

.topup-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.topup-note i { color: var(--green); font-size: 13px; }

.topup-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .topup-presets { grid-template-columns: repeat(2, 1fr); }
  .topup-head { padding: 16px 18px 14px; }
  .topup-body { padding: 16px 18px 20px; }
  .topup-title { font-size: 16px; }
}

/* ==========================================================
   HEADER BALANCE (кнопка)
   ========================================================== */
.header-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}

.header-balance:hover {
  border-color: var(--accent-30);
  background: var(--accent-08);
  transform: translateY(-1px);
}

.header-balance i:first-child {
  color: var(--accent);
  font-size: 14px;
}

.header-balance b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Бонус при пополнении */
.topup-bonus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(123, 201, 111, 0.12), rgba(123, 201, 111, 0.04));
  border: 1px solid rgba(123, 201, 111, 0.35);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

.topup-bonus i {
  font-size: 15px;
}

.topup-bonus b {
  color: var(--green);
  font-family: var(--font-num);
  font-weight: 800;
}