.lls-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.lls-button {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a1a1a, #2c2c2c);
  color: #fff;
  border: 2px solid #d4af37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lls-button:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.9);
  transform: scale(1.05);
}

.lls-button .lls-current-flag {
  width: 35px;
  height: 25px;
  border-radius: 3px;
  object-fit: cover;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lls-button:hover .lls-current-flag {
  transform: scale(1.1);
}

.lls-button-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lls-button:hover .lls-button-glow {
  opacity: 1;
}

.lls-panel {
  position: absolute;
  bottom: 85px;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 15px;
  padding: 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #d4af37;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.lls-panel.lls-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lls-panel-header {
  background: linear-gradient(135deg, #d4af37 0%, #f7ef8a 100%);
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.lls-panel-header span {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lls-option {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e0e0e0;
  text-decoration: none;
  padding: 12px 15px;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.lls-option:last-child {
  border-bottom: none;
}

.lls-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(to bottom, #d4af37, #f7ef8a);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.lls-option:hover {
  background: rgba(212, 175, 55, 0.1);
  color: #f7ef8a;
  padding-left: 20px;
}

.lls-option:hover::before {
  transform: translateX(0);
}

.lls-option.lls-active {
  background: rgba(212, 175, 55, 0.2);
  color: #f7ef8a;
  padding-left: 20px;
  border-left: 3px solid #d4af37;
}

.lls-option.lls-active::before {
  transform: translateX(0);
  background: linear-gradient(to bottom, #d4af37, #ffeb3b);
}

.lls-option.lls-active::after {
  content: '✓';
  position: absolute;
  right: 15px;
  color: #d4af37;
  font-weight: bold;
  font-size: 16px;
}

.lls-option img {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lls-option:hover img,
.lls-option.lls-active img {
  transform: scale(1.2);
  border-color: #d4af37;
}

.lls-option span {
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.lls-option.lls-active span {
  font-weight: 600;
  color: #ffeb3b;
}

/* Animation for flag change */
@keyframes flagChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.lls-flag-changing {
  animation: flagChange 0.4s ease-in-out;
}

@keyframes llsSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes llsSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
}

/* RTL support for Persian */
.lls-option[data-lang="fn"] {
  direction: rtl;
}

.lls-option[data-lang="fn"] span {
  font-family: 'Tahoma', 'Arial', sans-serif;
}

.lls-option[data-lang="fn"]::after {
  right: auto;
  left: 15px;
}

@media (max-width: 600px) {
  .lls-container {
    bottom: 15px;
    right: 15px;
  }
  
  .lls-button {
    width: 60px;
    height: 60px;
  }
  
  .lls-button .lls-current-flag {
    width: 30px;
    height: 22px;
  }
  
  .lls-panel {
    bottom: 75px;
    min-width: 170px;
    right: -5px;
  }
  
  .lls-option span {
    font-size: 13px;
  }
  
  .lls-panel-header span {
    font-size: 13px;
  }
}