:root {
  --top-nav-height: 44px;
  --top-nav-gap: 16px;
  --top-nav-offset: calc(var(--top-nav-height) + var(--top-nav-gap));
  --contribute-tips: #6ae6c9;
  --contribute-donate: #ffb86c;
  --contribute-instruct: #7aa2ff;
}


.top-nav {
  min-height: var(--top-nav-height);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--nav-border, rgba(255, 255, 255, 0.1));
  background: var(--nav-bg, rgba(10, 14, 20, 0.9));
  box-shadow: var(--nav-shadow, 0 14px 30px rgba(3, 8, 18, 0.35));
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
  row-gap: 10px;
}

.top-nav--main {
  flex: 1 1 auto;
  z-index:1;
}

.top-nav--mini {
  flex: 0 0 auto;
  padding: 0 12px;
  height: calc(var(--top-nav-height) - 8px);
  align-self: center;
  gap: 8px;
  margin-left: auto;
}

.top-nav-shell.is-stacked {
  flex-direction: column;
  align-items: stretch;
}

.top-nav-shell.is-stacked .top-nav--mini {
  width: 100%;
  justify-content: center;
  margin-left: 0;
  height: auto;
  padding: 8px 14px;
}

.top-nav-shell.is-stacked .top-nav-left,
.top-nav-shell.is-stacked .top-nav-right {
  width: 100%;
  justify-content: center;
}

.top-nav--mini .top-nav-btn {
  padding: 6px 10px;
  font-size: 10px;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 420px;
}

.top-nav-logo {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
}

.top-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.top-nav-link:hover {
  color: var(--text);
  border-color: var(--nav-hover-border, rgba(106, 230, 201, 0.45));
  box-shadow: var(--nav-hover-shadow, 0 8px 16px rgba(106, 230, 201, 0.12));
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
}

.top-nav-dropdown-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--nav-wallet-border, rgba(106, 230, 201, 0.35));
  background: var(--nav-wallet-bg, rgba(106, 230, 201, 0.12));
  font-size: 12px;
  color: var(--text);
}

.top-nav-dropdown {
  position: relative;
}

.top-nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.top-nav-dropdown summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.top-nav-dropdown:hover summary::after,
.top-nav-dropdown[open] summary::after {
  transform: translateY(-1px);
  color: var(--text);
}

.top-nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--nav-dropdown-border, rgba(255, 255, 255, 0.12));
  background: var(--nav-dropdown-bg, rgba(10, 14, 20, 0.95));
  box-shadow: var(--nav-dropdown-shadow, 0 16px 30px rgba(3, 8, 18, 0.4));
  z-index: 5;
}

.top-nav-dropdown:not([open]) .top-nav-dropdown-menu {
  display: none;
}

.top-nav-dropdown:hover .top-nav-dropdown-menu {
  display: grid !important;
}

.top-nav-dropdown:hover summary {
  color: var(--text);
  border-color: var(--nav-hover-border, rgba(106, 230, 201, 0.45));
  box-shadow: var(--nav-hover-shadow, 0 8px 16px rgba(106, 230, 201, 0.12));
}

.top-nav-dropdown:hover summary + .top-nav-dropdown-menu {
  display: grid;
}

.top-nav-dropdown-link {
  text-decoration: none;
  font-size: 12px;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.top-nav-dropdown-link:hover {
  border-color: var(--nav-hover-border, rgba(106, 230, 201, 0.45));
  background: var(--nav-wallet-bg, rgba(106, 230, 201, 0.12));
}

.top-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-bright, #9af7e0));
  color: #062018;
  box-shadow: 0 10px 22px rgba(106, 230, 201, 0.3);
}

.top-nav-btn--ghost {
  border: 1px solid var(--nav-btn-ghost-border, rgba(255, 184, 108, 0.4));
  background: var(--nav-btn-ghost-bg, rgba(255, 184, 108, 0.12));
  color: var(--text);
  box-shadow: none;
}

