.ts-language-switcher {
  position: relative;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
}

.ts-language-switcher::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 14px;
}

.ts-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.ts-language-trigger:hover {
  color: #F65F00;
  transform: translateY(-1px);
  background: rgba(246, 95, 0, 0.08);
}

.ts-language-trigger i {
  font-size: 0.72rem;
  color: #f65f00;
}

.ts-lang-flag {
  display: block;
  width: 22px;
  min-width: 22px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 22px;
  border-radius: 3px;
  object-fit: cover;
  object-position: center;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.ts-language-trigger .ts-lang-flag,
.ts-lang-menu-option .ts-lang-flag {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
}

.ts-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 174px;
  padding: 6px;
  border: 1px solid rgba(246, 95, 0, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(20, 27, 40, 0.76), rgba(7, 11, 20, 0.68)),
    rgba(8, 13, 23, 0.7);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.ts-language-switcher:hover .ts-language-menu,
.ts-language-switcher:focus-within .ts-language-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ts-lang-menu-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d1d5db;
  padding: 8px 9px;
  text-align: left;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ts-lang-menu-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(2px);
}

.ts-lang-menu-option.active {
  background:
    linear-gradient(90deg, rgba(246, 95, 0, 0.18), rgba(246, 95, 0, 0.035)),
    rgba(255, 255, 255, 0.035);
  color: #fff;
  box-shadow: inset 2px 0 0 rgba(246, 95, 0, 0.92);
}

.ts-language-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(246, 95, 0, 0.09), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 154, 0, 0.06), transparent 25%),
    rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.ts-i18n-hidden {
  display: none !important;
}

.ts-language-panel {
  position: relative;
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(31, 41, 55, 0.72), rgba(17, 24, 39, 0.78)),
    linear-gradient(135deg, rgba(246, 95, 0, 0.06), rgba(255, 154, 0, 0.025));
  padding: 34px 42px 32px;
  text-align: center;
  box-shadow:
    0 28px 95px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  animation: tsLangPanelIn 0.34s cubic-bezier(.2,.8,.2,1) both;
}

.ts-language-panel-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  top: -160px;
  right: -110px;
  background: radial-gradient(circle, rgba(246, 95, 0, 0.16), transparent 68%);
  pointer-events: none;
}

.ts-language-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 25px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 30%, rgba(246, 95, 0, 0.08));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.ts-language-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin: 0 auto 14px;
  padding: 0 13px;
  border: 1px solid rgba(246, 95, 0, 0.22);
  border-radius: 999px;
  background: rgba(246, 95, 0, 0.08);
  color: #ff9a00;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ts-language-panel h2 {
  position: relative;
  margin: 0 0 11px;
  font-size: clamp(1.62rem, 3vw, 2.12rem);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  letter-spacing: 0;
}

.ts-language-panel p {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 28px !important;
  min-height: 32px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.22);
  color: rgba(209, 213, 219, 0.72);
  font-size: 0.74rem;
  font-weight: 780;
  line-height: 1;
  letter-spacing: 0.08em;
}

.ts-language-panel p span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(246, 95, 0, 0.75);
}

.ts-language-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 26px;
}

.ts-lang-card {
  min-height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.46);
  color: #fff;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
  padding: 18px 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ts-lang-card:hover,
.ts-lang-card.selected {
  transform: translateY(-3px);
  border-color: rgba(246, 95, 0, 0.42);
  background: rgba(246, 95, 0, 0.07);
  box-shadow:
    0 15px 34px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(246, 95, 0, 0.08);
}

.ts-lang-card-flag {
  width: 74px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 22px rgba(0, 0, 0, 0.2);
}

