/* 大二JS课程-时间胶囊项目 - 首页样式 */
/* 创建日期：2024年12月 */

/* 页面标题样式 */
.page-title {
  position: fixed;
  top: 80px;
  left: 2rem;
  font-size: 1.2rem;
  color: var(--accent-color);
  z-index: 100;
  font-weight: 600;
}

/* 英雄区域 */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* 倒计时容器 */
.countdown-container {
  margin: 3rem 0;
}

.countdown-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  display: inline-block;
  min-width: 300px;
}

.countdown-card h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.countdown-number {
  font-size: 4rem;
  font-weight: bold;
  color: var(--accent-color);
  margin: 0.5rem 0;
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

.countdown-card p {
  color: var(--text-secondary);
}

/* 英雄按钮 */
.hero-btn {
  font-size: 1.2rem;
  padding: 15px 30px;
  margin-top: 2rem;
  background: var(--primary-gradient);
  border: none;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* 功能介绍区域 */
.features-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 星星背景画布 */
#starCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-title {
    left: 1rem;
    font-size: 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .countdown-card {
    min-width: 250px;
    padding: 1.5rem;
  }

  .countdown-number {
    font-size: 3rem;
  }

  .hero-btn {
    font-size: 1rem;
    padding: 12px 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .countdown-card {
    min-width: 200px;
    padding: 1rem;
  }

  .countdown-number {
    font-size: 2.5rem;
  }

  .feature-card {
    padding: 1rem;
  }
}

/* 动画效果 */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 204, 0, 0.8);
  }
}

.countdown-number {
  animation: glow 2s ease-in-out infinite;
}

.feature-card:nth-child(odd) {
  animation: float 6s ease-in-out infinite;
}

.feature-card:nth-child(even) {
  animation: float 6s ease-in-out infinite reverse;
}