/* AI 学习平台 - 现代化样式 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 全局变量 */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --card-hover-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

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

/* 导航栏增强 */
nav {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

nav a {
  position: relative;
  transition: var(--transition-smooth);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition-smooth);
}

nav a:hover::after {
  width: 100%;
}

/* 卡片增强 */
.bg-white {
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.bg-white:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-4px);
}

/* 按钮增强 */
button, .button {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

button::before, .button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before, .button:hover::before {
  width: 300px;
  height: 300px;
}

/* 渐变背景 Hero */
.bg-gradient-to-r {
  position: relative;
  overflow: hidden;
}

.bg-gradient-to-r::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* 进度条动画 */
.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 课程卡片悬停效果 */
.course-card {
  transition: var(--transition-smooth);
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(102, 126, 234, 0.25);
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 0;
}

.course-card:hover::before {
  opacity: 0.05;
}

.course-card > * {
  position: relative;
  z-index: 1;
}

/* 徽章样式 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.badge-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.badge-purple {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.badge-red {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

/* 输入框增强 */
input, select, textarea {
  transition: var(--transition-smooth);
  border: 2px solid #e5e7eb;
}

input:focus, select:focus, textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* 文字稿样式增强 */
#script-content {
  line-height: 1.8;
}

#script-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 2rem 0 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#script-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  color: #4c1d95;
  position: relative;
  padding-left: 1rem;
}

#script-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

#script-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem;
  color: #6b21a8;
}

#script-content strong {
  font-weight: 700;
  color: #7c3aed;
}

#script-content ul, #script-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

#script-content li {
  margin: 0.5rem 0;
  position: relative;
}

#script-content li::marker {
  color: #667eea;
}

/* 提示框增强 */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-info {
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  border-left: 4px solid #667eea;
  color: #4c1d95;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .course-card:hover {
    transform: none;
  }
  
  nav {
    padding: 0.5rem 0;
  }
  
  .hero-title {
    font-size: 1.75rem !important;
  }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }
  
  .bg-white {
    background: #2d2d44 !important;
    color: #e5e5e5;
  }
  
  nav {
    background: rgba(45, 45, 68, 0.95) !important;
  }
}

/* 打印样式 */
@media print {
  nav, footer, button {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  .bg-white {
    box-shadow: none !important;
  }
}
