.topbar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 63, 126, 0.14);
  box-shadow: 0 10px 30px rgba(16, 63, 126, 0.12);
}

.lang-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-button:hover {
  transform: translateY(-1px);
}

.lang-button.is-active {
  background: var(--blue);
  color: #fff;
}

.user-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 63, 126, 0.14);
  box-shadow: 0 10px 30px rgba(16, 63, 126, 0.12);
}

.login-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 34px;
  padding: 0;
}

.login-button svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.user-email {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
}

.logout-button {
  appearance: none;
  border: 1px solid rgba(16, 63, 126, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 12px;
}

.logout-button:hover {
  background: #f7f7f7;
}

@media (max-width: 480px) {
  .topbar {
    top: 12px;
    right: 12px;
  }

  .topbar-controls {
    flex-direction: column;
    align-items: flex-end;
  }

  .user-email {
    max-width: 180px;
  }
}
