<template>
  <div class="cd-page container-height">
    <!-- ===== HERO SECTION ===== -->
    <section class="cd-hero">
      <!-- Background layers -->
      <div class="cd-hero-bg" aria-hidden="true">
        <div class="cd-orb cd-orb-1"></div>
        <div class="cd-orb cd-orb-2"></div>
        <div class="cd-orb cd-orb-3"></div>
        <div class="cd-grid-overlay"></div>
      </div>

      <!-- Wave animation -->
      <canvas ref="waveCanvasRef" class="cd-hero__wave-canvas"></canvas>

      <div class="container cd-hero-inner">
        <!-- Breadcrumb -->
        <div class="cd-breadcrumb-wrap">
          <Breadcrumb />
        </div>

        <!-- Hero content -->
        <div class="cd-hero-content">
          <div class="cd-hero-left">
            <div class="cd-hero-badge">
              <span class="cd-badge-dot"></span>
              <span>{{ $t('learningSystem.heroBadge') }}</span>
              <span class="cd-badge-sep">|</span>
              <span class="cd-badge-sub">{{ info.skillTagName || $t('learningSystem.courseDetail') }}</span>
            </div>

            <h1 class="cd-hero-title">
              {{ info.courseTitle }}
              <span v-if="chapterInfo.chapterOrderName" class="cd-hero-subtitle">({{ chapterInfo.chapterOrderName }})</span>
            </h1>

            <p class="cd-hero-desc">
              {{ info.courseIntro }}
            </p>

            <div class="cd-hero-meta">
              <div class="cd-meta-item">
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
                <span>{{ info.createTime }}</span>
              </div>
              <div class="cd-meta-item">
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/></svg>
                <span>{{ info.noteCount || 0 }} {{ $t('common.notes') }}</span>
              </div>
            </div>
          </div>

          <div class="cd-hero-right" v-if="false">
            <div class="cd-preview-card">
              <img :src="info.coverImageUrl || currentCourseCover" :alt="info.courseTitle" class="cd-preview-img" />
              <div class="cd-preview-overlay">
                <button class="cd-play-btn" @click="playVideo(currentVideoUrl)">
                  <svg width="28" height="28" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>
                  <span>{{ $t('learningSystem.previewNow') }}</span>
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- ===== MAIN CONTENT ===== -->
    <div class="container cd-body" v-loading="isLoading">
      <div class="cd-layout">

        <!-- Left: Video & Content -->
        <div class="cd-main-col">
          <!-- Video Player Card -->
          <div class="cd-card cd-video-card">
            <div class="cd-video-wrapper">
              <VideoPlayer 
                ref="videoPlayer"
                :src="currentVideoUrl"
                :poster="currentCourseCover"
                @play="onPlayerPlay"
                @pause="onPlayerPause"
                @ended="onPlayerEnded"
                @timeupdate="onPlayerTimeupdate"
                @loadedmetadata="onPlayerLoadedmetadata"
                @error="onPlayerError"
                @ready="onPlayerReady"
              />
            </div>
          </div>

          <!-- Action Bar Card -->
          <div class="cd-card cd-action-card">
            <div class="cd-action-bar">
              <div class="cd-action-left">
                <button class="cd-action-btn" :class="{ 'is-active': info.collectFlag == 1 }" @click="collectFn">
                  <svg width="18" height="18" viewBox="0 0 24 24" :fill="info.collectFlag == 1 ? 'currentColor' : 'none'" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
                  <span>{{ info.collectFlag == 1 ? $t('common.unCollect') : $t('common.collect') }}</span>
                </button>
                <button class="cd-action-btn" @click="copyCurrentUrl">
                  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg>
                  <span>{{ $t('common.share') }}</span>
                </button>
              </div>
              <button class="cd-note-btn" @click="toAddNote">
                <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>
                <span>{{ info.noteCount || 0 }} {{ $t('common.notes') }}</span>
              </button>
            </div>
          </div>

          <!-- Description Card -->
          <div class="cd-card cd-desc-card">
            <div class="cd-card-header">
              <div class="cd-card-icon">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
              </div>
              <h3 class="cd-card-title">{{ $t('common.kechengjieshao') }}</h3>
            </div>
            <div class="cd-desc-content">
              <p class="cd-desc-text">{{ info.courseIntro }}</p>
            </div>
          </div>

          <!-- Comments Card -->
          <div class="cd-card cd-comments-card">
            <Pinglun :info="info"/>
          </div>
        </div>

        <!-- Right: Sidebar -->
        <div class="cd-sidebar">
          <div class="cd-sidebar-sticky">
            <!-- Chapter Directory -->
            <div class="cd-sidebar-card" v-show="!isShowNote">
              <div class="cd-sidebar-header">
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 10h16M4 14h16M4 18h16"/></svg>
                <span>{{ $t('common.kechengmulu') }}</span>
              </div>
              <CourseDirectory 
                :info="info" 
                ref="courseDirectory" 
                :chapterId="chapterId" 
                @purchaseFn="purchaseFn"
              />
            </div>

            <!-- Other Courses -->
            <div class="cd-sidebar-card mt20" v-show="!isShowNote">
              <OtherCourse :info="info"/>
            </div>

            <!-- Notes Panel -->
            <div class="cd-sidebar-card cd-notes-panel mt20" v-show="isShowNote">
              <div class="cd-notes-close" @click="isShowNote = false">
                <el-icon size="18"><CloseBold /></el-icon>
              </div>
              <Xuxibiji :info="info" />
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useAppStore } from '@/pinia/appStore'
import { useI18n } from 'vue-i18n'

