/* ============================================================
   poster.css — 海报样式（5:7 比例）
   注意：海报仍使用深色/渐变色背景以保证分享视觉冲击力
   ============================================================ */

/* ──── 海报容器（隐藏区域） ──── */
.poster-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 45, 63, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--transition-smooth);
}

.poster-container.active {
  opacity: 1;
  visibility: visible;
}

/* ──── 海报通用──── */
.poster,
.match-poster,
.invite-poster {
  width: 750px;
  height: 1050px;               /* 5:7 精确比例 */
  background: linear-gradient(135deg, #E8A0BF, #7EB8DA);
  border-radius: 24px;
  padding: 24px 18px;
  color: #FFFFFF;
  text-align: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* 海报装饰：顶部光斑 */
.poster::before,
.match-poster::before,
.invite-poster::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  filter: blur(40px);
}

/* 海报头部 */
.poster-header {
  margin-bottom: 24px;
}

.poster-header h2 {
  font-size: 82px;
  font-weight: 900;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 3px 15px rgba(0,0,0,0.25);
  letter-spacing: 3px;
}

/* 海报内容 */
.poster-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: space-between;
  padding: 18px 0;
}

/* 海报类型 */
.poster-type { 
  margin-bottom: 10px;
  width: 100%;
}

.poster-icon {
  /* 1. 放弃 flex，改用 block */
  display: block;
  text-align: center;
  
  width: 293px;
  height: 293px;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.5);
  
  /* 2. 强制指定 Emoji 字体，防止不同系统基线差异 */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 176px; /* 稍微缩小一点点，防止边缘被切 */
  
  /* 3. 核心定位：锁死高度，用 padding-top 强行把 Emoji 往下推到正中间 */
  box-sizing: border-box;
  line-height: 1;
  padding-top: 20px; /* 🌟 如果觉得偏上就调大，偏下就调小 */
}

.poster-type h3 {
  font-size: 133px;
  font-weight: 900;
  margin: 0 0 10px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.25);
  letter-spacing: 4px;
}

.poster-label {
  font-size: 59px;
  margin: 0;
  opacity: 0.95;
  font-weight: 700;
  letter-spacing: 2px;
}

/* 海报标签 */
.poster-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 5px 0;
  width: 100%;
  align-items: center;
}

.poster-tags span {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 28px;
  font-size: 39px;
  border: 2px solid rgba(255,255,255,0.5);
  font-weight: 700;
  letter-spacing: 1px;
  
  /* 1. 放弃 flex，改用 inline-block */
  display: inline-block;
  vertical-align: middle;
  
  /* 2. 核心定位：顶部 padding 给小一点（把字往上拉），底部给大一点撑开胶囊 */
  box-sizing: border-box;
  line-height: 1;
  padding: 7px 47px 27px 47px; /* 🌟 上 7px，下 27px，强行修正视觉居中 */
}

/* 海报核心文案 */
.poster-oneliner {
  font-size: 47px;
  line-height: 1.8;
  margin: 5px 0;
  font-style: italic;
  max-width: 90%;
  opacity: 0.95;
  font-weight: 600;
}

/* 海报分隔线 */
.poster-divider {
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  margin: 6px auto;
}

/* 海报相处模式 */
.poster-dynamics {
  font-size: 43px;
  line-height: 1.8;
  margin: 6px 0;
  max-width: 90%;
  opacity: 0.9;
  font-weight: 600;
}

/* 海报二维码 */
.poster-qrcode {
  margin-top: 8px;
  padding-top: 8px;
}

.poster-qrcode img {
  width: 312px;
  height: 312px;
  border-radius: 20px;
  background: #FFFFFF;
  padding: 16px;
  margin: 0 auto 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 4px solid rgba(255,255,255,0.4);
}

.poster-qrcode p {
  font-size: 35px;
  margin: 0;
  opacity: 0.95;
  font-weight: 700;
  letter-spacing: 1.5px;
}


/* ──── 匹配海报 ──── */
.match-poster-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: space-between;
  padding: 12px 0;
}

.match-poster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 0 12px;
}

.match-poster-person { flex: 1; }

.match-poster-person h3 {
  font-size: 55px;
  margin: 0 0 5px;
  font-weight: 800;
}

