/* ========================================
   游戏化学习小组 - 样式表
   Gamified Learning Group Styles
   ======================================== */

/* CSS 变量定义 */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-white: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

/* ========================================
   🎉 动态欢迎 Banner
   ======================================== */
.welcome-banner {
  background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #1dd1a1, #ff6b6b);
  background-size: 400% 100%;
  color: white;
  text-align: center;
  padding: 24px 20px;
  font-size: 1.6em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: shimmer 4s linear infinite;
  border-bottom: 4px solid rgba(255,255,255,0.3);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  backdrop-filter: blur(10px);
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 400% center; }
}

.welcome-banner .teacher-name {
  font-size: 1.4em;
  color: #fff9c4;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  padding: 0 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 20px;
  padding: 4px 16px;
}

.welcome-banner .weekday {
  font-size: 0.85em;
  opacity: 0.95;
  margin-right: 8px;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 12px;
}

/* 周末特殊样式 */
.welcome-banner.weekend {
  background: linear-gradient(90deg, #1dd1a1, #10ac84, #00b894, #1dd1a1);
  background-size: 300% 100%;
}

/* ========================================
   主容器
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ========================================
   Hero 标题区域
   ======================================== */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  color: white;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5em;
  margin-bottom: 20px;
  text-shadow: 3px 3px 12px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.4em;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   卡片区域
   ======================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

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

.card h2 {
  color: var(--primary-color);
  margin-bottom: 16px;
  font-size: 1.6em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 1.05em;
}

.card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.card a:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.card a::after {
  content: '→';
  transition: transform 0.3s;
}

.card a:hover::after {
  transform: translateX(4px);
}

/* ========================================
   页脚
   ======================================== */
footer {
  text-align: center;
  padding: 50px 20px;
  color: rgba(255,255,255,0.85);
  margin-top: 80px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

footer p {
  font-size: 0.95em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 50px 20px 40px;
  }
  
  .hero h1 {
    font-size: 2.2em;
  }
  
  .hero p {
    font-size: 1.1em;
  }
  
  .welcome-banner {
    font-size: 1.2em;
    padding: 18px 15px;
    min-height: 70px;
  }
  
  .welcome-banner .teacher-name {
    font-size: 1.2em;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .card {
    padding: 28px;
  }
  
  .card h2 {
    font-size: 1.4em;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8em;
  }
  
  .welcome-banner {
    font-size: 1em;
  }
  
  .card {
    padding: 24px;
  }
}

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

.card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
