.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: 1rem;
  padding: 0.32rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.68);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 30;
}

.lang-switch-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 244, 221, 0.72);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: rgba(255, 244, 221, 0.7);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  min-height: 2rem;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.46rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff4dd;
  outline: none;
}

.lang-switch button.active {
  background: #fff4dd;
  color: #111;
}

.lang-switch button[aria-pressed="true"] {
  background: #fff4dd;
  color: #111;
}

.lang-switch .lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.1rem;
  padding: 0 0.26rem;
  border: 1px solid rgba(255, 244, 221, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lang-switch .lang-code {
  font-size: 0.68rem;
  font-weight: 700;
}

.lang-switch button[data-lang="de"] .lang-flag {
  background: linear-gradient(180deg, #111 0 33%, #b71c1c 33% 66%, #f2c037 66% 100%);
  color: #fff8df;
}

.lang-switch button[data-lang="en"] .lang-flag {
  background: linear-gradient(135deg, #0b3ea8, #d22630);
  color: #fff8df;
}

.lang-switch button[data-lang="pl"] .lang-flag {
  background: linear-gradient(180deg, #fffdf9 0 50%, #d91f32 50% 100%);
  color: #111;
}

.lang-switch button[aria-pressed="true"] .lang-flag,
.lang-switch button.active .lang-flag {
  border-color: rgba(17, 17, 17, 0.18);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.04);
}

.site-header .lang-switch,
.pg-header .lang-switch,
.hw-header .lang-switch,
.topbar .lang-switch,
.retro-legal header .lang-switch {
  flex-shrink: 0;
}

.pg-header .lang-switch,
.hw-header .lang-switch,
.topbar .lang-switch,
.retro-legal header .lang-switch {
  margin-right: 0.75rem;
}

@media (max-width: 900px) {
  .lang-switch {
    gap: 0.2rem;
    margin-left: 0.6rem;
    padding: 0.26rem 0.3rem;
  }

  .lang-switch-label {
    width: 100%;
    margin-bottom: 0.08rem;
  }

  .lang-switch button {
    font-size: 0.66rem;
    padding: 0.24rem 0.38rem;
  }

  .lang-switch .lang-flag {
    min-width: 1.34rem;
    height: 1rem;
  }
}
