/* 导航栏样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  background: #f5f7fa;
}

/* 容器 */
.container-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* 左侧空白 */
.left-space {
  width: 10%;
  background: #f5f7fa;
  flex-shrink: 0;
}

/* 侧边栏 */
.sidebar {
  width: 15%;
  min-width: 180px;
  background: #667eea;
  color: white;
  position: relative;
  box-shadow: 0.125em 0 0.625em rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.875em 1.25em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h2 {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  word-wrap: break-word;
}

/* 导航菜单 */
.nav-menu {
  list-style: none;
  padding: 1.25em 0;
}

.nav-item {
  margin: 0.3125em 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.9375em 1.25em;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active .nav-link {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
}

.nav-item.active .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.25em;
  background: white;
}

.nav-icon {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin-right: 0.9375em;
  min-width: 1.5em;
}

.nav-text {
  font-size: clamp(0.875rem, 1.2vw, 1.125rem);
}

/* 主内容区域 */
.main-content {
  width: 65%;
  padding: 0;
  overflow-y: auto;
  flex-shrink: 0;
}

/* 右侧空白 */
.right-space {
  width: 10%;
  background: #f5f7fa;
  flex-shrink: 0;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .left-space,
  .right-space {
    display: none;
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 200px;
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    width: 100%;
    margin-left: 0;
  }
  
  /* 添加汉堡菜单按钮 */
  .menu-toggle {
    display: block;
    position: fixed;
    top: 1.25em;
    left: 1.25em;
    z-index: 1001;
    background: #667eea;
    color: white;
    border: none;
    padding: 0.625em 0.9375em;
    border-radius: 0.3125em;
    cursor: pointer;
    font-size: 1.25rem;
  }
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }
}
