:root {
  --header-bg: rgba(20, 15, 56, .84);
  --header-border: rgba(255, 255, 255, .1);
  --header-text: #fff;
  --header-muted: #bdb3dc;
  --header-accent: #8d55ff;
  --header-accent-2: #22df4f;
}

.site-topbar {
  position: relative;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  margin: 0 0 14px;
  padding: 10px 14px;
  box-sizing: border-box;
  color: var(--header-text);
  border: 1px solid var(--header-border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 42%),
    var(--header-bg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: visible;
}

.site-topbar-left,
.home-topbar-row,
.sportsbook-topbar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.site-topbar .logo {
  min-width: 0;
  max-width: min(260px, 44vw);
  color: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-topbar .logo b {
  color: var(--header-accent-2);
}

.site-topbar-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  flex: 0 0 auto;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-area {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(0, 0, 0, .2);
  position: relative;
  overflow: visible;
}

body.logged-in .auth-actions {
  display: none;
}

body.logged-in .profile-area {
  display: flex;
}

.pill,
.profile-button,
.wallet-button {
  min-height: 44px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  gap: 8px;
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pill {
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-size: 13px;
}

.pill.primary {
  background: linear-gradient(135deg, var(--header-accent), #6c38e8);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 10px 24px rgba(112, 62, 232, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.pill:hover,
.profile-button:hover,
.wallet-button:hover {
  transform: translateY(-1px);
}

.site-topbar svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.site-topbar .fill-icon {
  fill: currentColor;
  stroke: none;
}

.profile-dropdown {
  position: relative;
  min-width: 0;
  z-index: 2;
}

.profile-dropdown.is-open {
  z-index: 1300;
}

.profile-button {
  max-width: 224px;
  min-width: 0;
  padding: 5px 10px 5px 5px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .07);
}

.avatar,
.site-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #d9ceff);
  color: #4d2ab0;
  font-size: 13px;
  font-weight: 950;
}

.profile-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.profile-copy strong,
.site-user-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.1;
}

.profile-copy span,
.site-user-tier {
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.profile-chip__chev {
  width: 17px;
  height: 17px;
  opacity: .65;
  transition: transform .18s ease;
}

.profile-dropdown.is-open .profile-chip__chev {
  transform: rotate(180deg);
}

.wallet-button {
  padding: 7px 14px 7px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, #28d866, #16a448);
  box-shadow: 0 10px 24px rgba(22, 164, 72, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
}

body.profile-menu-open .site-topbar {
  z-index: 1285;
  overflow: visible;
}

body.profile-menu-open .site-topbar-auth,
body.profile-menu-open .profile-area {
  overflow: visible;
}

.wallet-chip__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.wallet-chip__label {
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}

.wallet-chip__amount {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1301;
  min-width: 224px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(23, 16, 58, .98);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.profile-dropdown-menu[hidden] {
  display: none !important;
}

.profile-dropdown-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  color: #f6f2ff;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, .1);
}

.profile-dropdown-item.is-danger {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-radius: 0 0 10px 10px;
  color: #ff97a3;
}

.layout > header.site-topbar,
.app-shell > .layout > header.site-topbar,
.shell > header.site-topbar {
  max-width: 100%;
}

body.has-side-nav .site-topbar,
body.has-header-nav .site-topbar {
  position: sticky;
  top: 8px;
}

@media (min-width: 900px) {
  body.has-header-nav .site-topbar .logo {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
  }

  body.has-header-nav .profile-area {
    flex-shrink: 0;
  }

  body.has-header-nav .wallet-button {
    flex-shrink: 0;
  }
}

.shell.sportsbook-shell:not(.home-shell):not(.promotions-shell-wrap) {
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.home-shell > .app-shell {
  width: 100%;
  min-height: 0;
  padding: 0;
}

@media (max-width: 899px) {
  .shell.sportsbook-shell,
  .shell.stake-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 9px 10px;
    align-items: center;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-height: 0;
    padding: 10px;
    border-radius: 15px;
  }

  .site-topbar-left,
  .home-topbar-row,
  .sportsbook-topbar-start {
    display: contents;
  }

  .site-topbar .menu-button {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .site-topbar .logo {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    max-width: min(78vw, 260px) !important;
    font-size: clamp(20px, 5.6vw, 28px);
    text-align: center;
  }

  .site-topbar-auth {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .auth-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    gap: 8px;
    min-width: 0;
  }

  .pill {
    min-height: 40px;
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
    overflow: hidden;
  }

  .pill svg {
    display: none;
  }

  .profile-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px;
  }

  .profile-button {
    min-height: 42px;
    max-width: min(44vw, 164px);
    padding: 4px 8px 4px 4px;
  }

  .avatar,
  .site-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .profile-copy strong,
  .site-user-name {
    max-width: 82px;
    font-size: 12px;
  }

  .profile-copy span,
  .site-user-tier {
    font-size: 10px;
  }

  .profile-chip__chev {
    width: 15px;
    height: 15px;
  }

  .wallet-button {
    min-height: 42px;
    padding: 6px 10px;
  }

  .wallet-chip__label {
    display: none;
  }

  .wallet-chip__amount {
    font-size: 13px;
  }

  .profile-dropdown-menu {
    right: -4px;
    min-width: min(224px, calc(100vw - 28px));
  }
}

@media (max-width: 420px) {
  .site-topbar {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .site-topbar .menu-button {
    width: 40px;
    height: 40px;
  }

  .profile-copy {
    display: none;
  }

  .profile-button {
    padding: 4px;
  }

  .wallet-button {
    padding: 6px 9px;
  }

  .wallet-chip__icon {
    display: none;
  }
}

@media (max-width: 340px) {
  .pill {
    font-size: 11px;
    padding: 0 8px;
  }

  .wallet-chip__amount {
    font-size: 12px;
  }
}
