/* ========== 神经网络加载动画 ========== */
#loading-page.neural-loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  pointer-events: all;
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

#loading-page.neural-loading-page.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-container {
  width: 360px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.loader-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

.neural-loading-page .node {
  stroke: #2563eb;
  stroke-width: 2;
  fill: #f8fafc;
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
  transition: fill 0.3s, filter 0.3s;
}

.neural-loading-page .node.active {
  fill: url(#grad);
  filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.6));
}

.neural-loading-page .link {
  stroke: #cbd5e1;
  stroke-width: 2.5;
  transition: stroke 0.3s, filter 0.3s;
}

.neural-loading-page .link.active {
  stroke: url(#grad);
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5em;
}

.loading-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #8b5cf6, #7c3aed, #2563eb 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: titleFadeIn 1.2s 0.2s forwards, titleGradientFlow 3s 1.4s infinite;
}

.loading-subtitle {
  color: #64748b;
  font-size: 1em;
  margin-top: 0.5em;
  letter-spacing: 0.12em;
  opacity: 0;
  animation: subtitleFadeIn 1.2s 0.8s forwards;
}

/* 深色主题加载页面 */
[data-theme="dark"] #loading-page.neural-loading-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* ========== 加载动画关键帧 ========== */
@keyframes titleFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes titleGradientFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes subtitleFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 英雄区域动画 ========== */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes particleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(360deg); }
}

@keyframes titleGlow {
  0% { text-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1); }
  100% { 
    text-shadow: 
      0 2px 4px rgba(0,0,0,0.1), 
      0 8px 16px rgba(0,0,0,0.1),
      0 0 30px rgba(255,255,255,0.3);
  }
}

@keyframes underlineExpand {
  0% { width: 0; }
  100% { width: 120px; }
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0) rotate(45deg); }
  40% { transform: translateX(-50%) translateY(10px) rotate(45deg); }
  60% { transform: translateX(-50%) translateY(5px) rotate(45deg); }
}

/* ========== 合作伙伴Logo滚动动画 ========== */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ========== 品牌字母跳动动画 ========== */
@keyframes letter-jump {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-12px) scale(1.15); }
  60%  { transform: translateY(0) scale(1); }
  100% { transform: translateY(0) scale(1); }
}

/* ========== 品牌流光动画 ========== */
@keyframes brand-glow-move {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ========== 过渡和变换效果 ========== */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
  transform: translateX(-250px);
}

.fade-out {
  animation: fadeOut 0.5s ease-in-out;
  transform: translateX(-250px);
}

.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
  animation: slideInDown 0.6s ease-out;
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

.scale-in {
  animation: scaleIn 0.4s ease-out;
}

.rotate-in {
  animation: rotateIn 0.6s ease-out;
}

/* ========== 通用动画关键帧 ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideInDown {
  from { 
    opacity: 0; 
    transform: translateY(-30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.8); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes rotateIn {
  from { 
    opacity: 0; 
    transform: rotate(-180deg) scale(0.8); 
  }
  to { 
    opacity: 1; 
    transform: rotate(0deg) scale(1); 
  }
}

/* ========== 脉冲和呼吸效果 ========== */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.breathing {
  animation: breathing 3s ease-in-out infinite;
}

.glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes breathing {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes glow {
  from {
    text-shadow: 0 0 5px currentColor;
  }
  to {
    text-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
  }
}

/* ========== 悬停效果动画 ========== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-blur {
  transition: filter 0.3s ease;
}

.hover-blur:hover {
  filter: blur(2px);
}

/* ========== 加载状态动画 ========== */
.spinner {
  animation: spin 1s linear infinite;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes loadingDots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

/* ========== 响应式动画优化 ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .loading-title {
    font-size: 1.8em;
  }
  
  .loading-subtitle {
    font-size: 0.9em;
  }
  
  .loader-container {
    width: 280px;
    height: 180px;
  }
}

/* ========== 暗色主题神经网络动画覆盖 ========== */
/* 这些样式必须在文件最后以确保正确覆盖基础样式 */
[data-theme="dark"] .neural-loading-page .node {
  stroke: #3b82f6;
  fill: #1e293b;
}

[data-theme="dark"] .neural-loading-page .node.active {
  fill: url(#grad-dark);
  filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.6));
}

[data-theme="dark"] .neural-loading-page .link {
  stroke: #475569;
}

[data-theme="dark"] .neural-loading-page .link.active {
  stroke: url(#grad-dark);
  filter: drop-shadow(0 0 8px rgba(8, 145, 178, 0.5));
}

/* ========== 现代化Footer样式 ========== */
.modern-footer {
  position: relative;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 -4px 32px 0 rgba(99,102,241,0.15);
}

.footer-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.footer-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.9) 0%, 
    rgba(139, 92, 246, 0.9) 50%, 
    rgba(124, 58, 237, 0.9) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
}

.footer-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.footer-main {
  position: relative;
  z-index: 1;
}

.footer-section {
  height: 100%;
}

/* 品牌区域样式 */
.footer-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  justify-self: center;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.brand-accent {
  color: #fbbf24 !important;
}

.brand-subtitle {
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.team-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 0;
}

/* 团队统计样式 */
.team-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.stat-item {
  padding: 0.5rem;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer标题样式 */
.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #4f46e5;
  border-radius: 1px;
}

/* Footer链接样式 */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-links a:hover {
  color: #4f46e5;
  padding-left: 8px;
  transform: translateX(4px);
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: #4f46e5;
  transition: width 0.3s ease;
}

.footer-links a:hover::before {
  width: 4px;
}

