/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #fef6e4;
  color: #5a4a42;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 动态背景 */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(45deg, #fef6e4, #fce8d5, #f9d8b4, #f8c291);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.section,
.page {
  display: none;
  animation: fadeIn 0.8s ease;
}

.section.active,
.page.active {
  display: block;
}

.container {
  padding: 20px;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

h1,
h2 {
  color: #e67e22;
  margin-bottom: 20px;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  margin-top: 20px;
}

h2 {
  font-size: 2rem;
  margin-top: 10px;
}

p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.sub {
  font-size: 1rem;
  color: #8e7d6f;
  margin-bottom: 20px;
}

/* 按钮样式 */
button {
  background-color: #e67e22;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

button:hover {
  background-color: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(230, 126, 34, 0.4);
}

button.option-btn {
  background-color: #f8c291;
  color: #5a4a42;
  margin: 5px;
}

button.option-btn:hover {
  background-color: #f39c12;
  color: white;
}

button.option-btn.selected {
  background-color: #e67e22;
  color: white;
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 600px;
  backdrop-filter: blur(5px);
}

/* 猫咪形象 */
.hero-cat {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 5px solid #f8c291;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
  background: linear-gradient(135deg, #ffeaa7, #f7dc6f);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero-cat:hover .cat-tail {
  animation: tail-wag 1s infinite ease-in-out;
}

.hero-cat:hover .cat-ear {
  animation: ear-flap 1s infinite;
}

.hero-cat:hover .cat-eye {
  animation: blink 2s infinite;
}

.cat-body {
  position: relative;
  width: 120px;
  height: 100px;
  background: #ffd96a;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cat-ear {
  position: absolute;
  top: -20px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid #e7b85d;
  z-index: -1;
  transform-origin: bottom center;
  animation: ear-flap 6s infinite;
}

.cat-ear.left {
  left: 20px;
  transform: rotate(-20deg);
}

.cat-ear.right {
  right: 20px;
  transform: rotate(20deg);
}

@keyframes ear-flap {
  0%,
  90% {
    transform: rotate(0deg);
  }
  92% {
    transform: rotate(5deg);
  }
  94% {
    transform: rotate(-5deg);
  }
  96% {
    transform: rotate(5deg);
  }
  98% {
    transform: rotate(0deg);
  }
}

.cat-face {
  position: relative;
  width: 90px;
  height: 80px;
  border-radius: 50%;
  background: #fff2c5;
}

.cat-eye {
  position: absolute;
  width: 20px;
  height: 25px;
  background: #5a4a42;
  border-radius: 50%;
  top: 25px;
  overflow: hidden;
  transition: height 0.1s ease;
}

.cat-eye.left {
  left: 15px;
}

.cat-eye.right {
  right: 15px;
}

.cat-eye::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  top: 5px;
  left: 5px;
}

.cat-pupil {
  position: absolute;
  width: 4px;
  height: 8px;
  background: #333;
  border-radius: 2px;
  top: 9px;
  left: 8px;
  animation: pupil-move 8s infinite;
}

@keyframes pupil-move {
  0%,
  20% {
    transform: translateX(0);
  }
  25%,
  45% {
    transform: translateX(3px);
  }
  50%,
  70% {
    transform: translateX(0);
  }
  75%,
  95% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

.cat-nose {
  position: absolute;
  width: 12px;
  height: 8px;
  background: #ff9aa2;
  border-radius: 50%;
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
}

.cat-mouth {
  position: absolute;
  width: 20px;
  height: 10px;
  border-bottom: 2px solid #5a4a42;
  border-radius: 0 0 50% 50%;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
}

.cat-whisker {
  position: absolute;
  height: 1px;
  background: #5a4a42;
  top: 50px;
  transition: all 0.5s ease;
}

.cat-whisker.left-1 {
  width: 20px;
  left: 5px;
  transform: rotate(10deg);
}

.cat-whisker.left-2 {
  width: 20px;
  left: 5px;
  top: 55px;
  transform: rotate(0deg);
}

.cat-whisker.left-3 {
  width: 20px;
  left: 5px;
  top: 60px;
  transform: rotate(-10deg);
}

.cat-whisker.right-1 {
  width: 20px;
  right: 5px;
  transform: rotate(-10deg);
}

.cat-whisker.right-2 {
  width: 20px;
  right: 5px;
  top: 55px;
  transform: rotate(0deg);
}

.cat-whisker.right-3 {
  width: 20px;
  right: 5px;
  top: 60px;
  transform: rotate(10deg);
}

.cat-blush {
  position: absolute;
  width: 15px;
  height: 8px;
  background: rgba(255, 150, 150, 0.4);
  border-radius: 50%;
  top: 45px;
}

.cat-blush.left {
  left: 5px;
}

.cat-blush.right {
  right: 5px;
}

.blink {
  animation: blink 3s infinite;
}

@keyframes blink {
  0%,
  90%,
  100% {
    height: 25px;
  }
  95% {
    height: 2px;
  }
}

.cat-tail {
  position: absolute;
  right: -30px;
  bottom: 20px;
  width: 60px;
  height: 10px;
  background: #ffd96a;
  border-radius: 5px;
  transform-origin: left center;
  animation: tail-wag 3s infinite ease-in-out;
}

@keyframes tail-wag {
  0%,
  20%,
  40%,
  60%,
  80%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30%,
  50%,
  70% {
    transform: rotate(20deg);
  }
  90% {
    transform: rotate(-20deg);
  }
}

.cat-paw {
  position: absolute;
  width: 20px;
  height: 10px;
  background: #e7b85d;
  border-radius: 50%;
  bottom: -5px;
}

.cat-paw.left {
  left: 30px;
  animation: paw-move 2s infinite alternate;
}

.cat-paw.right {
  right: 30px;
  animation: paw-move 2.5s infinite alternate-reverse;
}

@keyframes paw-move {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

.cat-belly {
  position: absolute;
  width: 40px;
  height: 30px;
  background: #ffeaa7;
  border-radius: 50%;
  bottom: 20px;
}

.cat-heart {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #ff6b6b;
  transform: rotate(45deg);
  bottom: 25px;
  right: 30px;
  animation: heartbeat 1.5s infinite;
}

.cat-heart:before,
.cat-heart:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background: #ff6b6b;
  border-radius: 50%;
}

.cat-heart:before {
  top: -7.5px;
  left: 0;
}

.cat-heart:after {
  top: 0;
  left: -7.5px;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: rotate(45deg) scale(1);
  }
  50% {
    transform: rotate(45deg) scale(1.2);
  }
}

/* 故事文字 */
.story p {
  margin-bottom: 15px;
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s forwards;
}

.story p:nth-child(1) {
  animation-delay: 0.5s;
}
.story p:nth-child(2) {
  animation-delay: 1.2s;
}
.story p:nth-child(3) {
  animation-delay: 1.9s;
}
.story p:nth-child(4) {
  animation-delay: 2.6s;
}
.story p:nth-child(5) {
  animation-delay: 3.3s;
}
.story p:nth-child(6) {
  animation-delay: 4s;
}
.story p:nth-child(7) {
  animation-delay: 4.7s;
}
.story p:nth-child(8) {
  animation-delay: 5.4s;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 问卷部分 */
.q-wrap {
  position: relative;
  min-height: 400px;
  background: #f8c291;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  border: 10px solid #e67e22;
  overflow: hidden;
}

.q-wrap::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 30px;
  background: #d35400;
  border-radius: 15px 15px 0 0;
  z-index: -1;
}

.q-wrap::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: #e67e22;
  border-radius: 10px 10px 0 0;
}

.q-wrap .cat-decoration {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #ffd96a;
  border-radius: 50%;
  bottom: 20px;
  right: 20px;
  z-index: 1;
}

.q-wrap .cat-decoration::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: #5a4a42;
  border-radius: 50%;
  top: 15px;
  left: 15px;
}

