/* 基础设置 */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  
  /* 背景圖設置 (URL 由 JS 載入) */
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e; 
  background-attachment: fixed;
}

/* --- 容器设置 --- */
.container {
  width: 100%;
  max-width: 400px;
  min-height: 100vh; 
  position: relative;
  
  background-color: rgba(0, 0, 0, 0.4); 
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  z-index: 10;
  padding-bottom: 20px; 
}

/* --- 标题图层（最上方，使用 px 精确定位）--- */
.title-area {
  width: 100%;
  text-align: center;
  /* ❗ 核心调整：使用 px，使其更容易预测高度 ❗ */
  padding-top: 5px; 
  position: relative; 
  margin-bottom: 0; 
  z-index: 30; 
  /* ❗ 增加 ID 便于 JS 测量 ❗ */
}

.title-img {
  width: 90%; 
  height: auto;
  filter: drop-shadow(0 0 10px #ff69b4) drop-shadow(0 0 5px #ff69b4); 
}

/* --- 人物图层（绝对定位）--- */
.main-character-img {
  width: 100%;
  height: auto;
  display: block;
  position: absolute; 
  /* ❗ 移除 top，现在由 JS 负责精确计算定位 ❗ */
  left: 0;
  z-index: 20; 
}

/* --- 下载按钮（精确定位到人物图底部）--- */
.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 85%;
  padding: 15px 20px;
  background: linear-gradient(to right, #2a94d8, #007bb6); 
  color: white;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  
  position: absolute;
  /* ❗ 移除 top，现在由 JS 负责精确计算定位 ❗ */
  left: 50%;
  transform: translateX(-50%); 

  margin: 0; 
  z-index: 50; 
}

.button-icon {
  width: 24px;
  height: 24px;
  margin-right: 15px;
}

.button-text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.button-main-text {
  font-size: 18px;
  font-weight: bold;
}

.button-sub-text {
  font-size: 12px;
  opacity: 0.9;
}
