.site-controls {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.site-controls .site-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(10px);
}

.site-controls .site-btn:active {
  transform: translateY(1px);
}

.site-controls .site-btn.is-active {
  border-color: rgba(93, 95, 239, 0.45);
  box-shadow: 0 12px 30px rgba(93, 95, 239, 0.18);
}

.site-controls .site-menu-wrap {
  position: relative;
}

.site-controls .site-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: none;
}

.site-controls .site-menu.is-open {
  display: block;
}

.site-controls .site-menu-divider {
  height: 1px;
  margin: 6px 6px 8px;
  background: rgba(0, 0, 0, 0.10);
}

.site-controls .site-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px;
  gap: 10px;
}

.site-controls .site-menu-label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
}

.site-controls .site-menu button {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(15, 23, 42, 0.92);
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-controls .site-menu button:hover {
  background: rgba(93, 95, 239, 0.10);
}

.site-controls .site-menu button[aria-checked="true"] {
  background: rgba(93, 95, 239, 0.14);
}

.site-controls .site-menu button .check-icon {
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s ease;
}

.site-controls .site-menu button[aria-checked="true"] .check-icon {
  visibility: visible;
  opacity: 1;
}

.site-controls .site-menu .lang-switch {
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.90);
}

.site-controls .site-menu .lang-switch button {
  width: auto;
  padding: 7px 9px;
  font-size: 12px;
}

.site-controls .lang-switch {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(10px);
}

.site-controls .lang-switch button {
  appearance: none;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  color: rgba(15, 23, 42, 0.82);
}

.site-controls .lang-switch button.active {
  background: rgba(93, 95, 239, 0.16);
  color: rgba(15, 23, 42, 0.92);
}

[data-theme="dark"] .site-controls .site-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.78);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .site-controls .site-menu {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

[data-theme="dark"] .site-controls .site-menu-divider {
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .site-controls .site-menu-label {
  color: rgba(226, 232, 240, 0.78);
}

[data-theme="dark"] .site-controls .site-menu button {
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="dark"] .site-controls .site-menu button:hover {
  background: rgba(99, 102, 241, 0.18);
}

[data-theme="dark"] .site-controls .lang-switch {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .site-controls .lang-switch button {
  color: rgba(226, 232, 240, 0.86);
}

[data-theme="dark"] .site-controls .lang-switch button.active {
  background: rgba(99, 102, 241, 0.22);
  color: rgba(226, 232, 240, 0.96);
}

@media (max-width: 640px) {
  .site-controls {
    top: 10px;
    right: 10px;
  }
  .site-controls .site-btn,
  .site-controls .lang-switch button {
    padding: 7px 9px;
    font-size: 12px;
  }
}