import Breadcrumb from '@/components/Breadcrumb.vue'
import VideoPlayer from '@/components/VideoPlayer.vue'
import Pinglun from './components/pinglun.vue'
import Xuxibiji from './components/Xuxibiji.vue'
import OtherCourse from './components/OtherCourse.vue'
import CourseDirectory from './components/CourseDirectory.vue'
import DGTMessage from '@/utils/message'
import { copyText, confirmBuy } from '@/utils/util'
import { purchase } from '@/api/common.js'
import { getCourseDetail, collect } from '@/api/course.js'
import { checkIn } from '@/api/my.js'

const router = useRouter()
const route = useRoute()
const appStore = useAppStore()
const { t } = useI18n()

const isLoading = ref(false)
const courseId = ref(route.params.courseId || '')
const chapterId = ref(route.query.chapterId || '')
const chapterInfo = ref({})
const info = ref({})
const isShowNote = ref(false)

const currentVideoUrl = ref('')
const currentCourseCover = ref('')
const videoPlayer = ref(null)
const waveCanvasRef = ref(null)

let waveAnimId = null

function initWaveCanvas() {
  const canvas = waveCanvasRef.value
  if (!canvas) return
  
  const ctx = canvas.getContext('2d')
  let W = 0, H = 0
  
  function resize() {
    W = canvas.width = canvas.offsetWidth
    H = canvas.height = canvas.offsetHeight
  }
  
  resize()
  window.addEventListener('resize', resize)

  const waves = [
    { amp: 40, freq: 0.004, speed: 0.0012, phase: 0,   color: 'rgba(99,102,241,0.28)' },
    { amp: 28, freq: 0.006, speed: 0.0025, phase: 2.1, color: 'rgba(167,139,250,0.22)' },
    { amp: 18, freq: 0.008, speed: 0.004,  phase: 4.3, color: 'rgba(255,255,255,1)' },
  ]

  function draw() {
    ctx.clearRect(0, 0, W, H)
    waves.forEach(w => {
      w.phase += w.speed
      ctx.beginPath()
      ctx.moveTo(0, H)
      for (let x = 0; x <= W; x += 2) {
        const y = H * 0.60 + Math.sin(x * w.freq + w.phase) * w.amp
        ctx.lineTo(x, y)
      }
      ctx.lineTo(W, H)
      ctx.closePath()
      ctx.fillStyle = w.color
      ctx.fill()
    })
    waveAnimId = requestAnimationFrame(draw)
  }
  
  draw()
}

function destroyWaveCanvas() {
  if (waveAnimId) {
    cancelAnimationFrame(waveAnimId)
    waveAnimId = null
  }
}

onMounted(() => {
  getDetail()
  initWaveCanvas()
})

onUnmounted(() => {
  destroyWaveCanvas()
})

