* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100vh;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: #ffb6b1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 600px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.letter-wrapper {
  perspective: 1000px;
  position: relative;
  width: 100%;
  height: 80vh;
  max-height: 600px;
}

/* 未打开状态 */
.letter-sheet {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff5e6 0%, #ffe6f0 100%);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 40px;
  text-align: center;
}

.letter-sheet:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.seal {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.seal-emoji {
  font-size: 60px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.seal-text {
  font-size: 18px;
  color: #666;
  font-weight: 500;
  letter-spacing: 2px;
}

/* 打开状态 */
.letter-content {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  overflow-y: auto;
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.letter-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 20px;
}

.letter-header h1 {
  font-size: 32px;
  color: #333;
  font-weight: 600;
}

.letter-body {
  line-height: 1.8;
  color: #555;
  text-align: justify;
  font-size: 15px;
  margin-bottom: 30px;
}

.letter-body p {
  margin-bottom: 20px;
  text-indent: 2em;
}


.highlight {
  color: #ff6b6b;
  font-weight: 600;
}

.final-line {
  text-align: center;
  font-size: 18px;
  margin: 40px 0 20px 0 !important;
  text-indent: 0 !important;
  font-style: italic;
}


.letter-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
  color: #888;
  font-size: 14px;
}

.signature {
  font-style: italic;
  margin-top: 10px;
  display: block;
}


.hidden {
  display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 10px;
  }

  .letter-wrapper {
    height: 85vh;
    max-height: none;
  }

  .letter-content {
    padding: 25px;
  }

  .letter-header h1 {
    font-size: 24px;
  }

  .letter-body {
    font-size: 14px;
  }

  .seal {
    width: 80px;
    height: 80px;
  }

  .seal-emoji {
    font-size: 40px;
  }
}
