:root {
  --c-border: rgba(82, 82, 89, 0.32);
  --c-text-1: rgba(255, 255, 255, 0.87);
  --c-text-2: rgba(235, 235, 245, 0.6);
  --radius: 8px;
  --transition: 0.18s ease;
  --c-brand: var(--accent);
  --c-brand-bg: var(--accent-bg);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--c-border);
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  background: rgba(27, 27, 31, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 100%;
}

.topbar a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--c-text-1);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.topbar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.topbar-right a {
  font-size: 13px;
  color: var(--c-text-2);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.topbar-right a:hover {
  color: var(--c-brand);
  border-color: var(--c-brand);
  background: var(--c-brand-bg);
}

.topbar-checkbox {
  display: none;
}

.topbar-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.topbar-icon {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  color: var(--c-text-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon-close {
  display: none;
}

@media (max-width: 680px) {
  .topbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .topbar-right {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 16px;
    border-bottom: 1px solid var(--c-border);
    background: rgba(27, 27, 31, 0.94);
    backdrop-filter: blur(12px);
    z-index: 9;
  }

  .topbar-right a {
    width: 100%;
    padding: 10px 14px;
  }

  .topbar-toggle {
    display: inline-flex;
  }

  .topbar-checkbox:checked ~ .topbar-right {
    display: flex;
  }

  .topbar-checkbox:checked + .topbar-toggle .topbar-icon-open {
    display: none;
  }

  .topbar-checkbox:checked + .topbar-toggle .topbar-icon-close {
    display: inline-flex;
  }
}