.q-wrap .cat-decoration::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  top: 20px;
  left: 20px;
}

.q-wrap .cat-tail {
  position: absolute;
  width: 40px;
  height: 5px;
  background: #e7b85d;
  bottom: 30px;
  right: -10px;
  border-radius: 5px;
  transform: rotate(30deg);
}

.q {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin: 10px;
  position: relative;
  backdrop-filter: blur(5px);
}

.q.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.q::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 30px;
  width: 30px;
  height: 30px;
  background: #f8c291;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.q::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 37px;
  width: 16px;
  height: 16px;
  background: #e67e22;
  border-radius: 50%;
}

.options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 15px;
  border: 2px solid #f8c291;
  border-radius: 10px;
  font-size: 1rem;
  background-color: #fffdf9;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #e67e22;
}

/* 支付页面 */
.pay-img {
  width: 200px;
  height: 200px;
  border: 5px solid #f8c291;
  border-radius: 10px;
  margin: 20px 0;
}

/* 信件页面 */
#letterCard {
  background: #fffdf9;
  border: 2px dashed #f8c291;
  padding: 30px;
  line-height: 1.8;
}

#letterText {
  white-space: pre-line;
  text-align: left;
  margin: 20px 0;
}

/* 音乐控制 */
.music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 100;
}

