/* hamburger.css - Elysia Style with "DockPop" Rebound & Translation Logic */

/* =========================================
   1. 汉堡按钮 (Liquid Glass Button)
   ========================================= */
.hamburger {
  position: fixed;
  left: 18px;
  top: 18px;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 10001;
  
  /* 液态玻璃背景 */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  
  /* 柔和光晕阴影 */
  box-shadow: 
    0 8px 24px rgba(150, 110, 240, 0.15), 
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, opacity;
}

/* 悬停状态 */
.hamburger:hover {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 12px 32px rgba(156, 107, 255, 0.3),
    inset 0 0 10px rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

/* 点击状态 */
.hamburger:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.5);
}

/* 自动隐藏 */
.hamburger.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* 内部线条 */
.hb-line {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 4px;
  background: linear-gradient(90deg, #b388ff, #9c6bff, #b388ff);
  background-size: 200% auto;
  animation: glowFlow 3s linear infinite;
  transition: width 0.3s ease;
}

/* =========================================
   2. 下拉菜单 (Dropdown Menu) - 视觉同步版
   ========================================= */
.dropdown-menu {
  position: fixed;
  left: 18px;
  top: 80px;
  width: 200px;
  
  /* --- 核心修改：同步 Elysia Playlist 的液态玻璃参数 --- */
  background: rgba(255, 240, 255, 0.25);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 210, 255, 0.35);
  box-shadow: 
    0 8px 24px rgba(200, 160, 255, 0.25), 
    inset 0 1px 0 rgba(255, 255, 255, 0.2);

  border-radius: 16px;
  padding: 10px;
  list-style: none;
  margin: 0;
  z-index: 10000;

  /* 初始状态 */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform-origin: 0% 0%;
  transform: translateY(-10px) scale(0.95);
}

/* 菜单项容器 */
.dropdown-menu li {
  margin: 4px 0;
}

/* 菜单链接 - 样式同步 */
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #cdbaff; 
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 菜单项 Hover - 样式同步 */
.dropdown-menu a:hover {
  background: rgba(160, 120, 255, 0.15);
  color: #ffffff;
  transform: translateX(4px);
  text-shadow: 0 0 12px rgba(160, 120, 255, 0.6);
  box-shadow: none;
}

/* =========================================
   3. 语言切换按钮 (New Translation Styles)
   ========================================= */
.menu-divider {
  height: 1px;
  background: rgba(160, 120, 255, 0.15);
  margin: 8px 10px;
}

/* 语言按钮布局 */
.dropdown-menu a.lang-switch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 语言图标 Badge */
.lang-badge {
  font-size: 10px;
  border: 1px solid rgba(160, 120, 255, 0.4);
  color: #cdbaff;
  padding: 1px 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dropdown-menu a.lang-switch-item:hover .lang-badge {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   4. 【核弹级】隐藏 Google 翻译自带 UI
   ========================================= */

/* 隐藏 Google 插入的 iframe 横幅 */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-simple {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    position: absolute !important;
    top: -9999px !important;
}

/* 强制锁定 body 位置，防止下沉 */
body {
    top: 0px !important;
    position: static !important;
    min-height: 100% !important; 
}

/* 隐藏原来的下拉框容器 */
#google_translate_element {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 隐藏悬浮提示与高亮 */
.goog-tooltip, 
.goog-tooltip:hover,
.goog-text-highlight {
    display: none !important;
    visibility: hidden !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 移动端横幅暴力隐藏 */
body > .skiptranslate {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* =========================================
   5. 动画控制 (Animations)
   ========================================= */
.dropdown-menu.show {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  animation: menuReboundOpen 0.62s cubic-bezier(0.22, 0.9, 0.36, 1) forwards;
}

.dropdown-menu:not(.show) {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  visibility: hidden;
}

@keyframes menuReboundOpen {
  0% { 
    opacity: 0; 
    transform: translateY(-15px) scale(0.92);
    filter: brightness(0.92);
  }
  55% {
    opacity: 1;
    transform: translateY(4px) scale(1.05);
    filter: brightness(1.12);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes glowFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
