/* ========================================
   科技金融项目平台 - 设计系统 CSS
   Style: Refined Tech Luxury
   ======================================== */

/* ========== 资源加载优化 ========== */
img[loading="lazy"] {
  transition: opacity 0.3s ease;
}
img[loading="lazy"][data-loaded] {
  opacity: 1;
}

:root {
  /* ========== 颜色系统 ========== */
  --primary-blue: #0052FF;
  --primary-cyan: #00D4FF;
  --primary-gradient: linear-gradient(135deg, #0052FF 0%, #00D4FF 100%);
  
  --bg-dark-start: #0A0F1C;
  --bg-dark-end: #111827;
  --bg-gradient: linear-gradient(180deg, #0A0F1C 0%, #111827 100%);
  
  /* 分层背景系统 */
  --bg-base: #0A0F1C;
  --bg-elevated: #0F1623;
  --bg-card: rgba(26, 34, 53, 0.85);
  --bg-card-hover: rgba(32, 42, 68, 0.9);
  --bg-glass: rgba(26, 34, 53, 0.6);
  
  --card-bg: rgba(26, 34, 53, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(0, 82, 255, 0.3);
  --card-glow: rgba(0, 82, 255, 0.15);
  
  /* 文字系统 - 优化对比度 */
  --text-primary: #FFFFFF;
  --text-secondary: #B8C5D6;
  --text-tertiary: #8A98B0;
  --text-muted: #6B7A8F;
  
  /* 强调色 */
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-purple: #8B5CF6;
  --accent-green: #10B981;
  --accent-orange: #F59E0B;
  
  --success: #00E6B0;
  --warning: #FFB347;
  --error: #FF4D4F;
  
  /* 阴影系统 - 增加弥散阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* 卡片悬浮阴影 - 蓝色弥散光晕 */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 82, 255, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(0, 82, 255, 0.15);
  --shadow-glow: 0 0 30px var(--card-glow);
  --shadow-glow-hover: 0 0 50px rgba(0, 82, 255, 0.25);
  
  /* 内发光效果 */
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --inner-glow-blue: inset 0 0 20px rgba(0, 82, 255, 0.1);
  
  /* 背景纹理 */
  --bg-grid-pattern: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  --bg-dot-pattern: radial-gradient(circle, rgba(255, 255, 255, 0.02) 1px, transparent 0);

  /* 深色默认值（浅色在 :root[data-theme="light"] 中覆盖） */
  --bg-muted: rgba(255, 255, 255, 0.03);
  --bg-muted-hover: rgba(255, 255, 255, 0.08);
  --bg-muted-strong: rgba(255, 255, 255, 0.04);
  --bg-muted-active: rgba(255, 255, 255, 0.1);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-ripple: rgba(255, 255, 255, 0.4);
  --bg-nav: rgba(10, 15, 28, 0.8);
  --bg-footer: rgba(10, 15, 28, 0.8);
  
  /* 徽章/标签背景 (overlay on images) */
  --badge-bg: rgba(0, 0, 0, 0.7);
  --badge-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  
  /* Stats 卡片容器背景 */
  --stats-bg: linear-gradient(135deg, rgba(26, 34, 53, 0.6) 0%, rgba(26, 34, 53, 0.4) 100%);
  
  /* ========== 字体系统 ========== */
  --font-sans-cn: 'HarmonyOS Sans', 'PingFang SC', '思源黑体', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans-en: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
  
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  --font-size-4xl: 64px;
  --font-size-5xl: 80px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* ========== 间距系统 ========== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  
  /* ========== 圆角系统 ========== */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* ========== 动效系统 ========== */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== 全局重置 ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] {
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

body {
  font-family: var(--font-sans-cn);
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 背景效果 ========== */
.bg-main {
  background: var(--bg-gradient);
  min-height: 100vh;
  position: relative;
}

.bg-main::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(0, 82, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ========== 排版系统 ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== 按钮系统 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 82, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 82, 255, 0.4), 0 0 20px rgba(0, 82, 255, 0.3);
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-muted-active);
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.btn-delete {
  color: var(--error) !important;
}
.btn-delete:hover {
  color: #ff6b6b !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
}

/* ========== 卡片系统 ========== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  backdrop-filter: blur(20px);
  transition: all var(--transition-slow);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 82, 255, 0.3);
  box-shadow: var(--shadow-glow-hover);
}

.card-glass {
  background: var(--bg-muted);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(30px);
}

/* ========== 输入框系统 ========== */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

select.input option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.filter-select {
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
}

.filter-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.filter-select:focus {
  border-color: var(--primary-blue);
}

/* 通用 select 暗色样式（兜底） */
select {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: var(--bg-muted);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

.input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--font-size-lg);
}

/* ========== 标签系统 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  background: rgba(0, 82, 255, 0.15);
  color: var(--primary-cyan);
  border: 1px solid rgba(0, 82, 255, 0.2);
}

.tag-success {
  background: rgba(0, 230, 176, 0.15);
  color: var(--success);
  border-color: rgba(0, 230, 176, 0.2);
}

.tag-warning {
  background: rgba(255, 77, 79, 0.15);
  color: var(--warning);
  border-color: rgba(255, 77, 79, 0.2);
}

/* ========== 进度条 ========== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-muted-active);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ========== 导航栏 ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu,
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary-cyan);
}

.nav-search {
  width: 300px;
  transition: width var(--transition-base);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid var(--card-border);
  transition: border-color var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-avatar:hover {
  border-color: var(--primary-blue);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-search:focus-within {
  width: 500px;
}

.search-focused {
  transform: scale(1.02);
}

/* ========== 容器 ========== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.container-narrow {
  max-width: 1280px;
}

/* ========== 网格系统 ========== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ========== 动效类 ========== */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 工具类 ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.hidden { display: none; }

/* ========== 主题切换 ========== */
:root[data-theme="light"] {
  --bg-dark-start: #F5F7FA;
  --bg-dark-end: #E8EDF2;
  --bg-gradient: linear-gradient(180deg, #F5F7FA 0%, #E8EDF2 100%);
  
  --bg-base: #FFFFFF;
  --bg-elevated: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.9);
  
  --card-bg: #FFFFFF;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-border-hover: rgba(0, 82, 255, 0.25);
  --card-glow: rgba(0, 82, 255, 0.1);
  
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-tertiary: #718096;
  --text-muted: #A0AEC0;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 40px rgba(0, 82, 255, 0.05);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 60px rgba(0, 82, 255, 0.1);
  
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --bg-grid-pattern: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.04) 1px, transparent 0);
  --bg-dot-pattern: radial-gradient(circle, rgba(0, 0, 0, 0.03) 1px, transparent 0);
  
  --bg-muted: rgba(0, 0, 0, 0.03);
  --bg-muted-hover: rgba(0, 0, 0, 0.06);
  --bg-muted-strong: rgba(0, 0, 0, 0.04);
  --bg-muted-active: rgba(0, 0, 0, 0.08);
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-ripple: rgba(0, 0, 0, 0.15);
  --bg-nav: rgba(255, 255, 255, 0.9);
  --bg-footer: rgba(245, 247, 250, 0.95);
  
  --badge-bg: rgba(255, 255, 255, 0.92);
  --badge-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --stats-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(245, 247, 250, 0.6) 100%);
}