.music-control i {
  font-size: 1.5rem;
  color: #e67e22;
}

/* 进度指示器 */
.progress {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 8px;
  flex-wrap: wrap;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #f8c291;
  transition: background-color 0.3s;
}

.progress-dot.active {
  background-color: #e67e22;
}

/* 分享按钮 */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.share-btn:hover {
  transform: scale(1.1);
}

.wechat {
  background-color: #07c160;
}

.weibo {
  background-color: #e6162d;
}

.qq {
  background-color: #12b7f5;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: float 4s ease-in-out infinite;
}

/* 猫咪小窝样式 */
.cat-home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 20px;
  text-align: center;
}

.cat-home {
  position: relative;
  width: 300px;
  height: 250px;
  margin-bottom: 30px;
}

.cat-home-roof {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: linear-gradient(to bottom, #e67e22, #d35400);
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
  z-index: 2;
}

.cat-home-body {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 140px;
  background: #f8c291;
  border-radius: 10px;
  z-index: 1;
}

.cat-home-window {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: #8e7d6f;
  border-radius: 50%;
  border: 5px solid #fffdf9;
}

.cat-home-window::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 5px;
  background: #fffdf9;
  transform: translateY(-50%);
}

.cat-home-window::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 100%;
  background: #fffdf9;
  transform: translateX(-50%);
}

.cat-home-door {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 70px;
  background: #8e7d6f;
  border-radius: 20px 20px 5px 5px;
}

.cat-home-heart {
  position: absolute;
  bottom: 10px;
  right: 20px;
  width: 20px;
  height: 20px;
  background: #ff6b6b;
  transform: rotate(45deg);
}

.cat-home-heart::before,
.cat-home-heart::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: #ff6b6b;
  border-radius: 50%;
}

.cat-home-heart::before {
  top: -10px;
  left: 0;
}

.cat-home-heart::after {
  top: 0;
  left: -10px;
}

.cat-home-cat {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.cat-home-head {
  position: relative;
  width: 60px;
  height: 50px;
  background: #ffd96a;
  border-radius: 50%;
  margin: 0 auto;
}

.cat-home-ear {
  position: absolute;
  top: -15px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid #e7b85d;
  z-index: -1;
}

.cat-home-ear.left {
  left: 5px;
  transform: rotate(-20deg);
}

.cat-home-ear.right {
  right: 5px;
  transform: rotate(20deg);
}

.cat-home-eye {
  position: absolute;
  width: 10px;
  height: 15px;
  background: #5a4a42;
  border-radius: 50%;
  top: 15px;
}

.cat-home-eye.left {
  left: 10px;
}

.cat-home-eye.right {
  right: 10px;
}

.cat-home-eye::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
}

.cat-home-nose {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 5px;
  background: #ff9aa2;
  border-radius: 50%;
}

.cat-home-mouth {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 8px;
  border-bottom: 2px solid #5a4a42;
  border-radius: 0 0 50% 50%;
}

.cat-home-cat .cat-home-body-main {
  position: relative;
  width: 80px;
  height: 40px;
  background: #ffd96a;
  border-radius: 40px 40px 20px 20px;
  margin-top: -10px;
}

