/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

header h1.title-animate {
  transform: translateY(0);
  opacity: 1;
}

header .intro {
  font-size: 1.2rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

/* Cards container */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card style */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* 卡片动画 */
.card.animate-ready {
  opacity: 0;
  transform: translateY(50px) scale(0.9);
}

.card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  font-weight: 600;
}

.card p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 50px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
  background: linear-gradient(45deg, #667eea, #764ba2);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #764ba2, #667eea);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer nav {
  margin-top: 1rem;
}

footer nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

footer nav a:hover {
  color: #fff;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #764ba2, #667eea);
}

/* 平板设备优化 */
@media (max-width: 1024px) {
  .cards-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  
  header h1 {
    font-size: 2.5rem;
  }
}

/* 移动端优化 */
@media (max-width: 768px) {
  header {
    padding: 2rem 1rem 1.5rem;
  }
  
  header h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  header .intro {
    font-size: 1rem;
    line-height: 1.5;
  }

  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 15px;
  }

  .card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .card p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
  header {
    padding: 1.5rem 0.5rem 1rem;
  }
  
  header h1 {
    font-size: 1.8rem;
  }

  .cards-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }

  .card {
    padding: 1.2rem;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 1.1rem;
  }

  .card p {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* 超小屏设备 */
@media (max-width: 360px) {
  header h1 {
    font-size: 1.6rem;
  }
  
  .card {
    padding: 1rem;
  }

  .card h2 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
  }

  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}