:root {
  --site-nav-bg: #0d0e14;
  --site-nav-panel: #1a1c24;
  --site-nav-border: #343741;
  --site-nav-text: #f7f7fa;
  --site-nav-muted: #9295a3;
  --site-nav-accent: #08ce8a;
}

.yoooov-site-nav {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 68px !important;
  height: 68px !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 28px !important;
  background: var(--site-nav-bg) !important;
  border-top: 1px solid #292b32 !important;
  border-bottom: 1px solid #202229 !important;
  color: var(--site-nav-text) !important;
  position: relative;
  z-index: 1000;
}

.yoooov-site-nav .nav-left,
.yoooov-site-nav .yoooov-site-nav-left {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  gap: clamp(38px, 4vw, 68px) !important;
}

.yoooov-site-brand,
.yoooov-site-nav .logo,
.yoooov-site-nav .brand {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
  color: var(--site-nav-text) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.035em !important;
  text-decoration: none !important;
}

.yoooov-site-brand img,
.yoooov-site-nav .logo img,
.yoooov-site-nav .brand img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain !important;
}

.yoooov-site-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
}

.yoooov-site-nav .nav-links,
.yoooov-site-nav .nav-main,
.yoooov-site-links {
  display: flex !important;
  align-items: center !important;
  gap: 28px !important;
  /* A page's own inline stylesheet (e.g. recharge.html) may still carry a
     margin-left/margin-right:auto meant for its old bespoke nav layout;
     reset it so the gap next to the logo matches every other page. */
  margin: 0 !important;
}

.yoooov-site-nav .nav-link,
.yoooov-site-nav .nav-main > a,
.yoooov-site-links > a {
  padding: 10px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--site-nav-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.yoooov-site-nav .nav-link:hover,
.yoooov-site-nav .nav-main > a:hover,
.yoooov-site-links > a:hover,
.yoooov-site-nav .nav-link.active,
.yoooov-site-nav .nav-main > a.active,
.yoooov-site-links > a.active {
  color: var(--site-nav-text) !important;
  text-decoration: none !important;
}

.yoooov-site-nav .nav-right,
.yoooov-site-nav .nav-actions,
.yoooov-site-actions {
  position: relative;
  flex: 0 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 13px !important;
}

/* Same geometric avatar used on index.html (colorful rotated shapes, hashed
   from the signed-in username via --geo-a/--geo-b/--geo-angle/data-geometry)
   so every page's avatar looks the same, not just the pages that already
   shipped this design. */
.yoooov-site-nav .avatar,
.yoooov-site-avatar-btn {
  --geo-a: #25d5ff;
  --geo-b: #8c59ff;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--geo-a) 25%, #07101c), #080a11);
  border: 1px solid color-mix(in srgb, var(--geo-a) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--geo-a) 18%, transparent);
  cursor: pointer;
}
.yoooov-site-nav .avatar::before,
.yoooov-site-nav .avatar::after,
.yoooov-site-avatar-btn::before,
.yoooov-site-avatar-btn::after { content: ""; position: absolute; transition: transform .25s ease; }
.yoooov-site-nav .avatar::before,
.yoooov-site-avatar-btn::before {
  width: 22px;
  height: 22px;
  left: 4px;
  top: 7px;
  border: 4px solid var(--geo-a);
  transform: rotate(var(--geo-angle, 18deg));
}
.yoooov-site-nav .avatar::after,
.yoooov-site-avatar-btn::after {
  width: 18px;
  height: 18px;
  right: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: var(--geo-b);
  mix-blend-mode: screen;
}
.yoooov-site-nav .avatar[data-geometry="1"]::before,
.yoooov-site-avatar-btn[data-geometry="1"]::before { border-radius: 50%; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--geo-a); border: 0; }
.yoooov-site-nav .avatar[data-geometry="1"]::after,
.yoooov-site-avatar-btn[data-geometry="1"]::after { border-radius: 2px; transform: rotate(35deg); }
.yoooov-site-nav .avatar[data-geometry="2"]::before,
.yoooov-site-avatar-btn[data-geometry="2"]::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--geo-a); border: 0; }
.yoooov-site-nav .avatar[data-geometry="2"]::after,
.yoooov-site-avatar-btn[data-geometry="2"]::after { width: 21px; height: 7px; border-radius: 8px; transform: rotate(-42deg); }
.yoooov-site-nav .avatar:hover::before,
.yoooov-site-avatar-btn:hover::before { transform: rotate(calc(var(--geo-angle, 18deg) + 18deg)) scale(1.08); }

