:root {
  /* 基础颜色变量 */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --text-main: #1d1d1f;
  --text-secondary: #515154;
  --accent-blue: #007aff;
  --anim-spring: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ================= 1. 汉堡按钮 (液态棱镜效果) ================= */
.hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 52px;
  height: 52px;
  border-radius: 18px; /*稍微更圆润一点*/
  
  /* 核心：多彩液态玻璃质感 */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
  backdrop-filter: blur(25px) saturate(180%); /* 提高饱和度，让背景色透过来更鲜艳 */
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  
  /* 模拟光照边缘 */
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.9); /* 顶部高光 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* 底部阴影 */
  
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.1), /* 淡淡的彩色阴影 */
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 2000;
  transition: transform 0.4s var(--anim-spring), background 0.3s;
}

.hamburger:hover {
  transform: scale(1.08) rotate(2deg); /* 增加一点点俏皮的旋转 */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 100%);
  box-shadow: 0 12px 40px rgba(0, 122, 255, 0.15); /* 蓝色晕影 */
}

/* 汉堡条样式 */
.hamburger .bar {
  width: 24px;
  height: 2px;
  background-color: #1d1d1f;
  border-radius: 2px;
  transition: all 0.4s var(--anim-spring);
  position: relative;
}

/* 激活态 (X) */
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--accent-blue); }
.hamburger.active .bar:nth-child(2) { opacity: 0; transform: translateX(10px); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--accent-blue); }


/* ================= 2. 侧边导航栏 (Side Nav) ================= */
.side-nav {
  position: fixed;
  top: 85px; 
  left: 20px;
  width: 240px;
  
  /* 液态面板 */
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
  backdrop-filter: blur(40px) saturate(200%); /* 高饱和度透视 */
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255,255,255,0.9);
  
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255,255,255,0.5);
  
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1999;
  
  /* 动画初始状态 */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px) scale(0.95);
  transform-origin: top left;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ================= 3. 链接项交互 ================= */
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 图标靠右 */
  padding: 12px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: 14px;
  transition: all 0.3s ease;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Hover 时的多彩效果 */
.nav-item:hover {
  /* 使用极淡的彩虹渐变或者单纯的蓝色高光 */
  background: linear-gradient(90deg, rgba(0, 122, 255, 0.08) 0%, rgba(255, 255, 255, 0.5) 100%);
  color: var(--accent-blue);
  padding-left: 20px; /* 动感位移 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  backdrop-filter: blur(5px);
}

/* Tracking 子菜单 (手风琴) */
.sub-nav {
  display: none;
  margin-left: 10px;
  margin-top: 5px;
  padding-left: 10px;
  border-left: 2px solid rgba(0, 122, 255, 0.15); /* 蓝色边线 */
  animation: slideDown 0.3s ease-out forwards;
}

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

.sub-nav a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s;
}

.sub-nav a:hover {
  color: var(--accent-blue);
  background: rgba(255,255,255,0.6);
  transform: translateX(4px);
}

/* 切换图标 */
.toggle-icon {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.4s var(--anim-spring);
}
.active-toggle .toggle-icon {
    transform: rotate(180deg);
    color: var(--accent-blue);
    opacity: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .side-nav {
    width: auto;
    right: 20px;
    left: 20px;
    top: 80px;
  }
}