const getDetail = async () => {
  await getCourseDetail({ id: courseId.value }).then(res => {
    if (res.code === 200) {
      info.value = res.data || {}
      currentCourseCover.value = info.value.coverImageUrl || ''
    }
  })
}

const purchaseFn = async (id, chapterInfoItem = {}) => {
  isLoading.value = true
  chapterInfo.value = chapterInfoItem || {}
  
  await purchase({
    buyType: 2,
    chapterId: id,
  }).then(res => {
    isLoading.value = false
    if (res.code === 200) {
      if (res.data?.buyFlag == 1) {
        currentVideoUrl.value = res.data?.contentUrl || ''
      } else {
        confirmBuy({
          callback: purchaseFn,
          callbackParams: id,
          appStore,
          router,
          price: info.value.coursePrice,
          t,
          productId: info.value.courseId,
          orderType: 'course_purchase',
          payMethod: 'BMI'
        })
      }
    }
  })
}

const toAddNote = () => {
  isShowNote.value = true
}

const playVideo = (video) => {
  if (!video) return
  currentVideoUrl.value = video.contentUrl || video
  if (videoPlayer.value) {
    videoPlayer.value.play()
  }
}

const onPlayerPlay = () => {}
const onPlayerPause = () => {}
const onPlayerEnded = () => {}
const onPlayerTimeupdate = (time) => {}
const onPlayerLoadedmetadata = (duration) => {}
const onPlayerError = () => {}
const onPlayerReady = () => {}

const collectFn = () => {
  collect({ objectId: courseId.value }).then(res => {
    if (res.code === 200) {
      info.value.collectFlag = info.value.collectFlag == 0 ? 1 : 0
      let msg = info.value.collectFlag == 0 ? t('common.unCollect') : t('common.collect')
      DGTMessage.success(msg + t('common.success'))
    }
  })
}

const copyCurrentUrl = () => {
  copyText(window.location.href, t, t('common.copyLineSuccess'))
  signIn()
}

const signIn = async () => {
  let res = await checkIn({ actionType: 2 })
  if (res.code === 200) {
    appStore.USERINFO()
  }
}
</script>

<style scoped lang="scss">
.cd-page {
  min-height: 100vh;
  background: #f8faff;
}
.container{
  padding: 20px;
}
/* ===== HERO SECTION ===== */
.cd-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #eef2ff 0%, #ede9fe 28%, #e8e4ff 52%, #f3e8ff 72%, #fce7f3 100%);
  padding-bottom: 80px;
}

.cd-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;

  .cd-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99,102,241,0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.45;
  }

  .cd-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    
    &-1 {
      width: 500px;
      height: 500px;
      background: rgba(99, 102, 241, 0.35);
      top: -150px;
      left: -100px;
      animation: floatOrb 12s ease-in-out infinite;
    }
    
    &-2 {
      width: 400px;
      height: 400px;
      background: rgba(167, 139, 250, 0.30);
      top: 50%;
      right: -80px;
      animation: floatOrb 15s ease-in-out infinite reverse;
    }
    
    &-3 {
      width: 300px;
      height: 300px;
      background: rgba(236, 72, 153, 0.25);
      bottom: -100px;
      left: 40%;
      animation: floatOrb 10s ease-in-out infinite 2s;
    }
  }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 20px); }
}

.cd-hero__wave-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
}

.cd-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 24px;
}

.cd-breadcrumb-wrap {
  margin-bottom: 32px;
}

.cd-hero-content {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}

.cd-hero-left {
  .cd-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 100px;
    font-size: 13px;
    color: #4f46e5;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);

    .cd-badge-dot {
      width: 8px;
      height: 8px;
      background: linear-gradient(135deg, #22c55e, #16a34a);
      border-radius: 50%;
      animation: pulse 2s infinite;
    }

    .cd-badge-sep {
      color: #d1d5db;
    }

    .cd-badge-sub {
      color: #6b7280;
    }
  }

  .cd-hero-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 20px;
    letter-spacing: -0.02em;

    .cd-hero-subtitle {
      display: block;
      font-size: 0.55em;
      font-weight: 600;
      color: #6b7280;
      margin-top: 8px;
    }
  }

  .cd-hero-desc {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    max-width: 520px;
    margin-bottom: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cd-hero-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;

    .cd-meta-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      color: #6b7280;

      svg {
        color: #4f46e5;
      }
    }
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cd-hero-right {
  .cd-preview-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.25);
    aspect-ratio: 16/10;
    background: #000;

    .cd-preview-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .cd-preview-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.3s;

      &:hover {
        background: rgba(0, 0, 0, 0.45);
      }
    }

    .cd-play-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 20px 32px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      border-radius: 100px;
      border: none;
      cursor: pointer;
      color: #4f46e5;
      font-weight: 600;
      font-size: 14px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);

      &:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(79, 70, 229, 0.4);
      }
    }
  }
}

