:root {
  --bg-main: #030b1f;
  --bg-card: #091833;
  --bg-soft: #10264d;
  --line: #1f4f9c;
  --primary: #1d4ed8;
  --primary-strong: #2563eb;
  --primary-light: #60a5fa;
  --text-main: #eaf3ff;
  --text-muted: #a9bfdc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  background:
    radial-gradient(circle at 8% 20%, rgba(56, 130, 255, 0.22), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 24%),
    linear-gradient(130deg, #081832 0%, #040d1f 45%, #020711 100%);
  color: var(--text-main);
}

body {
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease;
}

body.page-enter {
  opacity: 0;
  transform: translateY(8px) scale(0.995);
  filter: saturate(0.9);
}

body.page-enter.page-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: saturate(1);
}

body.page-leave-active {
  opacity: 0;
  transform: translateY(-6px) scale(0.995);
  filter: saturate(0.85);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  max-width: 1540px;
  margin: 0 auto;
  padding: 18px 20px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 22, 48, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(2, 10, 24, 0.45);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.8px;
  font-size: 28px;
}

.logo span {
  color: var(--primary-light);
}

.desktop-nav {
  display: flex;
  gap: 10px;
}

.nav-link {
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(135deg, #143b7c, #1c5bcc);
  box-shadow: 0 10px 18px rgba(19, 69, 157, 0.4);
}

.nav-link:hover {
  transform: translateY(-2px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-list {
  display: flex;
  gap: 7px;
  align-items: center;
}

.lang {
  width: 34px;
  height: 34px;
  border: 1.3px solid #3966a4;
  background: rgba(13, 31, 60, 0.9);
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.lang.active {
  border-color: #6fb0ff;
  box-shadow: 0 0 0 2px rgba(82, 153, 255, 0.15);
}

.lang:hover {
  transform: translateY(-1px);
  border-color: #71acff;
  box-shadow: 0 8px 16px rgba(5, 17, 34, 0.35);
}

.wallet-btn {
  border: 0;
  color: white;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  cursor: pointer;
  font-size: 17px;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.wallet-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 18px rgba(29, 78, 216, 0.38);
}

.burger-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b2145;
  padding: 8px;
  cursor: pointer;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  padding: 24px 16px;
  background: #06162f;
  border-left: 1px solid var(--line);
  transition: right 0.25s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu.open {
  right: 0;
}

.mobile-close {
  align-self: flex-end;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--text-main);
  background: transparent;
  cursor: pointer;
}

.mobile-logo {
  margin-bottom: 10px;
}

.mobile-nav-link {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-link.active {
  background: #113571;
}

.mobile-nav-link:hover {
  transform: translateX(4px);
  border-color: #5ca0ff;
}

.mobile-wallet {
  margin-top: 10px;
}

.topup-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 40;
}

.topup-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.topup-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 24, 0.72);
  backdrop-filter: blur(3px);
}

.topup-modal__panel {
  position: relative;
  width: min(92vw, 460px);
  border-radius: 16px;
  border: 1px solid #2e64b7;
  background: linear-gradient(165deg, rgba(8, 28, 59, 0.97), rgba(7, 18, 37, 0.98));
  box-shadow: 0 24px 42px rgba(2, 10, 24, 0.55);
  padding: 18px 18px 20px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.topup-modal.open .topup-modal__panel {
  transform: translateY(0) scale(1);
}

.topup-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(17, 48, 97, 0.9);
  color: #dceeff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.topup-modal__panel h2 {
  margin: 0;
  font-size: 28px;
}

.topup-modal__panel p {
  margin: 10px 0 14px;
  color: #b5cde9;
}

.topup-form {
  display: grid;
  gap: 8px;
}

.topup-form label {
  font-weight: 700;
  color: #d6e8ff;
}

.topup-form input {
  width: 100%;
  border: 1px solid #3a74ca;
  border-radius: 10px;
  height: 42px;
  padding: 0 12px;
  color: #eaf4ff;
  background: linear-gradient(180deg, rgba(12, 41, 87, 0.92), rgba(8, 25, 54, 0.95));
  outline: none;
  font-size: 15px;
}

.topup-form input:focus {
  border-color: #69a9ff;
  box-shadow: 0 0 0 2px rgba(66, 139, 252, 0.23);
}

.topup-submit {
  margin-top: 8px;
  width: 100%;
}

@media (max-width: 980px) {
  .desktop-nav,
  .lang-list {
    display: none;
  }

  .burger-btn {
    display: block;
  }
}
