/* ===== 基础变量与设置 ===== */
:root {
  --primary-color: #1d1d1f;
  --secondary-color: #6e6e73;
  --accent-color: #2563EB;
  --overlay-color: rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: var(--primary-color);
  margin: 0;
  padding: 0;
}

/* ===== 导航栏样式 ===== */
header {
  transition: all 0.3s ease;
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== Hero区域样式 ===== */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
  position: relative;
  background-color: white;
}

/* Hero 背景轮换动画 */
@keyframes fadeBackground {
  0% {
    background-image: url('../images/bg1.png');
  }
  50% ,100%{
    background-image: url('../images/bg2.png');
  }
}

#home {
  animation: fadeBackground 9s 2 ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== 测试区域样式 ===== */
#testing {
  min-height: 700;
  padding: 5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 6s ease;
}

.content {
  position: relative;
  z-index: 2;
}

#testing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: testingBackground 20s 2 ease-in-out;
  background-size: cover;
  background-position: center;
  z-index: -1; /* 确保背景在内容下方 */
}

/* ===== 课程卡片样式 ===== */
.course-card {
  padding: 2rem;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.course-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  #testing .content {
    margin-top: 10rem;
  }
  
  .course-card {
    padding: 1.5rem;
  }
}

/* ===== 按钮样式 ===== */
.btn {
  display: inline-block;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
  background-color: black;
}

.btn-outline {
  border: 1px solid #d1d5db;
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
}

.btn-outline:hover {
  border-color: var(--primary-color);
}

/* ===== 文字样式 ===== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===== 背景模糊效果 ===== */
.backdrop-blur {
  backdrop-filter: blur(12px);
}

/* ===== 工具类 ===== */
.max-w-6xl {
  max-width: 72rem;
}

.max-w-xl {
  max-width: 36rem;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}