.yoooov-site-account-panel {
  position: absolute;
  z-index: 1001;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--site-nav-border);
  border-radius: 14px;
  background: #1b1d25;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.yoooov-site-account-panel[hidden] { display: none; }

.yoooov-site-nav .yoooov-site-menu-shortcut {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--site-nav-text) !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
}
.yoooov-site-nav .yoooov-site-menu-shortcut:hover { background: rgba(255, 255, 255, .06); }

.yoooov-site-nav .yoooov-site-menu-summary {
  padding: 8px 9px 11px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--site-nav-border);
}
.yoooov-site-nav .yoooov-site-menu-summary small {
  display: block;
  margin-bottom: 4px;
  color: var(--site-nav-muted);
  font-size: 10px;
}
.yoooov-site-nav .yoooov-site-menu-summary strong {
  display: block;
  overflow: hidden;
  color: var(--site-nav-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yoooov-site-menu-divider {
  height: 1px;
  margin: 6px 2px;
  background: var(--site-nav-border);
}

.yoooov-site-nav .yoooov-site-menu-logout {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #ff7180;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.yoooov-site-nav .yoooov-site-menu-logout:hover { background: rgba(255, 78, 97, .1); }

.yoooov-site-login,
.yoooov-site-register,
.yoooov-site-language {
  box-sizing: border-box;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
}

.yoooov-site-nav [hidden] { display: none !important; }

.yoooov-site-credit-cluster {
  max-width: 210px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--site-nav-border);
  border-radius: 10px;
  background: var(--site-nav-panel);
}

.yoooov-site-nav .yoooov-site-credit-balance {
  min-width: 112px;
  height: 100%;
  padding: 0 11px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--site-nav-muted);
  font-size: 9px;
  white-space: nowrap;
}

.yoooov-site-nav .yoooov-site-credit-balance strong {
  display: inline;
  min-width: 0;
  max-width: 86px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yoooov-site-recharge {
  height: 100%;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid rgba(8, 206, 138, .28);
  border-radius: 0;
  background: rgba(8, 206, 138, .12);
  color: #57e8b6 !important;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
}

.yoooov-site-nav .my-games,
.yoooov-site-nav .icon-btn,
.yoooov-site-nav .balance,
.yoooov-site-nav .avatar,
.yoooov-site-nav .user-phone,
.yoooov-site-nav .nav-user,
.yoooov-site-nav .account-menu,
.yoooov-site-nav .back,
.yoooov-site-nav .nav-button,
.yoooov-site-nav .btn {
  flex: 0 0 auto;
}

/* The avatar already identifies the signed-in user. Keeping the adjacent
   username out of the compact header prevents it resembling a second locale. */
.yoooov-site-nav .user-phone,
.yoooov-site-nav .nav-user { display: none !important; }

.yoooov-site-nav .icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.yoooov-site-nav .avatar {
  width: 38px;
  height: 38px;
  display: inline-block !important;
}

.yoooov-site-nav .icon-btn[hidden],
.yoooov-site-nav .avatar[hidden] { display: none !important; }

.yoooov-site-nav .my-games,
.yoooov-site-nav .back,
.yoooov-site-nav .nav-button,
.yoooov-site-nav .btn {
  color: #d7d9df !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.yoooov-site-login {
  min-width: 88px;
  padding: 0 22px;
  border: 1px solid var(--site-nav-border);
  background: var(--site-nav-panel);
  color: var(--site-nav-text);
}

.yoooov-site-register {
  min-width: 140px;
  padding: 0 24px;
  border: 1px solid var(--site-nav-accent);
  background: var(--site-nav-accent);
  color: #06150f;
}

.yoooov-site-language {
  min-width: 54px;
  padding: 0 14px;
  border: 1px solid var(--site-nav-border);
  background: var(--site-nav-panel);
  color: #c9cbd2;
}

.yoooov-site-login:hover,
.yoooov-site-language:hover { border-color: #555965; color: #fff; }
.yoooov-site-register:hover { background: #20dda0; }

.yoooov-site-nav .nav-dropdown { position: relative; }
.yoooov-site-nav .nav-dropdown-menu { top: calc(100% + 14px) !important; }

.yoooov-site-context {
  color: #c8cad1 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.yoooov-site-menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--site-nav-border);
  border-radius: 10px;
  background: var(--site-nav-panel);
  cursor: pointer;
}
.yoooov-site-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--site-nav-text);
}
.yoooov-site-menu-panel { display: none; }

@media (max-width: 1050px) {
  .yoooov-site-nav { padding-inline: 22px !important; gap: 20px !important; }
  .yoooov-site-nav .nav-left,
  .yoooov-site-nav .yoooov-site-nav-left { gap: 30px !important; }
  .yoooov-site-nav .nav-links,
  .yoooov-site-nav .nav-main,
  .yoooov-site-links { gap: 22px !important; }
  .yoooov-site-nav .nav-link,
  .yoooov-site-nav .nav-main > a,
  .yoooov-site-links > a { font-size: 13px !important; }
  .yoooov-site-login { min-width: 72px; padding-inline: 16px; }
  .yoooov-site-register { min-width: 112px; padding-inline: 17px; }
}

@media (max-width: 780px) {
  .yoooov-site-nav { height:60px !important; min-height:60px !important; padding:0 14px !important; }
  .yoooov-site-nav .nav-left,
  .yoooov-site-nav .yoooov-site-nav-left { gap: 18px !important; }
  /* These have no room in a 60px-tall, ~350px-wide bar once the hamburger
     toggle also needs a spot — left unhidden, they used to push the toggle
     and language button off the right edge of the screen entirely. "My
     Games" survives as a shortcut inside the avatar dropdown (see
     network_resilience.js); Messages/Notifications get the same treatment. */
  .yoooov-site-nav .my-games,
  .yoooov-site-nav .icon-btn { display: none !important; }
  .yoooov-site-nav .nav-links,
  .yoooov-site-nav .nav-main,
  .yoooov-site-links {
    max-width: 46vw;
    overflow-x: auto;
    gap: 18px !important;
    scrollbar-width: none;
  }
  .yoooov-site-nav .nav-links::-webkit-scrollbar,
  .yoooov-site-nav .nav-main::-webkit-scrollbar,
  .yoooov-site-links::-webkit-scrollbar { display: none; }
  .yoooov-site-brand,
  .yoooov-site-nav .logo,
  .yoooov-site-nav .brand { font-size: 20px !important; }
  .yoooov-site-brand-mark,
  .yoooov-site-brand img,
  .yoooov-site-nav .logo img,
  .yoooov-site-nav .brand img { width: 30px !important; height: 30px !important; }
  .yoooov-site-login { display: none; }
  .yoooov-site-register { min-width: auto; min-height: 42px; padding-inline: 15px; font-size: 13px; }
  .yoooov-site-language { min-width: 45px; min-height: 42px; padding-inline: 10px; font-size: 13px; }
  .yoooov-site-avatar-btn { width: 34px; height: 34px; }
  .yoooov-site-credit-cluster { height:36px; }
  .yoooov-site-nav .yoooov-site-credit-balance { min-width:0; padding-inline:8px; }
  .yoooov-site-nav .yoooov-site-credit-balance { font-size:0; }
  .yoooov-site-nav .yoooov-site-credit-balance strong { font-size:11px; }
  .yoooov-site-recharge { padding-inline:10px; font-size:11px; }
  .yoooov-site-menu-toggle { display: inline-flex !important; }
  .yoooov-site-nav.yoooov-site-menu-open .yoooov-site-menu-panel {
    display: flex;
    position: absolute;
    z-index: 999;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 18px 22px;
    background: var(--site-nav-bg);
    border-bottom: 1px solid var(--site-nav-border);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .35);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .yoooov-site-menu-panel .yoooov-site-menu-links {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
  }
  .yoooov-site-menu-panel .nav-link {
    padding: 12px 6px !important;
    border-bottom: 1px solid var(--site-nav-border);
    font-size: 15px !important;
  }
  .yoooov-site-menu-panel .yoooov-site-login,
  .yoooov-site-menu-panel .yoooov-site-register {
    display: inline-flex !important;
    width: 100%;
    min-height: 46px;
  }
  .yoooov-site-menu-panel [hidden] { display: none !important; }
}

@media (max-width: 560px) {
  .yoooov-site-nav .nav-links,
  .yoooov-site-nav .nav-main,
  .yoooov-site-links { display: none !important; }
  .yoooov-site-register { display: none; }
}
