/* 重置和基本样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
}

/* 使用 CSS 变量控制文字大小 */
/* 默认变量：桌面端 */
:root {
  --name-font-size: 45px;     /* 桌面端姓名文字大小 */
  --btn-font-size: 20px;      /* 桌面端按钮文字大小 */
}

/* 背景轮播区域 */
.background-container {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.background-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: 1;
}

/* 内容区域居中 */
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 2;
  width: 90%;
  max-width: 1000px;
}

/* 头像样式 */
.profile .avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;  /* 头像圆形 */
  margin: 0 auto 30px auto;  /* 垂直居中 */
  display: block;
  opacity: 0;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);  /* 头像阴影效果 */
  transition: opacity 1s ease-in-out;
  z-index: 10;
}

/* 姓名容器 */
.name-container {
  padding: 10px 20px;
  margin: 0 auto;
  display: inline-block;
}

/* 姓名文字样式，使用变量控制文字大小 */
.profile .name {
  font-size: var(--name-font-size);
  color: white;
  font-family: 'Dancing Script', cursive;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
}

/* 按钮容器，居中显示 */
.buttons {
  display: flex;
  justify-content: center;  /* 水平居中 */
  align-items: center;      /* 垂直居中 */
  flex-wrap: wrap;          /* 支持换行 */
}

/* 按钮样式：采用相对定位实现图标固定在左侧，文字居中显示 */
.buttons .btn {
  position: relative;
  width: 230px;           /* 固定宽度 */
  height: 60px;           /* 固定高度 */
  padding: 0 50px;        /* 左右各留50px，保证文字居中 */
  white-space: nowrap;    /* 强制文字一行显示 */
  line-height: 60px;      /* 文字垂直居中 */
  font-size: var(--btn-font-size);  /* 按钮文字大小，使用变量 */
  cursor: pointer;
  border: none;
  border-radius: 25px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  text-align: center;     /* 文字居中 */
  transition: transform 0.3s ease, background-color 0.3s ease;
  margin: 10px;
}

/* 鼠标悬停时的按钮效果 */
.buttons .btn:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.8);
}

/* 图标样式：固定在按钮左侧，与按钮左边缘保持15px距离 */
.buttons .btn .btn-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

/* 鼠标悬停时图标效果 */
.buttons .btn:hover .btn-icon {
  transform: translateY(-50%) scale(1.2);
}

/* 移动端调整：单独控制手机端的文字大小 */
@media (max-width: 1000px) {
  :root {
    --name-font-size: 20px;   /* 手机端姓名文字大小 */
    --btn-font-size: 16px;    /* 手机端按钮文字大小 */
  }
  .buttons .btn {
    width: 90%;
    max-width: 300px;
    padding: 0 50px;
    white-space: nowrap;
  }
}
