/* ============================================================
   课程模块样式（v2：顶部轮播 + 所有课程横版 banner）
   主页 course.html
   ============================================================ */

/* ============================================================
   顶部 · Banner 轮播（play.html 同款）
   ============================================================ */
.course-hero { margin-bottom: 56px; position: relative; }

.carousel-viewport { position: relative; }
.carousel-track {
  position: relative;
  display: flex; align-items: stretch;
  height: 340px;
}
.banner {
  flex: 0 0 auto;
  width: 100%;
  border-radius: var(--radius-banner, 28px);
  padding: 48px 56px;
  display: flex; align-items: center;
  overflow: hidden;
  position: absolute; left: 0; top: 0;
  height: 100%;
  box-shadow: var(--shadow-banner, 0 1px 2px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02));
  opacity: 0;
  transform: translateX(60px) scale(0.96);
  transition: opacity .55s ease, transform .55s ease, filter .55s ease;
  pointer-events: none;
  cursor: pointer;
}
.banner.is-current {
  position: relative;
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 2;
  pointer-events: auto;
}
.banner.is-peek-left,
.banner.is-peek-right {
  opacity: 0.55;
  width: 80%;
  height: 92%;
  filter: saturate(0.85) brightness(0.98);
  z-index: 1;
  pointer-events: none;
}
.banner.is-peek-left  { left: -45%; transform: scale(0.94); }
.banner.is-peek-right { left: 65%;  transform: scale(0.94); }

