/* 全局样式文件 - main.css */

/* 自定义动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 平滑过渡 */
* {
  transition: all 0.3s ease;
}

/* 悬停效果 */
.hover-scale:hover {
  transform: scale(1.05);
}

/* 图片加载动画 */
img {
  animation: fadeIn 0.8s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 响应式布局辅助类 */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 文字阴影效果 */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* 导航栏固定样式 */
.nav-fixed {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
}

/* 模态框样式 */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式断点 */
@media (max-width: 768px) {
  .container-custom {
    padding: 0 15px;
  }
  
  .text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 480px) {
  .container-custom {
    padding: 0 10px;
  }
  
  .card-hover:hover {
    transform: none;
    box-shadow: none;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #2d2d2d;
  }
  
  ::-webkit-scrollbar-thumb {
    background: #555;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #777;
  }
}