/* Dark mode default values for alpha-based variables */
/* (light mode overrides above in :root[data-theme="light"]) */

.theme-toggle {
  position: fixed;
  top: 88px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  stroke-width: 1.5;
}

.theme-toggle .sun-icon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

:root[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* ========== 键盘导航焦点样式 ========== */
*:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.2);
}

a:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: -1px;
}

.card:focus-visible,
.project-card:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  box-shadow: var(--shadow-card-hover);
}

/* 跳过链接（无障碍访问） */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-blue);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  border-radius: 0 0 var(--radius-md) 0;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0;
}
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 48px;
    --font-size-4xl: 40px;
    --font-size-3xl: 32px;
  }
  
  .nav,
  .navbar {
    padding: 0 var(--space-4);
  }
  
  .nav-menu,
  .nav-links {
    display: none;
  }
  
  .nav-actions {
    display: none;
  }
}

/* ========== 移动端汉堡菜单 ========== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  z-index: 1001;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  background: var(--bg-card, #1e293b);
  border-left: 1px solid var(--card-border);
  z-index: 999;
  padding: var(--space-8) var(--space-6);
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
}
.mobile-menu-close:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-12);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.mobile-nav-divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: var(--space-4) 0;
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-4);
}
.mobile-nav-actions .btn {
  width: 100%;
  justify-content: center;
}

.mobile-user-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.mobile-user-item:hover {
  background: var(--bg-muted);
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }
}

/* ========== Footer - 全局样式 ========== */
.footer {
  padding: var(--space-16) 0 var(--space-8);
  background: var(--bg-footer);
  border-top: 1px solid var(--card-border);
}

