:root {
  /* 主色调 */
  --primary: #165DFF;
  --primary-hover: #0E42D2;
  
  /* 辅助色 */
  --secondary: #722ED1;
  --secondary-hover: #5E1BB6;
  
  /* 状态色 */
  --success: #00B42A;
  --warning: #FF7D00;
  --danger: #F53F3F;
  --info: #86909C;
  
  /* 中性色 */
  --dark: #1D2939;
  --dark-2: #344054;
  --dark-3: #475467;
  --dark-4: #667085;
  --light: #F9FAFB;
  --light-2: #F2F4F7;
  --light-3: #E4E7EC;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 导航栏滚动效果 */
#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .nav-link {
  color: #1D2939;
}

.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/1015-1920x1080.jpg') center/cover no-repeat;
  height: 100vh;
}

.fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.social-icon {
  transition: transform 0.3s ease, color 0.3s ease;
  position: relative;
}

/* 微信图标特殊样式 */
.social-icon-wechat {
  transform: translateX(15px);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

/* 为社交媒体图标中的i标签添加动画效果 */
.social-icon i,
.social-icon-wechat i {
  transition: transform 0.3s ease;
}

.social-icon:hover i,
.social-icon-wechat:hover i {
  transform: scale(1.2) rotate(5deg);
}

.social-icon:hover {
  transform: scale(1.2);
  color: var(--primary);
}

.social-icon:hover::after {
  content: attr(data-name);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 5px;
  padding: 2px 6px;
  background-color: var(--primary);
  color: white;
  font-size: 12px;
  border-radius: 3px;
  white-space: nowrap;
}

/* 回到顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

/* 移动端菜单切换按钮动画 */
#menu-toggle.active i {
  transform: rotate(90deg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
}

/* 移动端菜单动画效果 */
.mobile-menu {
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
}

.mobile-menu:not(.hidden) {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  max-height: 500px; /* 足够容纳菜单内容的高度 */
}

/* 优化移动端菜单动画，添加ease-out效果 */
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
}

/* 小屏幕设备下的联系方式卡片优化 */
@media (max-width: 768px) {
  .contact-item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .contact-item .w-16 {
    margin: 0 auto 1rem;
  }
  
  .contact-item .w-12 {
    margin: 0 auto 1rem;
  }
  
  /* 调整首页联系方式卡片在极小屏幕上的内边距 */
  #contact .contact-item {
    padding: 1rem;
  }
  
  /* 调整联系页面网格布局 */
  .grid.grid-cols-1.md\:grid-cols-2 {
    gap: 1.5rem;
  }
}

/* 极窄屏幕设备优化 */
@media (max-width: 480px) {
  /* 优化导航栏在极窄屏幕下的显示效果 */
  #navbar .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  #navbar .px-4 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  #navbar .py-3 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  #navbar .text-xl {
    font-size: 1.125rem;
  }
  
  .contact-item {
    padding: 1rem;
  }
  
  .contact-item .text-xl {
    font-size: 1.25rem;
  }
  
  .contact-item .text-lg {
    font-size: 1rem;
  }
  
  /* 进一步调整首页联系方式卡片 */
  #contact .contact-item {
    padding: 0.75rem;
  }
  
  /* 调整联系页面网格间距 */
  .grid.grid-cols-1.md\:grid-cols-2 {
    gap: 1rem;
  }
}



/* 联系方式显示/隐藏过渡动画 */
.contact-item .contact-content {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

.contact-item.show .contact-content {
  max-height: 100px;
  opacity: 1;
}

/* 复制按钮样式 */
.copy-btn {
  background-color: var(--light-2);
  color: var(--dark-3);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  margin-left: 8px;
  opacity: 0;
}

.contact-item.show .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background-color: var(--light-3);
  color: var(--primary);
}

.copy-btn.copied {
  background-color: var(--success);
  color: white;
}

/* 返回主页按钮样式 */
.back-button {
  background-color: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-button:hover {
  background-color: var(--primary-hover);
  transform: translateX(-3px);
  box-shadow: var(--shadow-md);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-2);
}

::-webkit-scrollbar-thumb {
  background: var(--dark-4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-3);
}

.btn-primary {
  background-color: var(--primary);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
  background-color: #0E42D2;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-secondary:hover {
  background-color: #5E1BB6;
  transform: translateY(-2px);
}