/* 联系信息样式 */
.contact-info {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.contact-icon {
  color: #adb5bd;
  margin-right: 0.5rem;
  transition: color 0.3s ease;
}

.contact-link {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #4f46e5;
}

.contact-item:hover .contact-icon {
  color: #4f46e5;
}

.contact-text {
  color: #ffffff;
}

/* 社交媒体链接样式 */
.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: #adb5bd;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(79, 70, 229, 0.2);
  color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* 合作伙伴区域样式 */
.partners-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.partners-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
  position: relative;
}

.partners-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: #4f46e5;
  border-radius: 1px;
}

.partner-logos-container {
  overflow: hidden;
  mask: linear-gradient(
    90deg,
    transparent,
    white 20%,
    white 80%,
    transparent
  );
}

.partner-logos-slider {
  display: flex;
  animation: scroll-left 20s linear infinite;
  width: fit-content;
}

.partner-logo {
  flex: 0 0 auto;
  margin: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}

.partner-logo img {
  max-height: 40px;
  max-width: 120px;
  opacity: 0.85;
  transition: all 0.3s ease;
  filter: grayscale(30%) brightness(1.1);
}

.partner-logo:hover img {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

/* 友情链接样式 */
.friendly-links {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.links-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.friendly-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.friendly-link:hover {
  color: #4f46e5;
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* 动画关键帧 */
@keyframes gridFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* 浅色主题适配 */
[data-theme="light"] .modern-footer {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 -4px 32px 0 rgba(99,102,241,0.15);
}

[data-theme="light"] .footer-gradient {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.9) 0%, 
    rgba(139, 92, 246, 0.9) 50%, 
    rgba(124, 58, 237, 0.9) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
}

[data-theme="light"] .footer-grid-pattern {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .footer-title,
[data-theme="light"] .partners-title,
[data-theme="light"] .links-title,
[data-theme="light"] .brand-title {
  color: #ffffff;
}

[data-theme="light"] .footer-links a,
[data-theme="light"] .contact-link,
[data-theme="light"] .friendly-link,
[data-theme="light"] .team-description {
  color: #ffffff;
}

[data-theme="light"] .footer-links a:hover,
[data-theme="light"] .contact-link:hover,
[data-theme="light"] .friendly-link:hover {
  color: #4f46e5;
}

[data-theme="light"] .brand-subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-icon {
  color: #adb5bd;
}

[data-theme="light"] .contact-text {
  color: #ffffff;
}

[data-theme="light"] .stat-number {
  color: #4f46e5;
}

[data-theme="light"] .stat-label {
  color: #adb5bd;
}

[data-theme="light"] .social-link {
  background: rgba(255, 255, 255, 0.1);
  color: #adb5bd;
}

[data-theme="light"] .social-link:hover {
  background: rgba(79, 70, 229, 0.2);
  color: #4f46e5;
}

[data-theme="light"] .friendly-link {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

[data-theme="light"] .friendly-link:hover {
  color: #4f46e5;
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .footer-brand,
[data-theme="light"] .team-stats,
[data-theme="light"] .contact-info,
[data-theme="light"] .partners-section,
[data-theme="light"] .friendly-links {
  border-color: rgba(255, 255, 255, 0.1);
}

/* 深色主题适配 */
[data-theme="dark"] .modern-footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 -4px 32px 0 rgba(30, 41, 59, 0.3);
}

[data-theme="dark"] .footer-gradient {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(51, 65, 85, 0.95) 50%, 
    rgba(71, 85, 105, 0.95) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
}

[data-theme="dark"] .footer-grid-pattern {
  background-image: 
    linear-gradient(rgba(241, 245, 249, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 245, 249, 0.02) 1px, transparent 1px);
}

[data-theme="dark"] .footer-title,
[data-theme="dark"] .partners-title,
[data-theme="dark"] .links-title,
[data-theme="dark"] .brand-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .footer-links a,
[data-theme="dark"] .contact-link,
[data-theme="dark"] .friendly-link,
[data-theme="dark"] .team-description {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .contact-link:hover,
[data-theme="dark"] .friendly-link:hover {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .brand-subtitle {
  color: rgba(203, 213, 225, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .contact-icon {
  color: #94a3b8 !important;
}

[data-theme="dark"] .contact-text {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .stat-number {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .stat-label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .social-link {
  background: rgba(241, 245, 249, 0.1) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .social-link:hover {
  background: rgba(241, 245, 249, 0.2) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .friendly-link {
  border-color: rgba(203, 213, 225, 0.2) !important;
  background: rgba(203, 213, 225, 0.05) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .friendly-link:hover {
  color: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  background: rgba(226, 232, 240, 0.1) !important;
}

[data-theme="dark"] .footer-brand,
[data-theme="dark"] .team-stats,
[data-theme="dark"] .contact-info,
[data-theme="dark"] .partners-section,
[data-theme="dark"] .friendly-links {
  border-color: rgba(203, 213, 225, 0.1) !important;
}

/* ========== Footer版权信息样式 ========== */
.footer-copyright {
  padding: 1rem 0;
}

.footer-copyright p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.copyright-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright-link:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

/* 深色主题版权信息 */
[data-theme="dark"] .footer-copyright p {
  color: rgba(203, 213, 225, 0.7);
}

[data-theme="dark"] .copyright-link {
  color: rgba(203, 213, 225, 0.8);
}

[data-theme="dark"] .copyright-link:hover {
  color: rgba(226, 232, 240, 1);
}

/* 浅色主题版权信息 */
[data-theme="light"] .footer-copyright p {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .copyright-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .copyright-link:hover {
  color: rgba(255, 255, 255, 1) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .brand-title {
    font-size: 1.5rem;
  }
  
  .team-stats .row {
    text-align: center;
  }
  
  .links-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .partner-logo {
    margin: 0 1rem;
  }
}