/* 伊娃东方舞 · 网课系统 - 学员端 H5 样式 */
:root {
  --gold: #C8A96E;
  --dark-gold: #A0894E;
  --red: #8B1A1A;
  --dark: #1a1a1a;
  --dark2: #2a2a2a;
  --dark3: #333;
  --gray: #999;
  --light: #f5f0e8;
  --white: #fff;
}

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

body {
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--light);
  color: var(--dark);
  padding-bottom: 70px;
  max-width: 480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

/* 底部导航 */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--white);
  border-top: 1px solid #eee;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 6px;
  text-decoration: none;
  color: var(--gray);
  font-size: 11px;
  transition: color .2s;
}
.tab.active { color: var(--red); }
.tab-icon { font-size: 22px; margin-bottom: 2px; }

/* Banner */
.banner {
  position: relative;
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--red) 0%, #5a0a0a 100%);
  overflow: hidden;
}
.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 24px;
  text-align: center;
  opacity: 0;
  transition: opacity .5s;
}
.banner-slide.active { opacity: 1; }
.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
}
.dot.active { background: var(--gold); }

/* 搜索 */
.search-bar {
  padding: 12px 16px;
  background: var(--white);
}
.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e0d5c5;
  border-radius: 20px;
  background: var(--light);
  font-size: 14px;
  outline: none;
}
.search-bar input:focus { border-color: var(--gold); }

/* 分类标签 */
.category-tabs {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  background: var(--white);
  border-bottom: 1px solid #eee;
}
.cat-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: var(--white);
  font-size: 13px;
  color: var(--gray);
  cursor: pointer;
}
.cat-tab.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* 专栏卡片 */
.series-list { padding: 12px 16px; }
.series-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.series-card .cover {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 36px;
}
.series-card .info {
  padding: 12px 14px;
}
.series-card .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.series-card .meta {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 8px;
}
.series-card .price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.series-card .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}
.series-card .price.free { color: var(--gold); }
.series-card .original-price {
  font-size: 12px;
  color: var(--gray);
  text-decoration: line-through;
}
.series-card .tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(200,169,110,.15);
  color: var(--gold);
}

/* 详情页 */
.detail-header {
  position: sticky;
  top: 0;
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  z-index: 10;
}
.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  color: var(--dark);
}
.detail-cover {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 48px;
}
.detail-info {
  padding: 16px;
  background: var(--white);
}
.detail-info h1 { font-size: 20px; margin-bottom: 8px; }
.detail-info .subtitle { color: var(--gray); font-size: 14px; margin-bottom: 12px; }
.detail-info .stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
}
.detail-info .stats span { color: var(--dark); font-weight: 600; }

/* 详情tab */
.detail-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 49px;
  z-index: 10;
}
.detail-tab {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--gray);
  cursor: pointer;
  position: relative;
}
.detail-tab.active { color: var(--red); font-weight: 600; }
.detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--red);
}
.detail-tab-content {
  padding: 16px;
  background: var(--white);
  min-height: 200px;
}
.detail-tab-content p { line-height: 1.8; font-size: 14px; color: var(--dark3); }

/* 课程列表 */
.lesson-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.lesson-item:last-child { border-bottom: none; }
.lesson-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray);
  margin-right: 12px;
  flex-shrink: 0;
}
.lesson-num.free { background: var(--gold); color: var(--white); }
.lesson-num.completed { background: var(--red); color: var(--white); }
.lesson-info { flex: 1; }
.lesson-info .title { font-size: 14px; margin-bottom: 4px; }
.lesson-info .duration { font-size: 12px; color: var(--gray); }
.lesson-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.lesson-badge.free { background: rgba(200,169,110,.15); color: var(--gold); }
.lesson-badge.locked { background: #f0f0f0; color: var(--gray); }

/* 详情页底部 */
.detail-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--white);
  border-top: 1px solid #eee;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.footer-price { flex: 1; }
.footer-price .current { font-size: 22px; font-weight: 700; color: var(--red); }
.footer-price .original { font-size: 12px; color: var(--gray); text-decoration: line-through; margin-left: 8px; }
.footer-btn {
  padding: 10px 28px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.footer-btn.gold { background: var(--gold); }

/* 播放页 */
.player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--dark);
  color: var(--white);
  font-size: 16px;
}
.player-header .back-btn { color: var(--white); }
.video-wrapper {
  width: 100%;
  background: #000;
}
.player-info {
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid #eee;
}
.player-info h3 { font-size: 16px; margin-bottom: 6px; }
.player-info .meta { font-size: 12px; color: var(--gray); }
.lesson-list {
  padding: 0 16px 16px;
  background: var(--white);
}
.lesson-list h4 {
  padding: 12px 0 8px;
  font-size: 14px;
  color: var(--gray);
}
.lesson-item.playing { background: rgba(200,169,110,.08); border-radius: 8px; padding: 8px 12px; margin: 0 -12px; }

/* 我的课程页 */
.my-courses-header {
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--red) 0%, #5a0a0a 100%);
  color: var(--white);
}
.my-courses-header h2 { font-size: 22px; margin-bottom: 16px; }
.progress-stats {
  display: flex;
  gap: 16px;
}
.stat-card {
  flex: 1;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.stat-card .num { font-size: 24px; font-weight: 700; color: var(--gold); }
.stat-card .label { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 4px; }

.my-course-item {
  background: var(--white);
  margin: 12px 16px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.my-course-cover {
  height: 100px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 28px;
  position: relative;
}
.progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,.2);
}
.progress-bar {
  height: 100%;
  background: var(--gold);
}
.my-course-info { padding: 12px; }
.my-course-info .name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.my-course-info .progress-text { font-size: 12px; color: var(--gray); }
.continue-btn {
  display: block;
  margin: 8px 12px 12px;
  padding: 8px;
  text-align: center;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* 个人中心 */
.profile-header {
  padding: 30px 16px 20px;
  background: linear-gradient(135deg, var(--red) 0%, #5a0a0a 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.profile-header .name { font-size: 18px; font-weight: 600; }
.profile-header .phone { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 4px; }

.profile-section {
  background: var(--white);
  margin: 12px 16px;
  border-radius: 12px;
  overflow: hidden;
}
.profile-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}
.profile-item:last-child { border-bottom: none; }
.profile-item .icon { font-size: 20px; margin-right: 12px; }
.profile-item .label { flex: 1; font-size: 15px; }
.profile-item .arrow { color: var(--gray); }

.distribution-card {
  margin: 12px 16px;
  padding: 16px;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%);
  border-radius: 12px;
  border: 1px solid var(--gold);
}
.distribution-card h3 { color: var(--red); margin-bottom: 8px; }
.distribution-card p { font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.distribution-card .btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.8);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  display: none;
}
.toast.show { display: block; }

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}
