/* letter.wxss (rpx->px) faithful port of packages/other/letter/index.wxss */
/* pages/letter/letter.wxss */

/* 全局样式 */
.container {
  min-height: 100vh;
  background-color: #E8EDE5;
  font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #3A4A3A;
}

/* Header样式 */
.header {
  padding: 32px 16px 16px;
  text-align: center;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-subtitle {
  font-size: 12px;
  font-weight: bold;
  color: #7A9E7E;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}

.header-title {
  font-size: 28px;
  font-weight: bold;
  color: #3D5A4C;
  letter-spacing: -0.02em;
}

.header-right {
  position: absolute;
  top: 32px;
  right: 16px;
}

.reset-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
}

.reset-btn::after {
  border: none;
}

.reset-icon {
  width: 9px;
  height: 9px;
  color: #999999;
}

/* 输入页面样式 */
.input-section {
  flex: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-content {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 40px;
}

.mail-icon-container {
  margin-bottom: 32px;
}

.mail-icon-bg {
  width: 100px;
  height: 100px;
  background-color: #F5F5F5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mail-icon {
  width: 44px;
  height: 44px;
  color: #3D5A4C;
}

.input-text {
  padding: 0 8px;
}

.input-quote {
  font-size: 20px;
  font-weight: bold;
  color: #333333;
  line-height: 1.4;
  display: block;
  margin-bottom: 8px;
}

.input-hint {
  font-size: 14px;
  color: #999999;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.input-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.birthday-input-container {
  background-color: #FFFFFF;
  border-radius: 17.5px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 0.5px solid #EEEEEE;
}

.calendar-icon {
  width: 14px;
  height: 14px;
  color: #7A9E7E;
}

.birthday-input {
  flex: 1;
  font-size: 15px;
  font-weight: bold;
  color: #333333;
  letter-spacing: 0.2em;
  border: none;
  background: transparent;
}

.birthday-input::placeholder {
  color: #E0E0E0;
}

.start-btn {
  width: 100%;
  background-color: #E8EDE5;
  color: #3D5A4C;
  font-weight: bold;
  padding: 12px;
  border-radius: 15px;
  font-size: 18px;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 0.5px solid #C8D5C2;
}

.start-btn::after {
  border: none;
}

.start-btn:active {
  transform: scale(0.98);
}

.start-btn-disabled {
  opacity: 0.5;
}

.arrow-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #3D5A4C;
  flex-shrink: 0;
  transform: none;
}

.footer-text {
  text-align: center;
  margin-bottom: 32px;
}

.footer-text text {
  font-size: 10px;
  color: #CCCCCC;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* 计算页面样式 */
.calculating-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.calculating-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.spinner-container {
  position: relative;
  width: 64px;
  height: 64px;
}

.spinner {
  width: 100%;
  height: 100%;
  border: 8px solid rgba(197, 160, 89, 0.1);
  border-top: 8px solid rgba(197, 160, 89, 0.3);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-img {
  width: 20px;
  height: 20px;
  color: #7A9E7E;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.calculating-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calculating-title {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #3D5A4C;
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

.calculating-steps {
  background-color: #3D5A4C;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.05);
}

.calc-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calc-step-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.calc-step-value {
  font-size: 14px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  font-family: 'Courier New', monospace;
}

.calc-divider {
  height: 0.5px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-result-label {
  font-size: 10px;
  font-weight: bold;
  color: #7A9E7E;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.calc-result-value {
  font-size: 30px;
  font-weight: bold;
  color: #FFFFFF;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-3px); }
}

/* 信件页面样式 */
.letter-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.letter-container {
  flex: 1;
  background-color: #FFFDF9;
  margin: 8px 0;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  padding: 20px 16px 80px;
  position: relative;
  border-left: 0.5px solid rgba(200, 213, 194, 0.5);
  border-top: 0.5px solid rgba(200, 213, 194, 0.5);
  border-right: 0.5px solid rgba(200, 213, 194, 0.5);
  overflow: hidden;
}

.letter-watermark {
  position: absolute;
  top: 20px;
  right: 20px;
  opacity: 0.1;
  transform: rotate(12deg);
  pointer-events: none;
  user-select: none;
}

.watermark-circle {
  width: 48px;
  height: 48px;
  border: 2px solid #3D5A4C;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watermark-content {
  text-align: center;
}

.watermark-original {
  font-size: 8px;
  font-weight: bold;
  display: block;
}

.watermark-number {
  font-size: 30px;
  font-weight: bold;
}

.watermark-text {
  font-size: 7px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
  text-align: center;
}

.letter-header {
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.letter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #3D5A4C;
  color: #7A9E7E;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.letter-title {
  font-size: 28px;
  font-weight: bold;
  color: #333333;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.letter-content {
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.letter-body {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  line-height: 2.2;
  text-align: justify;
  letter-spacing: 0.05em;
  font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  white-space: pre-wrap;
}

.letter-footer {
  margin-top: 24px;
  border-top: 0.5px solid rgba(200, 213, 194, 0.5);
  padding-top: 24px;
  position: relative;
  z-index: 10;
}

.letter-notice {
  background-color: rgba(6, 78, 59, 0.05);
  border-radius: 22.5px;
  padding: 16px;
  margin-bottom: 20px;
  border: 0.5px solid rgba(200, 213, 194, 0.3);
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.notice-icon {
  width: 10px;
  height: 10px;
  color: #3D5A4C;
}

.notice-title {
  font-size: 10px;
  font-weight: bold;
  color: #3D5A4C;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.notice-content {
  font-size: 13px;
  color: #3D5A4C;
  font-weight: 400;
  line-height: 1.6;
  font-style: normal;
}

.letter-signature {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-bottom: 24px;
}

.signature-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 4px;
}

.signature-subtitle {
  font-size: 10px;
  color: #999999;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.signature-name {
  font-size: 20px;
  font-weight: bold;
  color: #333333;
  font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.signature-wechat {
  font-size: 14px;
  color: #333333;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.signature-contact {
  margin-top: 8px;
}

.contact-text {
  font-size: 14px;
  color: #333333;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* 底部操作栏样式 */
.letter-actions {
  position: relative;
  margin-top: 16px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.95), transparent);
  padding: 16px;
  display: flex;
  justify-content: center;
}

.action-btn {
  width: 100%;
  padding: 12px;
  border-radius: 17.5px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-btn::after {
  border: none;
}

.action-btn:active {
  transform: scale(0.95);
}

.consult-btn {
  background-color: #3D5A4C;
  color: #7A9E7E;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-text {
  letter-spacing: 0.05em;
}

/* 响应式调整 */
@media (max-width: 375px) {
  .header-title {
    font-size: 24px;
  }
  
  .input-quote {
    font-size: 18px;
  }
  
  .letter-title {
    font-size: 24px;
  }
  
  .letter-body {
    font-size: 15px;
  }
}

/* ===== 核心性格数解读（合并自文档 9 核心性格数） ===== */
.core-analysis { margin-top: 4px; }
.core-divider { height: .5px; background: rgba(200,213,194,.5); margin: 12px 0 20px; }
.core-head { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.core-head-title { font-size: 16px; font-weight: bold; color: #3D5A4C; letter-spacing: .03em; }

.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-dot { width: 8px; height: 8px; border-radius: 50%; background: #3D5A4C; flex-shrink: 0; }
.section-title {
  font-size: 12px;
  font-weight: bold;
  color: #3D5A4C;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.section-text {
  font-size: 14px;
  color: #666;
  line-height: 2;
  text-align: justify;
  letter-spacing: .03em;
  white-space: pre-wrap;
}

.advice-card {
  background: rgba(61,90,76,.04);
  border: .5px solid rgba(200,213,194,.4);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.advice-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.advice-index {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #3D5A4C;
  color: #fff;
  font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.advice-title { font-size: 15px; font-weight: bold; color: #333; }
.advice-row { display: flex; gap: 8px; margin-top: 8px; }
.advice-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
}
.advice-tag.how { background: rgba(61,90,76,.12); color: #3D5A4C; }
.advice-tag.why { background: rgba(122,158,126,.18); color: #4a6b50; }
.advice-text { font-size: 13px; color: #555; line-height: 1.7; }

.theme-block {
  background: rgba(6,78,59,.05);
  border-radius: 22.5px;
  padding: 18px 16px;
  border: .5px solid rgba(200,213,194,.3);
}
.theme-quote {
  font-size: 14px;
  color: #555;
  line-height: 2;
  text-align: left;
  letter-spacing: .03em;
  white-space: pre-wrap;
}
.theme-keywords { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 14px; }
.theme-keyword {
  font-size: 12px;
  color: #4a6b50;
  background: rgba(122,158,126,.18);
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: .05em;
}

/* ===== 核心性格数 · 局部付费墙（免费展示潜能私信，付费解锁深度解读） ===== */
.core-analysis { position: relative; }

.core-content { transition: filter .45s ease; }

.core-analysis.locked .core-content {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.core-lock {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: linear-gradient(to bottom, rgba(255,253,249,.55) 0%, rgba(255,253,249,.92) 40%, rgba(255,253,249,.98) 100%);
  border-radius: 16px;
}
.core-analysis:not(.locked) .core-lock { display: none; }

.core-lock-card {
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(122, 158, 126, 0.4);
  border-radius: 20px;
  padding: 26px 22px 22px;
  box-shadow: 0 18px 44px rgba(45, 55, 45, 0.18);
}
.core-lock-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .15em;
  color: #7A9E7E;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(122, 158, 126, .15);
  margin-bottom: 12px;
}
.core-lock-title {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  color: #3D5A4C;
  margin-bottom: 8px;
}
.core-lock-sub {
  font-size: 13px;
  color: #8A9A8A;
  line-height: 1.7;
  margin: 0 0 20px;
}
.core-unlock-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #7A9E7E, #5F8A6A);
  transition: transform .15s, opacity .2s;
}
.core-unlock-btn:active { transform: scale(.98); }
.core-lock-foot {
  margin-top: 14px;
  font-size: 11px;
  color: #a8b3a8;
}