.cat-home-tail {
  position: absolute;
  right: -30px;
  top: 10px;
  width: 40px;
  height: 6px;
  background: #e7b85d;
  border-radius: 3px;
  transform: rotate(30deg);
}

.welcome-text {
  color: #e67e22;
  margin-bottom: 10px;
  font-size: 2rem;
  animation: fadeIn 1s ease;
}

.sub-text {
  color: #8e7d6f;
  margin-bottom: 30px;
  font-size: 1.2rem;
  animation: fadeIn 1s ease 0.3s forwards;
  opacity: 0;
}

/* 信件页面 */
#letterCard {
  background: #fffdf9;
  border: 2px dashed #f8c291;
  padding: 30px;
  line-height: 1.8;
}

#letterText {
  white-space: pre-line;
  text-align: left;
  margin: 20px 0;
}

/* 回信页面样式 */
.letter-container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  position: relative;
}

.letter-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.letter-header h2 {
  color: #e67e22;
  font-size: 1.8rem;
  margin: 20px 0 10px;
  position: relative;
  display: inline-block;
}

.letter-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #f8c291;
  border-radius: 3px;
}

/* 猫咪邮票样式 */
.cat-stamp {
  position: absolute;
  top: -60px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: #fff;
  border: 3px dashed #e67e22;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cat-stamp-body {
  position: relative;
  width: 50px;
  height: 40px;
  background: #ffd96a;
  border-radius: 50%;
}

.cat-stamp-ear {
  position: absolute;
  top: -10px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 15px solid #e7b85d;
  z-index: -1;
}

.cat-stamp-ear.left {
  left: 5px;
  transform: rotate(-20deg);
}

.cat-stamp-ear.right {
  right: 5px;
  transform: rotate(20deg);
}

.cat-stamp-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.cat-stamp-eye {
  position: absolute;
  width: 6px;
  height: 8px;
  background: #5a4a42;
  border-radius: 50%;
  top: 12px;
}

.cat-stamp-eye.left {
  left: 10px;
}

.cat-stamp-eye.right {
  right: 10px;
}

.cat-stamp-mouth {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 5px;
  border-bottom: 2px solid #5a4a42;
  border-radius: 0 0 50% 50%;
}

.cat-stamp-tail {
  position: absolute;
  right: -15px;
  top: 15px;
  width: 25px;
  height: 4px;
  background: #e7b85d;
  border-radius: 2px;
  transform: rotate(30deg);
}

.letter-card {
  background: #fffdf9;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  border: 1px solid #f8e7d0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  background-image: url("https://img.alicdn.com/imgextra/i4/2215755995/O1CN01d8kLaD1Yyg2d2mf8p_!!2215755995.png");
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 30%;
}

.letter-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(255, 217, 106, 0.05) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(230, 126, 34, 0.05) 0%,
      transparent 20%
    );
  border-radius: 20px;
  pointer-events: none;
}

