<template>
  <div class="home-container">
    <!-- 顶部视频横幅 -->
    <div class="video-banner">
      <video src="../../public/蜜雪冰城-雪王百科.mp4" autoplay muted loop class="bg-video"></video>
      <div class="video-overlay">
        <h2 class="banner-title">欢迎使用蜜雪冰城管理系统</h2>
      </div>
    </div>

    <!-- 雪王简介 -->
    <div class="intro-section">
      <div class="section-header">
        <div class="header-line"></div>
        <h2 class="section-title">雪王简介</h2>
        <div class="header-line"></div>
      </div>

      <div class="intro-content">
        <div class="pic-wrapper">
          <img src="../../public/mixue.png" alt="雪王" class="xuewang-img">
        </div>
        <div class="txt-wrapper">
          <div class="quote">
            "我是手拿冰淇凌权杖的雪王"
            <br>
            "一生只爱冰淇凌与茶"
          </div>
          <ul class="info-list">
            <li v-for="(item, index) in snowKingInfo" :key="index">
              <span class="info-label">{{ item.label }}</span>
              <span class="info-divider"></span>
              <span class="info-value">{{ item.value }}</span>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const snowKingInfo = ref([
  { label: '生日', value: '11月22日' },
  { label: '性格', value: '正直、友善、热情、进取' },
  { label: '职位', value: '蜜雪冰城首席品控官兼全球品牌代言人' },
  { label: '口头禅', value: '你爱我，我爱你，蜜雪冰城甜蜜蜜' },
  { label: '爱好', value: '唱歌跳舞，研究冰淇淋与茶的新奇吃法' }
])
</script>

<style scoped>
.home-container {
  min-height: 100%;
}

/* ========== 视频横幅 ========== */
.video-banner {
  position: relative;
  width: calc(100% + 40px);
  margin: -20px -20px 0 -20px;
  height: 300px;
  overflow: hidden;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(230, 0, 18, 0.3) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-title {
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin: 0;
}

/* ========== 简介区域 ========== */
.intro-section {
  padding: 40px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.header-line {
  flex: 1;
  max-width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E60012, transparent);
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: #E60012;
  margin: 0;
  white-space: nowrap;
}

.intro-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 雪王图片 */
.pic-wrapper {
  flex-shrink: 0;
  width: 400px;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(230, 0, 18, 0.15);
  transition: transform 0.3s;
}

.pic-wrapper:hover {
  transform: translateY(-5px);
}

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

/* 文字内容 */
.txt-wrapper {
  flex: 1;
  max-width: 500px;
}

.quote {
  font-size: 28px;
  font-weight: 700;
  color: #E60012;
  line-height: 1.5;
  margin-bottom: 40px;
  padding-left: 20px;
  border-left: 4px solid #E60012;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed #eee;
  font-size: 16px;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #303133;
  min-width: 70px;
}

.info-divider {
  width: 1px;
  height: 16px;
  background: #E60012;
  margin: 0 16px;
}

.info-value {
  color: #606266;
  flex: 1;
}

/* ========== 响应式适配 ========== */
@media (max-width: 900px) {
  .intro-content {
    flex-direction: column;
    gap: 30px;
  }

  .pic-wrapper {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1;
  }

  .txt-wrapper {
    width: 100%;
  }

  .banner-title {
    font-size: 24px;
  }

  .video-banner {
    height: 200px;
  }
}
</style>
