/* ==========================================================
   topbar.css — shared top navigation bar
   Import this in every authenticated TV page.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; }

/* ── Top bar right buttons ───────────────────────────────── */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-right: 16px;
}

.topbar-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #ffffff;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(26,110,255,0.5);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.topbar-btn:hover {
  background: rgba(26,110,255,0.18);
  border-color: rgba(26,110,255,0.9);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.topbar-avatar {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: rgba(26,110,255,0.2);
  border: 1px solid rgba(26,110,255,0.5);
  flex-shrink: 0;
}

.topbar-martian-name {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 12px;
  color: #1a6eff;
  white-space: nowrap;
}

.topbar-btn .tb-value {
  color: #00e676;
}

.topbar-btn .tb-dim {
  color: #ffffff;
}

.topbar-btn.lobby-btn {
  border-color: rgba(26,110,255,0.8);
  font-weight: bold;
}

/* ── Blue separators ─────────────────────────────────────── */
.top-bar  { border-bottom: 1px solid rgba(26,110,255,0.4); }
footer    { border-top:    1px solid rgba(26,110,255,0.4); }

/* ── Static top bar (header) ─────────────────────────────── */
.top-bar {
  width: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 55px;
}

.top-bar-title {
  font-family: 'Arial Black', Arial, sans-serif;
  color: #ff6a00;
  font-size: 16px;
  margin-left: 12px;
}

.top-bar img {
  height: 54px;
  width: 54px;
  object-fit: cover;
}

/* ── Static bottom bar (footer) ──────────────────────────── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

.bottom-bar {
  width: 100%;
  background: #000000;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #aaaaaa;
  text-align: center;
}

.bottom-bar .blue  { color: #1a6eff; }
.bottom-bar .white { color: #ffffff; }

.bottom-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.social-icon:hover { opacity: 1; }

.bottom-center {
  flex: 1;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #aaaaaa;
}

.bottom-right {
  display: flex;
  align-items: center;
  padding-right: 16px;
}

.docs-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  color: #ffffff;
  border: 1px solid #1a6eff;
  border-radius: 6px;
  padding: 3px 10px;
  text-decoration: none;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.docs-btn:hover { opacity: 1; }

/* ── Docs popup ── */
.docs-popup {
  display: none;
  position: fixed;
  bottom: 54px;
  right: 12px;
  background: #000;
  border: 1px solid rgba(26,110,255,0.4);
  border-radius: 8px;
  padding: 10px 0;
  z-index: 9999;
  min-width: 160px;
}
.docs-popup.open { display: block; }
.docs-popup a {
  display: block;
  padding: 8px 18px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.docs-popup a:hover { color: #1a6eff; }

/* ── Shared page layout ──────────────────────────────────── */
html, body {
  height: 100%;
  margin: 0;
  background: #000;
}

body {
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#starfield-canvas {
  position: fixed;
  top: 56px;
  left: 0;
  width: 100%;
  height: calc(100% - 56px - 45px);
  z-index: 0;
  pointer-events: none;
  background: #000;
}

/* ── Ad panels ───────────────────────────────────────────── */
.ad-panel {
  position: fixed;
  top: 101px;
  bottom: 90px;
  width: 120px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(26,110,255,0.3);
  border-radius: 8px;
  z-index: 5;
  overflow: hidden;
}

.ad-left  { left:  12px; }
.ad-right { right: 12px; }

.ad-panel .ad-label,
.ad-panel .ad-size {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: rgba(26,110,255,0.4);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.ad-panel .ad-label { top: calc(50% - 18px); }
.ad-panel .ad-size  { top: calc(50% + 4px); }