/* 猫咪互动区域样式 */
.pet-cat-container {
  margin: 30px 0;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.pet-cat-container.show {
  opacity: 1;
  transform: translateY(0);
}

.pet-cat-area {
  position: relative;
  width: 200px;
  height: 150px;
  margin: 0 auto;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pet-cat-image {
  max-width: 100%;
  max-height: 100%;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.pet-cat-area:active .pet-cat-image {
  transform: scale(0.95);
}

.pet-instructions {
  margin-top: 15px;
  color: #8e7d6f;
  font-size: 0.9rem;
  font-style: italic;
}

/* 保存和分享按钮 */
#letter button {
  background: #e67e22;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  margin: 30px 0 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

#letter button:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}
.cat-tail {
  position: absolute;
  right: -20px;
  top: 10px;
  width: 40px;
  height: 6px;
  background: #e7b85d;
  border-radius: 3px;
  transform-origin: left center;
  animation: tailWag 2s infinite ease-in-out;
}

.cat-paw {
  position: absolute;
  width: 15px;
  height: 10px;
  background: #e7b85d;
  border-radius: 50%;
  bottom: -5px;
}

.cat-paw.front-left {
  left: 15px;
}

.cat-paw.front-right {
  right: 15px;
}

.cat-paw.back-left {
  left: 25px;
}

.cat-paw.back-right {
  right: 25px;
}

/* 猫咪尾巴摆动动画 */
@keyframes tailWag {
  0%,
  100% {
    transform: rotate(-20deg);
  }
  50% {
    transform: rotate(20deg);
  }
}

/* 猫咪被抚摸时的动画 */
.cat-character.petted {
  animation: catPetted 0.5s ease;
}

@keyframes catPetted {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

.pet-instructions {
  margin-top: 15px;
  color: #8e7d6f;
  font-size: 0.9rem;
  font-style: italic;
}

.letter-content {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #5a4a42;
  white-space: pre-wrap;
}

.letter-content p {
  margin: 0 0 20px 0;
  opacity: 0;
  transform: translateY(15px);
}

.letter-signature {
  text-align: right;
  margin-top: 30px;
  font-style: italic;
  color: #e67e22;
  font-weight: 500;
  opacity: 0;
  transform: translateY(15px);
}

/* 文字逐行出现动画 */
@keyframes letterLineFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 1.2rem;
}

/* 信件页面 */
#letterCard {
  background: #fffdf9;
  border: 2px dashed #f8c291;
  padding: 30px;
  line-height: 1.8;
}

#letterText {
  white-space: pre-line;
  text-align: left;
  margin: 20px 0;
}

/* 主人故事页面样式 */
.story-content {
  text-align: left;
  line-height: 1.8;
  margin: 25px 0;
}

.story-content p {
  margin-bottom: 15px;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s forwards;
}

.story-content p:nth-child(1) {
  animation-delay: 0.5s;
}
.story-content p:nth-child(2) {
  animation-delay: 1.2s;
}
.story-content p:nth-child(3) {
  animation-delay: 1.9s;
}
.story-content p:nth-child(4) {
  animation-delay: 2.6s;
}
.story-content p:nth-child(5) {
  animation-delay: 3.3s;
}
.story-content p:nth-child(6) {
  animation-delay: 4s;
}
.story-content p:nth-child(7) {
  animation-delay: 4.7s;
}
.story-content p:nth-child(8) {
  animation-delay: 5.4s;
}
.story-content p:nth-child(9) {
  animation-delay: 6.1s;
}
.story-content p:nth-child(10) {
  animation-delay: 6.8s;
}
.story-content p:nth-child(11) {
  animation-delay: 7.5s;
}
.story-content p:nth-child(12) {
  animation-delay: 8.2s;
}
.story-content p:nth-child(13) {
  animation-delay: 8.9s;
}
.story-content p:nth-child(14) {
  animation-delay: 9.6s;
}
.story-content p:nth-child(15) {
  animation-delay: 10.3s;
}
.story-content p:nth-child(16) {
  animation-delay: 11s;
}
.story-content p:nth-child(17) {
  animation-delay: 11.7s;
}

.signature {
  font-style: italic;
  color: #e67e22;
  font-weight: 500;
  margin-top: 20px;
}

.contact-info {
  color: #8e7d6f;
  font-size: 0.9rem;
  margin: 5px 0;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* 回信页面样式 */
.letter-container {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.share-btn.wechat {
  background: #07c160;
}

.share-btn.weibo {
  background: #e6162d;
}

.share-btn.qq {
  background: #12b7f5;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .card {
    padding: 20px;
  }

  .options {
    flex-direction: column;
  }

  .cat-home {
    width: 250px;
    height: 220px;
  }

  .cat-home-roof {
    width: 170px;
    height: 85px;
  }

  .cat-home-body {
    width: 150px;
    height: 120px;
    top: 70px;
  }

  .welcome-text {
    font-size: 1.8rem;
  }

  .sub-text {
    font-size: 1.1rem;
  }

  .letter-card {
    padding: 30px 20px;
  }

  .letter-content {
    font-size: 1rem;
  }

  .cat-stamp {
    top: -50px;
    right: 10px;
    width: 70px;
    height: 70px;
  }
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}