/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  color: #1a202c;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航 ===== */
.header {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(230,126,34,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
}
.header-logo img { width: 40px; height: 40px; object-fit: contain; }
.header-title {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-subtitle {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 2px;
}
.header-icon {
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 12px;
  outline: none;
  border: none;
  background: none;
  padding: 0;
}

/* ===== 导航栏 ===== */
.nav-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-container {
  display: flex;
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  height: 48px;
  align-items: center;
}
.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  color: #718096;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-item:hover {
  color: #4299e1;
  background: #f7fafc;
}
.nav-item.active {
  color: #2c5282;
  border-bottom-color: #2c5282;
  font-weight: 600;
}

/* ===== 底部footer ===== */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 11px;
  color: #a0aec0;
  line-height: 1.8;
}
.footer a { color: #4299e1; text-decoration: none; }
.footer-links { margin-bottom: 8px; }

/* ===== 悬浮侧边栏 ===== */
.floating-sidebar {
  position: fixed;
  right: 20px;
  bottom: 120px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 8px 0;
  z-index: 999;
  width: 44px;
  transition: width 0.3s ease;
  overflow: hidden;
}
.floating-sidebar:hover {
  width: 64px;
}
.floating-sidebar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  text-decoration: none;
  color: #4a5568;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 6px;
  white-space: nowrap;
}
.floating-sidebar a:hover {
  background: #ebf8ff;
  color: #3182ce;
}
.floating-sidebar a svg {
  width: 22px;
  height: 22px;
  margin-bottom: 0;
  transition: margin-bottom 0.3s ease;
}
.floating-sidebar:hover a svg {
  margin-bottom: 4px;
}
.floating-sidebar a span {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}
.floating-sidebar:hover a span {
  opacity: 1;
  max-height: 20px;
}
.floating-sidebar-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 10px;
  transition: margin 0.3s ease;
}
.floating-sidebar:hover .floating-sidebar-divider {
  margin: 4px 12px;
}
@media (max-width: 768px) {
  .floating-sidebar {
    right: 8px;
    width: 40px;
    padding: 6px 0;
    border-radius: 10px;
  }
  .floating-sidebar:hover {
    width: 52px;
  }
  .floating-sidebar a {
    padding: 8px 2px;
    margin: 1px 4px;
  }
  .floating-sidebar a svg {
    width: 20px;
    height: 20px;
  }
  .floating-sidebar a span {
    font-size: 10px;
  }
  .floating-sidebar-divider {
    margin: 3px 8px;
  }
  .floating-sidebar:hover .floating-sidebar-divider {
    margin: 3px 10px;
  }
}