.match-poster-person p {
  font-size: 43px;
  margin: 0;
  opacity: 0.95;
  font-weight: 600;
}

.match-poster-score {
  flex: 1;
  text-align: center;
}

.match-poster-score-circle {
  width: 234px;
  height: 234px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 4px solid rgba(255,255,255,0.6);
  
  /* 1. 放弃 flex，改用 block */
  display: block;
  text-align: center;
  
  font-size: 70px;
  font-weight: 900;
  margin: 0 auto 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  
  /* 2. 核心定位：用 padding-top 精准控制数字的起始高度 */
  box-sizing: border-box;
  line-height: 1;
  padding-top: 65px; /* 🌟 (234 高度 - 70 字号)/2 ≈ 82，给 65 是为了稍微往上提一点 */
}

.match-poster-grade {
  font-size: 43px;
  margin: 0;
  opacity: 0.95;
  letter-spacing: 3px;
  font-weight: 800;
}

.match-poster-title {
  font-size: 62px;
  margin: 12px 0;
  line-height: 1.4;
  font-weight: 700;
}

.match-poster-dimensions {
  width: 100%;
  margin: 10px 0;
  padding: 0 12px;
}

.match-poster-dimension {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 7px;
  text-align: left;
  border: 1.5px solid rgba(255,255,255,0.25);
}

.match-poster-dimension h4 {
  font-size: 43px;
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  font-weight: 800;
}

.match-poster-dimension h4 span { margin-right: 7px; font-size: 47px; }

.match-poster-dimension .dimension-score {
  font-size: 35px;
  opacity: 0.85;
  margin: 0 0 5px;
  font-weight: 700;
}

.match-poster-dimension .dimension-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin: 5px 0;
}

.match-poster-dimension .dimension-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
}

.match-poster-dimension p {
  font-size: 35px;
  margin: 5px 0 0;
  opacity: 0.85;
  line-height: 1.6;
}


/* ──── 邀请海报 ──── */
.invite-poster-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: space-between;
  padding: 12px 0;
}

.invite-poster-title {
  font-size: 66px;
  margin: 12px 0;
  line-height: 1.4;
  font-weight: 800;
}

.invite-poster-info {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 14px;
  margin: 12px 0;
  border: 2px solid rgba(255,255,255,0.4);
  width: 100%;
  max-width: 500px;
}

.invite-poster-info p {
  margin: 7px 0;
  font-size: 47px;
  font-weight: 600;
}

.invite-poster-type {
  font-size: 78px;
  font-weight: 900;
  margin: 12px 0;
  letter-spacing: 3px;
}

.invite-poster-label {
  font-size: 55px;
  opacity: 0.95;
  font-weight: 700;
}


/* ──── 响应式 ──── */
@media (max-width: 768px) {
  .poster,
  .match-poster,
  .invite-poster {
    width: 90vw;
    height: auto;
    aspect-ratio: 5/7;
    padding: 14px 11px;
  }

  .poster-header h2 { font-size: 38px; }
  .poster-icon { 
    font-size: 81px; 
    width: 135px; 
    height: 135px; 
    line-height: 135px; /* 覆盖掉上面的设置 */
    padding-top: 9px;  /* 🌟 移动端等比缩小的 top 距离 */
  }
  .poster-type h3 { font-size: 61px; }
  .poster-label { font-size: 27px; }
  .poster-tags span { 
    font-size: 18px; 
    padding: 2px 22px 12px 22px; /* 🌟 移动端：上 2px，下 12px */
  }
  .poster-oneliner { font-size: 22px; }
  .poster-dynamics { font-size: 20px; }

  .match-poster-header { flex-direction: column; gap: 10px; }
  .match-poster-person h3 { font-size: 26px; }
  .match-poster-score-circle { 
    width: 108px; 
    height: 108px; 
    font-size: 32px; 
    padding-top: 30px; /* 🌟 移动端等比缩小的 top 距离 */
  }

  .invite-poster-title { font-size: 31px; }
  .invite-poster-info p { font-size: 22px; }
  .invite-poster-type { font-size: 36px; }

  .poster-qrcode img { width: 144px; height: 144px; }
  .poster-qrcode p { font-size: 16px; }
}