/* VS Code inspired header styles */
.vs-header {
  background-color: var(--vscode-bg);
  border-bottom: 1px solid var(--vscode-header-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  padding: 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.vs-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.vs-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: 
    repeating-linear-gradient(
      to right,
      var(--vscode-header-border) 0px,
      var(--vscode-header-border) 4px,
      transparent 4px,
      transparent 8px
    );
  opacity: 0.5;
}

.vs-nav::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--vscode-link) 0%,
    var(--vscode-link) var(--scroll-percent, 0%),
    var(--vscode-header-border) var(--scroll-percent, 0%),
    var(--vscode-header-border) 100%
  );
}

.nav-left {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-brand {
  color: var(--vscode-text);
  font-size: 1.2em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  padding: 0 15px;
  position: relative;
}

/* 添加品牌悬停效果 */
.nav-brand::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--vscode-link);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-brand:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  gap: 5px;
}

.nav-item {
  color: var(--vscode-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  position: relative;
  transition: all 0.3s ease;
  font-size: 0.9em;
  border: 1px solid transparent;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--vscode-active) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: 100% 0;
  margin: 0 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(
    to bottom,
    var(--vscode-active),
    var(--vscode-bg-light)
  );
  border-bottom: none;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: calc(100% + 2px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--vscode-link),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background-color 0.3s ease;
}

.nav-item:hover {
  background-position: 0 0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--vscode-shadow);
  background: linear-gradient(
    to bottom,
    var(--vscode-active),
    var(--vscode-bg-light)
  );
  border-color: var(--vscode-border-light);
}

.nav-item:hover::before {
  height: 100%;
  opacity: 1;
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  background-color: var(--vscode-active);
  box-shadow: 
    inset 0 0 0 1px var(--vscode-selection),
    0 2px 4px var(--vscode-shadow);
  background: var(--vscode-bg);
  border-color: var(--vscode-border-light);
  border-bottom-color: var(--vscode-bg);
}

.nav-item.active::before {
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--vscode-link),
    rgba(86, 156, 214, 0.3)
  );
  opacity: 1;
  background: var(--vscode-link);
}

.nav-item.active::after {
  background: var(--vscode-link);
}

.nav-item i {
  font-size: 1em;
  color: var(--vscode-link);
  filter: drop-shadow(0 0 2px rgba(86, 156, 214, 0.2));
  transition: all 0.3s ease;
  margin-right: 6px;
  font-size: 0.9em;
}

.nav-item span {
  position: relative;
  color: var(--vscode-text);
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

.nav-item span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(86, 156, 214, 0.5),
    transparent
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
  background: linear-gradient(
    90deg,
    var(--vscode-link),
    transparent
  );
}

.nav-item:hover span::after {
  transform: scaleX(1);
}

/* 添加底部装饰线 */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, transparent 40%,
    var(--vscode-border-light) 40%, var(--vscode-border-light) 60%,
    transparent 60%, transparent 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
  opacity: 1;
}

/* Add margin to main content to account for fixed header */
.container {
  margin-top: 60px;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .nav-item span {
    display: none;
  }
  
  .nav-item {
    padding: 6px 10px;
  }
  
  .nav-item i {
    font-size: 1.1em;
    filter: drop-shadow(0 0 3px rgba(86, 156, 214, 0.3));
    margin-right: 0;
  }
  
  .nav-right {
    gap: 2px;
  }
  
  .vs-nav::before {
    background: linear-gradient(90deg,
      var(--vscode-link) 0%, var(--vscode-link) 30%,
      transparent 30%, transparent 70%,
      var(--vscode-link) 70%, var(--vscode-link) 100%
    );
  }

  .vs-nav::after {
    width: 50%;
  }
}

/* 添加滚动阴影效果 */
.vs-header.scrolled {
  background-color: var(--vscode-bg);
  box-shadow: 
    0 1px 3px var(--vscode-header-shadow, var(--vscode-shadow)),
    0 0 0 1px var(--vscode-border-light);
}

/* 白色主题特定的 header 阴影优化 */
:root[data-theme="white"] .vs-header.scrolled {
  box-shadow: 0 1px 0 var(--vscode-border);
}