/* ===== MAIN BODY ===== */
.cd-body {
  position: relative;
  z-index: 3;
  margin-top: -40px;
  padding-bottom: 60px;
}

.cd-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

/* ===== CARDS ===== */
.cd-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 12px 44px rgba(79, 70, 229, 0.14);
    transform: translateY(-2px);
  }
}

.cd-video-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.15);

  .cd-video-wrapper {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
  }
}

.cd-action-card {
  margin-top: 24px;
  padding: 20px 24px;

  .cd-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .cd-action-left {
    display: flex;
    gap: 8px;
  }

  .cd-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
    transition: all 0.25s ease;

    &:hover {
      background: #f9fafb;
      border-color: #d1d5db;
      color: #111827;
    }

    &.is-active {
      background: linear-gradient(135deg, #fef3c7, #fde68a);
      border-color: #fbbf24;
      color: #92400e;
      
      svg {
        color: #d97706;
      }
    }

    svg {
      color: #6b7280;
    }
  }

  .cd-note-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);

    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    }

    svg {
      color: white;
    }
  }
}

.cd-desc-card {
  margin-top: 24px;
  padding: 28px;

  .cd-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;

    .cd-card-icon {
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #ede9fe, #ddd6fe);
      border-radius: 12px;
      color: #7c3aed;
    }

    .cd-card-title {
      font-size: 18px;
      font-weight: 700;
      color: #111827;
    }
  }

  .cd-desc-text {
    font-size: 15px;
    line-height: 1.75;
    color: #4b5563;
  }
}

.cd-comments-card {
  margin-top: 24px;
  padding: 28px;
}

/* ===== SIDEBAR ===== */
.cd-sidebar {
  position: relative;
}

.cd-sidebar-sticky {
  position: sticky;
  top: 24px;
}

.cd-sidebar-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 12px 44px rgba(79, 70, 229, 0.14);
  }

  .cd-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 600;
    color: #374151;

    svg {
      color: #4f46e5;
    }
  }
}

.cd-notes-panel {
  position: relative;

  .cd-notes-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
      background: #fee2e2;
      color: #dc2626;
    }
  }
}

.mt20 {
  margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .cd-layout {
    grid-template-columns: 1fr 340px;
    gap: 24px;
  }

  .cd-hero-content {
    grid-template-columns: 1fr 360px;
    gap: 36px;
  }
}

@media (max-width: 1024px) {
  .cd-layout {
    grid-template-columns: 1fr;
  }

  .cd-sidebar {
    order: -1;
  }

  .cd-sidebar-sticky {
    position: static;
  }

  .cd-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cd-hero-left {
    .cd-hero-desc {
      max-width: 100%;
    }

    .cd-hero-meta {
      justify-content: center;
    }
  }

  .cd-hero-right {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .cd-hero {
    padding-bottom: 60px;
  }

  .cd-breadcrumb-wrap {
    margin-bottom: 20px;
  }

  .cd-hero-left {
    .cd-hero-title {
      font-size: 26px;
    }

    .cd-hero-desc {
      font-size: 15px;
    }
  }

  .cd-body {
    margin-top: -24px;
  }

  .cd-action-bar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .cd-action-left {
    justify-content: center;
  }

  .cd-note-btn {
    justify-content: center;
  }

  .cd-card {
    border-radius: 16px;
  }

  .cd-sidebar-card {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .cd-hero-inner {
    padding-top: 16px;
  }

  .cd-hero-left {
    .cd-hero-badge {
      font-size: 12px;
      padding: 6px 12px;
    }

    .cd-hero-title {
      font-size: 22px;
    }
  }

  .cd-action-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .cd-note-btn {
    padding: 10px 18px;
    font-size: 13px;
  }
}
</style>