:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #eef2ff;
  --navbar-height: 64px;
}

body {
  padding-top: var(--navbar-height);
}

/* Top navigation bar */

.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: var(--navbar-height);
  padding: 0 16px;
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.navbar-left {
  justify-self: start;
  display: flex;
  align-items: center;
  z-index: 1;
}

.navbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.navbar-center .navbar-logo {
  pointer-events: auto;
}

.navbar-right {
  justify-self: end;
  display: flex;
  align-items: center;
  z-index: 1;
}

.navbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.navbar-logo:hover,
.navbar-logo:focus-visible {
  opacity: 0.88;
}

.navbar-logo-svg {
  display: block;
  width: clamp(90px, 22vw, 80px);
  height: auto;
  color: #ffffff;
}

.hamburger {
  width: 40px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.06);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #f4f7ff;
  border-radius: 999px;
  margin: 1px 0;
}

.stats-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(14, 18, 30, 0.9);
  color: #f4f7ff;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.stats-btn:hover,
.stats-btn:focus-visible {
  transform: scale(1.02);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.stats-btn:active {
  transform: scale(0.98);
  background: rgba(59, 130, 246, 0.2);
}

.stats-btn-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.stats-btn-label {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Navigation drawer (slide-in from left) */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

.sidebar-open .sidebar {
  pointer-events: auto;
}

.sidebar a {
  text-decoration: none;
}

.sidebar-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 82vw);
  max-width: 320px;
  height: 100%;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #0d1117;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 64px rgba(0, 0, 0, 0.24);
  transform: translateX(-105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 2;
}

.sidebar-open .sidebar-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-close {
  align-self: flex-end;
  border: none;
  background: transparent;
  color: #f4f7ff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 24px;
  text-align: left;
}

.sidebar-brand-logo {
  display: block;
  width: 100px;
  height: auto;
}

.sidebar-brand-copy {
  margin: 0;
  color: #9ca3af;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.sidebar-brand-legal {
  margin: 0;
  max-width: 220px;
  color: #6b7280;
  font-size: 0.65rem;
  line-height: 1.45;
}

.sidebar-nav {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.sidebar-link {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  color: #f4f7ff;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.25s ease, transform 0.25s ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.active {
  background: rgba(139, 124, 255, 0.18);
  transform: translateX(2px);
}

/* Statistics panel */

.stats-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.stats-panel-open .stats-panel {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.stats-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.stats-panel-content {
  position: relative;
  width: min(480px, 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 16px;
  background: #1a2332;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.stats-panel-open .stats-panel-content {
  transform: translateY(0);
}

.stats-panel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.stats-panel-close:hover,
.stats-panel-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.05);
}

.stats-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.stats-panel-message {
  margin: 0;
  color: #9ca3af;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-cell-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #f4f7ff;
}

.stats-cell-label {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8b95a5;
}

.stats-panel-body .stats-panel-message {
  font-size: 0.85rem;
}

html {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html:hover {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

html:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* Site footer */

.site-footer {
  margin-top: auto;
  padding: 16px 20px 14px;
  border-top: none;
  background: #0f1419;
}

.site-footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  width: 100%;
  margin: 0;
}

.site-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 480px;
  text-align: left;
}

.site-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0 14px;
}

.site-footer-nav a {
  color: #5b6472;
  font-size: 0.7rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  color: #9ca3af;
}

.site-footer-copy {
  margin: 0;
  color: #5b6472;
  font-size: 0.7rem;
}

.site-footer-legal {
  margin: 0;
  color: #4b5563;
  font-size: 0.7rem;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .top-navbar {
    padding: 0 12px;
  }

  .stats-btn {
    padding: 0 10px;
  }

  .stats-btn-label {
    display: none;
  }

  .site-footer {
    padding: 14px 14px 12px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .site-footer-right {
    align-items: flex-end;
    margin-left: 0;
  }

  .site-footer-nav {
    justify-content: flex-end;
    gap: 8px 12px;
  }
}