.ts-lang-card strong {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.ts-lang-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ts-lang-card small {
  color: rgba(156, 163, 175, 0.82);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
}

.ts-language-confirm {
  position: relative;
  width: min(300px, 100%);
  height: 46px;
  border: 1px solid rgba(246, 95, 0, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(246, 95, 0, 0.15), rgba(255, 154, 0, 0.12)),
    rgba(255, 255, 255, 0.035);
  color: #fff;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(246, 95, 0, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ts-language-confirm:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 95, 0, 0.62);
  background:
    linear-gradient(135deg, rgba(246, 95, 0, 0.24), rgba(255, 154, 0, 0.18)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 16px 36px rgba(246, 95, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ts-language-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ts-language-particle {
  position: absolute;
  bottom: -20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(246, 95, 0, 0.62);
  box-shadow: 0 0 12px rgba(246, 95, 0, 0.45);
  animation: tsLanguageParticleFloat 9s linear infinite;
}

.ts-language-particle:nth-child(1) { left: 6%; animation-delay: 0s; }
.ts-language-particle:nth-child(2) { left: 14%; animation-delay: .45s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(3) { left: 22%; animation-delay: .95s; }
.ts-language-particle:nth-child(4) { left: 31%; animation-delay: 1.35s; width: 5px; height: 5px; }
.ts-language-particle:nth-child(5) { left: 39%; animation-delay: 1.85s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(6) { left: 46%; animation-delay: 2.25s; }
.ts-language-particle:nth-child(7) { left: 53%; animation-delay: 2.75s; width: 5px; height: 5px; }
.ts-language-particle:nth-child(8) { left: 61%; animation-delay: 3.15s; }
.ts-language-particle:nth-child(9) { left: 68%; animation-delay: 3.65s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(10) { left: 76%; animation-delay: 4.05s; }
.ts-language-particle:nth-child(11) { left: 84%; animation-delay: 4.55s; width: 5px; height: 5px; }
.ts-language-particle:nth-child(12) { left: 92%; animation-delay: 5s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(13) { left: 10%; animation-delay: 5.45s; }
.ts-language-particle:nth-child(14) { left: 28%; animation-delay: 5.95s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(15) { left: 48%; animation-delay: 6.35s; }
.ts-language-particle:nth-child(16) { left: 67%; animation-delay: 6.8s; width: 3px; height: 3px; }
.ts-language-particle:nth-child(17) { left: 81%; animation-delay: 7.25s; }
.ts-language-particle:nth-child(18) { left: 96%; animation-delay: 7.8s; width: 5px; height: 5px; }

.ts-currency-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9ca3af;
  font-size: 0.72rem;
  margin-left: 8px;
}

.ts-language-loading {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(246, 95, 0, 0.13), transparent 28%),
    rgba(3, 7, 18, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.ts-language-loading-card {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: min(280px, 86vw);
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(17, 24, 39, 0.48), rgba(3, 7, 18, 0.38)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ts-language-spinner {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.11);
  border-top-color: #F65F00;
  border-right-color: rgba(255, 154, 0, 0.85);
  box-shadow: 0 0 28px rgba(246, 95, 0, 0.18);
  animation: tsLanguageSpin 0.8s linear infinite;
}

.ts-language-loading-text {
  margin: 0;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ts-language-loading .ts-language-particles {
  opacity: 0.9;
}

@keyframes tsLangPanelIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tsLanguageParticleFloat {
  0% {
    transform: translateY(0) translateX(0) scale(0.65);
    opacity: 0;
  }
  12% { opacity: 0.7; }
  70% { opacity: 0.42; }
  100% {
    transform: translateY(-108vh) translateX(24px) scale(1.05);
    opacity: 0;
  }
}

@keyframes tsLanguageSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-language-particle,
  .ts-language-spinner,
  .ts-language-panel {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .ts-language-switcher-mobile {
    display: inline-flex;
    margin: 0 0 0.5rem;
    align-self: flex-start;
  }

  .ts-language-trigger {
    width: 34px;
    min-width: 34px;
    height: 30px;
  }

  .ts-language-panel {
    padding: 26px 18px 22px;
    border-radius: 20px;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
  }

  .ts-language-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ts-lang-card {
    min-height: 114px;
    flex-direction: column;
    justify-content: center;
    padding: 14px;
    text-align: center;
  }

  .ts-lang-card-flag {
    width: 58px;
    height: 42px;
  }

  .ts-language-confirm {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ts-language-grid {
    grid-template-columns: 1fr;
  }

  .ts-lang-card {
    min-height: 88px;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .ts-lang-card-copy {
    justify-items: flex-start;
  }
}
