/* Language Dropdown Styles */

.language-dropdown {
  position: relative;
  z-index: 100;
  margin-left: 20px;
}

.language-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: #2f3133;
  border: 1px solid #3a3c3e;
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-width: 70px;
}

.language-btn:hover {
  background-color: #3a3c3e;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(255, 205, 0, 0.2);
}

.language-btn:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 205, 0, 0.1);
}

.language-btn .current-lang {
  color: var(--accent-color);
  font-weight: 700;
  text-shadow: 0 0 8px var(--accent-color);
}

.language-btn i {
  font-size: 10px;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.language-dropdown.open .language-btn i {
  transform: rotate(180deg);
}

.language-dropdown.open .language-btn {
  border-color: var(--accent-color);
  background-color: #3a3c3e;
}

/* Dropdown Menu */
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #2f3133;
  border: 1px solid #3a3c3e;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 1000;
}

.language-dropdown.open .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: #3a3c3e;
  padding-left: 20px;
}

.language-option.active {
  background-color: rgba(255, 205, 0, 0.1);
  color: var(--accent-color);
}

.language-option.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

.lang-code {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  min-width: 30px;
}

.language-option.active .lang-code {
  color: var(--accent-color);
  text-shadow: 0 0 8px var(--accent-color);
}

.lang-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  text-align: right;
}

/* Language notification */
#languageNotification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 18px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  z-index: 9999;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#languageNotification i {
  color: var(--blue-color);
  font-size: 16px;
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-option {
  animation: slideIn 0.2s ease-out backwards;
}

.language-option:nth-child(1) {
  animation-delay: 0.05s;
}
.language-option:nth-child(2) {
  animation-delay: 0.1s;
}
.language-option:nth-child(3) {
  animation-delay: 0.15s;
}
.language-option:nth-child(4) {
  animation-delay: 0.2s;
}
.language-option:nth-child(5) {
  animation-delay: 0.25s;
}
.language-option:nth-child(6) {
  animation-delay: 0.3s;
}

/* Responsive styles */
@media (max-width: 768px) {
  .language-dropdown {
    margin-left: 10px;
  }

  .language-btn {
    padding: 6px 10px;
    min-width: 60px;
    font-size: 13px;
  }

  .language-menu {
    min-width: 160px;
  }

  .language-option {
    padding: 10px 14px;
  }

  .lang-code {
    font-size: 12px;
  }

  .lang-name {
    font-size: 12px;
  }

  #languageNotification {
    left: 20px;
    right: 20px;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .language-dropdown {
    margin-left: 8px;
  }

  .language-btn {
    padding: 5px 8px;
    min-width: 50px;
    gap: 4px;
  }

  .language-menu {
    right: -10px;
  }
}