.top-nav-btn--tip {
  background: linear-gradient(120deg, var(--contribute-tips), var(--accent-bright, #9af7e0));
  color: #062018;
  box-shadow: 0 12px 24px rgba(106, 230, 201, 0.28);
}

.top-nav-btn--donate {
  background: linear-gradient(120deg, var(--contribute-donate), var(--accent-2-bright, #ffd39a));
  color: #2f1b08;
  box-shadow: 0 12px 24px rgba(255, 184, 108, 0.3);
}

.top-nav-btn--instruct {
  background: linear-gradient(120deg, var(--contribute-instruct), #9bb8ff);
  color: #071025;
  box-shadow: 0 12px 24px rgba(122, 162, 255, 0.28);
}

.top-nav-btn--lists {
  background: linear-gradient(120deg, #9bb2c8, #c9d4e2);
  color: #0f1624;
  box-shadow: 0 12px 24px rgba(120, 140, 170, 0.28);
}

.top-nav-btn--inbox {
  background: linear-gradient(120deg, #86d6ff, #b7ebff);
  color: #052132;
  box-shadow: 0 12px 24px rgba(87, 177, 225, 0.3);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-nav-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(120deg, #ff4d4d, #c1121f);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 14px rgba(193, 18, 31, 0.4);
}

.top-nav-notification-badge[hidden] {
  display: none !important;
}

.top-nav-btn--tip:hover,
.top-nav-btn--donate:hover,
.top-nav-btn--instruct:hover,
.top-nav-btn--inbox:hover,
.top-nav-btn--lists:hover {
  transform: translateY(-1px);
}

.top-nav-btn:hover {
  transform: translateY(-1px);
}

.guest-locked {
  position: relative;
  z-index: 65000;
  opacity: 1;
  cursor: not-allowed;
  user-select: none;
  pointer-events: auto;
}

.guest-locked.top-nav-btn,
.guest-locked.tools-link,
.guest-locked.contribute-cta {
  color: #d6deea;
  border: 1px solid rgba(214, 222, 234, 0.35);
  background: linear-gradient(120deg, #5f6c7d, #7d8897);
  box-shadow: 0 8px 18px rgba(21, 28, 38, 0.28);
}

.guest-locked::after {
  content: attr(data-guest-lock);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  background: rgba(10, 14, 20, 0.96);
  color: #f2f6fb;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.2px;
  padding: 6px 8px;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  z-index: 65001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.guest-locked:hover::after,
.guest-locked:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.info-app .guest-locked::after {
  top: calc(100% + 8px);
  bottom: auto;
}

.nav-toggle {
  display: none !important;
}

@media (max-width: 1240px) {
  .top-nav-shell {
    margin: 0 auto 12px;
  }
  .top-nav {
    height: auto;
    padding: 10px 14px;
    align-items: center;
    row-gap: 10px;
  }
  .top-nav-left {
    row-gap: 8px;
    align-items: center;
  }
  .top-nav-right {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  :root {
    --top-nav-offset: calc((var(--top-nav-height) * 2) + 32px);
    --top-nav-gap: 12px;
  }
}
@media (max-width: 860px) {
  .top-nav-left,
  .top-nav-right {
    justify-content: center;
  }
  .top-nav-right {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .top-nav {
    gap: 10px;
  }
  .top-nav-left {
    justify-content: center;
  }
  .top-nav-link {
    padding: 5px 6px;
    font-size: 11px;
  }
  .top-nav-dropdown-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 1440px) {
  body.ad-mode-on .top-nav {
    height: auto;
    row-gap: 10px;
  }
  :root {
    --top-nav-offset: calc((var(--top-nav-height) * 2) + 44px);
  }
}

body {
  flex-direction: column;
  align-items: center !important;
  justify-content: flex-start;
}

.app {
  margin: 0 auto;
}
