:root {
  --primary: #165DFF;
  --primary-dark: #0E42D2;
  --primary-light: #4080FF;
  --secondary: #1D2129;
  --accent: #FF7D00;
  --accent-dark: #D96A00;
  --accent-light: #FF9A33;
  --bg-light: #F7F8FA;
  --text-primary: #1D2129;
  --text-secondary: #4E5969;
  --text-light: #86909C;
  --border: #E5E6EB;
  --success: #00B42A;
  --danger: #F53F3F;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-wrap: break-word;
  word-break: break-word;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: #FFFFFF;
  overflow-x: hidden;
}

/* ===== 导航栏标准化样式 ===== */

/* 导航栏固定高度 */
#navbar {
  height: 64px;
}

.nav-container {
  height: 64px;
}

.nav-inner {
  height: 64px;
}

/* 导航栏Logo图标统一尺寸 */
.nav-logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-icon svg {
  width: 20px;
  height: 20px;
}

/* 导航栏品牌名称统一 */
.nav-brand-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #1D2129;
  transition: color 0.3s ease;
}

.nav-brand-sub {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  margin-left: 4px;
  color: #86909C;
  transition: color 0.3s ease;
}

/* 导航链接统一 */
.nav-link {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  padding: 6px 0;
  transition: color 0.2s ease;
}

/* 导航栏按钮统一 */
.nav-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 8px;
  line-height: 1.5;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* 汉堡菜单按钮统一 */
.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #4E5969;
  transition: color 0.3s ease, background 0.2s ease;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* 移动端菜单链接统一 */
.mobile-menu a {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 8px;
  display: block;
  transition: all 0.2s ease;
}

/* ===== 文字颜色自适应 ===== */

/* 透明背景（深色Hero区）- 白色文字 */
.nav-on-dark .nav-brand-name {
  color: #FFFFFF;
}

.nav-on-dark .nav-brand-sub {
  color: rgba(255, 255, 255, 0.65);
}

.nav-on-dark .nav-link {
  color: rgba(255, 255, 255, 0.75);
}

.nav-on-dark .nav-link:hover {
  color: #FFFFFF;
}

.nav-on-dark .nav-link.active {
  color: #FFFFFF;
  font-weight: 600;
}

.nav-on-dark .mobile-menu-btn {
  color: #FFFFFF;
}

.nav-on-dark .mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 白色/浅色背景 - 深色文字 */
.nav-on-light .nav-brand-name {
  color: #1D2129;
}

.nav-on-light .nav-brand-sub {
  color: #86909C;
}

.nav-on-light .nav-link {
  color: #4E5969;
}

.nav-on-light .nav-link:hover {
  color: #165DFF;
}

.nav-on-light .nav-link.active {
  color: #165DFF;
  font-weight: 600;
}

.nav-on-light .mobile-menu-btn {
  color: #4E5969;
}

.nav-on-light .mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* 滚动后统一为白色背景+深色文字 */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
}

.nav-scrolled .nav-brand-name {
  color: #1D2129 !important;
}

.nav-scrolled .nav-brand-sub {
  color: #86909C !important;
}

.nav-scrolled .nav-link {
  color: #4E5969 !important;
}

.nav-scrolled .nav-link:hover {
  color: #165DFF !important;
}

.nav-scrolled .nav-link.active {
  color: #165DFF !important;
  font-weight: 600 !important;
}

.nav-scrolled .mobile-menu-btn {
  color: #4E5969 !important;
}

.nav-scrolled .mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

/* ===== 响应式适配 ===== */
@media (max-width: 1024px) {
  #navbar {
    height: 56px;
  }

  .nav-container,
  .nav-inner {
    height: 56px;
  }
}

@media (max-width: 640px) {
  #navbar {
    height: 52px;
  }

  .nav-container,
  .nav-inner {
    height: 52px;
  }

  .nav-brand-name {
    font-size: 15px;
  }

  .nav-brand-sub {
    font-size: 11px;
  }

  .nav-logo-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
  }

  .nav-logo-icon svg {
    width: 18px;
    height: 18px;
  }
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 93, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 93, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.15), transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(22, 93, 255, 0.12);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 0 auto;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22, 93, 255, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 125, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.btn-primary:focus-visible,
.btn-accent:focus-visible,
.btn-outline:focus-visible,
.nav-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.stat-number {
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #FFFFFF, rgba(255, 255, 255, 0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 180, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0); }
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(22, 93, 255, 0.3);
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  height: auto;
}

.mobile-menu.open {
  max-height: 500px;
  height: auto;
}

.table-striped tr:nth-child(even) {
  background: var(--bg-light);
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