.banner-content {
  display: flex; align-items: center; gap: 48px;
  width: 100%; position: relative;
}
.banner-art {
  flex-shrink: 0;
  width: 200px; height: 200px;
  border-radius: var(--radius-icon-banner, 48px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.20);
  overflow: hidden;
  animation: floatY 6s ease-in-out infinite;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.banner-art svg { width: 100%; height: 100%; display: block; }
.banner:hover .banner-art { animation-play-state: paused; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.banner-text { flex: 1; min-width: 0; position: relative; z-index: 2; }
.banner-eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary, #1d1d1f);
  opacity: 0.6;
}
.banner-title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 12px;
  color: var(--text-primary, #1d1d1f);
}
.banner-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary, #1d1d1f);
  opacity: 0.65;
  max-width: 480px;
  margin-bottom: 22px;
}
.banner-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--text-primary, #1d1d1f);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background .2s ease, transform .2s ease;
}
.banner-cta:hover { background: var(--accent, #0a84ff); transform: translateY(-1px); }
.banner-cta::after { content: ' →'; transition: transform .2s ease; display: inline-block; }
.banner-cta:hover::after { transform: translateX(3px); }

/* banner 色板（与 play.html 完全一致） */
.tone-violet  { background: linear-gradient(135deg,#ede9fe 0%,#f3e8ff 100%); }
.tone-rose    { background: linear-gradient(135deg,#fce7f3 0%,#fff1f2 100%); }
.tone-cyan    { background: linear-gradient(135deg,#cffafe 0%,#e0f2fe 100%); }
.tone-amber   { background: linear-gradient(135deg,#fef3c7 0%,#fff7ed 100%); }
.tone-emerald { background: linear-gradient(135deg,#d1fae5 0%,#ecfdf5 100%); }
.tone-blue    { background: linear-gradient(135deg,#dbeafe 0%,#eff6ff 100%); }

/* 轮播控件 */
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 22px; font-weight: 500;
  color: var(--text-primary, #1d1d1f);
  z-index: 10;
  opacity: 0;
  transition: opacity .2s ease, background .15s ease;
  line-height: 1;
}
.course-hero:hover .carousel-nav { opacity: 1; }
.carousel-nav:hover { background: #fff; }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

.carousel-dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 22px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
  border: 0; padding: 0;
}
.dot.active { width: 24px; border-radius: 999px; background: var(--text-primary, #1d1d1f); }

/* ============================================================
   所有课程 · 横版 banner（Klook 风格）
   ============================================================ */
.banner-section { margin-bottom: 56px; }

.section-head { margin-bottom: 18px; }
.section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text-primary, #1d1d1f);
  line-height: 1.15;
}
.section-title .en {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-hint, #86868b);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* 搜索行（与 play.html 一致） */
.tools-row {
  display: flex; align-items: center; justify-content: flex-start;
  margin-bottom: 24px;
}
.search-inline {
  flex: 0 0 360px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  height: 44px;
  background: #fff;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 999px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-inline:hover { border-color: rgba(0,0,0,0.18); }
.search-inline:focus-within {
  border-color: var(--accent, #0a84ff);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(10,132,255,0.12));
}
.search-icon { color: var(--text-hint, #86868b); display: inline-flex; }
.search-input {
  flex: 1;
  border: 0; outline: none; background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary, #1d1d1f);
  height: 100%;
}
.search-input::placeholder { color: var(--text-hint, #86868b); }
.search-clear {
  background: transparent; border: 0;
  color: var(--text-muted, #6e6e73); cursor: pointer; padding: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.search-clear:hover { background: rgba(0,0,0,0.06); color: var(--text-primary, #1d1d1f); }
.search-clear[hidden] { display: none; }

.banner-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1180px) { .banner-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .banner-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .banner-row { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.banner-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-soft, rgba(0,0,0,0.04));
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.banner-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover, 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.08));
}
.banner-card .cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg,#cbd5e1 0%,#94a3b8 100%);
  overflow: hidden;
}
.banner-card .cover img,
.banner-card .cover svg { width: 100%; height: 100%; display: block; }
.banner-card .badge {
  position: absolute; top: 10px; left: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.banner-card .badge.tone-violet  { background: #7c3aed; }
.banner-card .badge.tone-rose    { background: #e11d48; }
.banner-card .badge.tone-cyan    { background: #0891b2; }
.banner-card .badge.tone-amber   { background: #d97706; }
.banner-card .badge.tone-emerald { background: #059669; }
.banner-card .badge.tone-blue    { background: #1d4ed8; }

.banner-card .meta {
  padding: 14px 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.banner-card .title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text-primary, #1d1d1f);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.banner-card .rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #424245);
  letter-spacing: -0.005em;
}
.banner-card .rating .star { color: #f59e0b; font-size: 12px; }
.banner-card .rating .count { color: var(--text-hint, #86868b); font-weight: 500; }
.banner-card .price {
  margin-top: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text-primary, #1d1d1f);
}
.banner-card .price .yen { font-weight: 500; margin-right: 2px; color: var(--text-secondary, #424245); }
.banner-card .price.free { color: #166534; }

/* 空状态（搜索无结果时） */
.banner-empty {
  grid-column: 1 / -1;
  padding: 64px 20px;
  text-align: center;
  color: var(--text-hint, #86868b);
}
.banner-empty .title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #1d1d1f);
  margin-bottom: 4px;
}
.banner-empty .hint { font-size: 12px; }

/* ============================================================
   解锁弹窗（保留原版）
   ============================================================ */
.unlock-modal { position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,0.45); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.unlock-modal.show { opacity: 1; pointer-events: auto; }
.unlock-dialog {
  width: min(420px, 92vw);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}
.unlock-modal.show .unlock-dialog { transform: none; }
.unlock-head {
  padding: 18px 20px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}
.unlock-body {
  padding: 8px 20px 4px;
  font-size: 14px;
  color: var(--text-secondary, #475569);
  line-height: 1.7;
}
.unlock-foot {
  padding: 16px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-soft, #f1f5f9);
  margin-top: 12px;
}
.unlock-foot button {
  padding: 9px 20px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.unlock-foot .btn-cancel {
  color: var(--text-secondary, #475569);
  background: var(--bg-soft, #f1f5f9);
  border-color: var(--border, #e5e7eb);
}
.unlock-foot .btn-cancel:hover {
  background: #e2e8f0;
}
.unlock-foot .btn-confirm {
  color: #fff;
  background: var(--accent, #3b82f6);
}
.unlock-foot .btn-confirm:hover:not(:disabled) {
  background: var(--accent-hover, #2563eb);
}
.unlock-foot .btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 900px) {
  .carousel-track { height: 280px; }
  .banner { padding: 32px 32px; }
  .banner-content { gap: 32px; padding: 0 8px; }
  .banner-art { width: 140px; height: 140px; border-radius: 32px; }
  .banner-title { font-size: 28px; }
  .search-inline { flex-basis: 100%; }
  .banner-section { margin-bottom: 40px; }
}
@media (max-width: 640px) {
  .carousel-track { height: 240px; }
  .carousel-prev, .carousel-next { display: none; }
  .banner { padding: 24px 22px; }
  .banner-content { gap: 16px; }
  .banner-art { width: 84px; height: 84px; border-radius: 22px; }
  .banner-title { font-size: 22px; margin-bottom: 8px; }
  .banner-sub { font-size: 12px; margin-bottom: 14px; max-width: none; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .banner-eyebrow { margin-bottom: 8px; font-size: 10px; }
  .banner-card .title { font-size: 13px; }
  .banner-card .meta { padding: 12px 12px 14px; }
}