.footer-content,
.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: var(--space-16);
  margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .footer-content,
  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .footer-content,
  .footer-container {
    padding: 0 var(--space-3);
  }
}

@media (max-width: 400px) {
  .footer {
    padding: var(--space-10) 0 var(--space-6);
  }
  .footer-content,
  .footer-container {
    gap: var(--space-6);
  }
}

.footer-brand .footer-desc {
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 640px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  padding: var(--space-1) 0;
  transition: color var(--transition-base);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

/* ========== 回到顶部按钮 ========== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 82, 255, 0.4);
  border: 1px solid var(--card-border);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 30px rgba(0, 82, 255, 0.5);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }
}

/* ========== 空状态 ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-8);
  text-align: center;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-6);
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  text-align: center;
}

.empty-state-icon svg {
  width: 64px;
  height: 64px;
  stroke: var(--text-tertiary);
  stroke-width: 1.5;
}

.empty-state-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.empty-state-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.empty-state-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .empty-state {
    padding: var(--space-12) var(--space-4);
  }
  
  .empty-state-icon {
    width: 96px;
    height: 96px;
  }
  
  .empty-state-icon svg {
    width: 48px;
    height: 48px;
  }
  
  .empty-state-title {
    font-size: var(--font-size-xl);
  }
}

/* ========== 骨架屏加载 ========== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 表单验证反馈 ========== */
.form-group {
  position: relative;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--transition-base);
}

.input:focus + .input-icon,
.input:focus ~ .input-icon {
  color: var(--primary-blue);
}

.input-success {
  border-color: var(--success) !important;
  background: rgba(0, 230, 176, 0.05) !important;
}

.input-error {
  border-color: var(--error) !important;
  background: rgba(255, 77, 79, 0.05) !important;
}

.validation-icon {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.validation-icon.success {
  display: flex;
  color: var(--success);
  background: rgba(0, 230, 176, 0.15);
}

.validation-icon.error {
  display: flex;
  color: var(--error);
  background: rgba(255, 77, 79, 0.15);
}

.validation-message {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--error);
}

.validation-message.show {
  display: flex;
}

.validation-message.success {
  color: var(--success);
}

.validation-message svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 字符计数器 */
.char-counter {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.error {
  color: var(--error);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: var(--space-2);
}

.skeleton-card {
  padding: var(--space-5);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.skeleton-image {
  height: 200px;
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.skeleton-stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.skeleton-stat {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-md);
}

/* ========== 按钮波纹效果 ========== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: var(--radius-full);
  background: var(--bg-ripple);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- 以下动画从页面 CSS 和 JS 中统一收归 --- */

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  60% { transform: translateY(-15px); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes zoomIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ========== 移动端优化 ========== */
@media (max-width: 768px) {
  /* 确保所有可点击元素最小 44px */
  .btn,
  button,
  a,
  .nav-link,
  .filter-btn,
  .tab-btn {
    min-height: 44px;
    min-width: 44px;
    padding: var(--space-3) var(--space-4);
  }
  
  /* 表格响应式 */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table::-webkit-scrollbar {
    height: 6px;
  }
  
  .data-table::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 3px;
  }
  
  /* 表单字段优化 */
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  input[type="text"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
}

/* 窄屏幕额外优化 */
@media (max-width: 480px) {
  :root {
    --font-size-5xl: 36px;
    --font-size-4xl: 30px;
    --font-size-3xl: 26px;
    --font-size-2xl: 22px;
    --font-size-xl: 18px;
  }
  
  .container {
    padding: 0 var(--space-3);
  }
  
  .btn {
    padding: var(--space-2) var(--space-4);
  }
}

/* 超窄屏（≤400px）额外优化 */
@media (max-width: 400px) {
  :root {
    --space-16: 48px;
    --space-20: 56px;
    --space-12: 32px;
  }

  .container {
    padding: 0 10px;
  }

  .btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
  }
}

/* 消除移动端点击延迟 */
.project-card,
.news-card,
a.btn,
button {
  touch-action: manipulation;
}

/* 触摸友好 */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover,
  .news-card:hover,
  .success-card:hover {
    transform: none;
  }
  
  .project-card:active,
  .news-card:active,
  .success-card:active {
    transform: scale(0.98);
  }
  
  .nav-link,
  .filter-btn {
    padding: var(--space-3) var(--space-4);
  }
}
