/* Language Switcher - Beautiful Modern Design */
body .language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  animation: slideInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-menu {
  position: relative;
  display: inline-block;
}

.current-language {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  color: #333;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.current-language::before {
  content: "🌐";
  font-size: 16px;
  opacity: 0.8;
}

.current-language::after {
  content: "▼";
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.language-menu:hover .current-language::after {
  transform: rotate(180deg);
}

.current-language:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 200px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.language-menu:hover .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #444 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none !important;
  outline: none !important;
}

/* Reset link styles */
.language-menu a,
.language-menu a:link,
.language-menu a:visited,
.language-menu a:hover,
.language-menu a:active {
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}

.language-option .flag {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.language-option:hover .flag {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.language-option .lang-code {
  font-weight: 700;
  font-size: 13px;
  opacity: 0.9;
}

.language-option .lang-name {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 500;
  margin-left: auto;
}

.language-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: translateX(-3px);
  transition: transform 0.3s ease;
}

.language-option:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(102, 126, 234, 0.05) 100%);
  color: #667eea;
  padding-left: 24px;
}

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

.language-option.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
}

.language-option.active::before {
  display: none;
}

.language-option.active:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b3f9f 100%);
  color: white;
  padding-left: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design for Language Switcher */
@media (max-width: 768px) {
  .language-switcher {
    top: 10px;
    right: 10px;
  }
  
  .current-language {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .language-dropdown {
    min-width: 60px;
  }
  
  .language-option {
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* Adjust for pages with different backgrounds */
.privacy-container .language-switcher .current-language,
.support-container .language-switcher .current-language {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 6px rgba(102, 126, 234, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.privacy-container .language-switcher .current-language::before,
.support-container .language-switcher .current-language::before {
  filter: brightness(1.2);
}

.privacy-container .language-switcher .current-language:hover,
.support-container .language-switcher .current-language:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b3f9f 100%);
  box-shadow: 
    0 10px 20px rgba(102, 126, 234, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Dark mode support for future use */
@media (prefers-color-scheme: dark) {
  .language-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .language-option {
    color: #e0e0e0;
  }
  
  .language-option:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 100%);
    color: #8b9cff;
  }
}