.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-shadow: var(--shadow);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 12px;
}
.logo-ball { color: var(--accent); }
.logo-name .em { color: var(--accent); }

.topbar-ticker {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-tag {
  background: var(--live);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-inner {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  display: inline-block;
  animation: ticker 40s linear infinite;
}
.ticker-inner b { color: var(--text); font-weight: 600; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  margin-left: 12px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  animation: blink 1.4s ease infinite;
  flex-shrink: 0;
}

.topbar-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.5px;
}

.theme-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.theme-btn:hover { background: var(--border2); color: var(--text); }

.nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  position: sticky;
  top: 50px;
  z-index: 200;
  min-height: 40px;
}
.nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s;
  user-select: none;
  flex-shrink: 0;
}
.nav-item:hover { color: var(--text2); }
.nav-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-item svg { opacity: .45; transition: opacity .15s; flex-shrink: 0; }
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }

.page { display: none; }
.page.active { display: block; }

.bottom-bar {
  position: fixed;
  bottom: 32px;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 0 14px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.bb-scroll { overflow: hidden; flex: 1; }
.bb-inner {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  display: inline-block;
  animation: ticker 44s linear infinite;
}
.bb-inner b { color: var(--text); font-weight: 600; }

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 199;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text3);
}
.site-footer a {
  color: var(--accent);
  font-weight: 600;
  transition: color .15s;
}
.site-footer a:hover { color: var(--accent-d); text-decoration: underline; }
