/* 全局页面样式：移除min-height，改用height适配小程序 */
page {
  margin: 0;
  padding: 0;
  background-color: #fdf2f8;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm20 0a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM10 37a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm10-17h20v20H20V20zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14z' fill='%23e53e3e' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  font-family: "Microsoft Yahei", "SimHei", sans-serif;
  height: 100%; /* 修正：小程序page用height:100%替代100vh */
}

/* 外层容器：核心修正！确保flex居中生效 + 强层级 */
.marry-container {
  position: relative; /* 保留：让Canvas的absolute相对于这个容器 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh; /* 修正：用100vh强制占满屏幕，确保flex居中 */
  padding: 20rpx;
  overflow: hidden;
  cursor: pointer;
  z-index: 1; /* 新增：给外层容器加层级，确保内部元素不被覆盖 */
}

/* 烟花Canvas：不变（底层） */
.canvas {
  position: absolute;
  top: 0;
  left: 20;
  z-index: 0;
  width: 100%;
  height: 25%;
  pointer-events: none;
}

/* 倒计时容器：核心修正！z-index拉满，确保绝对顶层 */
.container {
  position: relative;
  z-index: 999; /* 修正：从1改为999，彻底碾压Canvas的层级 */
  width: 100%;
  max-width: 600rpx;
  padding: 40rpx;
  text-align: center;
  background: #fff;
  border: 4rpx solid #e53e3e;
  border-radius: 16rpx;
  box-shadow: 0 8rpx 32rpx rgba(229, 62, 62, 0.15);
}

/* 以下样式完全不变 */
.container::before {
  content: "❤️";
  position: absolute;
  top: 20rpx;
  left: 20rpx;
  font-size: 34rpx;
}

.container::after {
  content: "❤️";
  position: absolute;
  right: 20rpx;
  bottom: 20rpx;
  font-size: 34rpx;
}

.title {
  display: block;
  margin-bottom: 10rpx;
  font-size: 32rpx;
  font-weight: bold;
  color: #e53e3e;
}

.couple-name {
  margin: 30rpx 0;
  font-size: 28rpx;
  font-weight: 600;
  color: #d32f2f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16rpx;
}

.amp {
  color: #e53e3e;
}

.wedding-date {
  display: block;
  margin: 10rpx 0 20rpx;
  font-size: 20rpx;
  color: #e53e3e;
}

.subtitle {
  display: block;
  margin-bottom: 40rpx;
  font-size: 18rpx;
  color: #666;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 20rpx;
  flex-wrap: wrap;
  margin: 40rpx 0;
}

.time-box {
  min-width: 80rpx;
  padding: 20rpx 10rpx;
  background: #fef2f2;
  border: 2rpx solid #fecdd3;
  border-radius: 12rpx;
}

.time-number {
  display: block;
  font-size: 36rpx;
  font-weight: bold;
  color: #e53e3e;
  line-height: 1;
}

.time-label {
  display: block;
  margin-top: 8rpx;
  font-size: 14rpx;
  color: #d32f2f;
  letter-spacing: 2rpx;
}

.blessing {
  padding-top: 30rpx;
  margin-top: 30rpx;
  font-size: 20rpx;
  color: #888;
  border-top: 2rpx dashed #fecdd3;
}

.countdown-text {
  font-weight: 600;
  color: #e53e3e;
  margin-left: 8rpx;
}

.audio-control {
  margin-top: 30rpx;
  padding: 12rpx 32rpx;
  font-size: 16rpx;
  color: #fff;
  background: #e53e3e;
  border: none;
  border-radius: 8rpx;
}

.audio-control::after {
  border: none;
}

.audio-control:hover {
  background: #d32f2f;
}

.audio-tip {
  display: block;
  margin-top: 16rpx;
  font-size: 14rpx;
  color: #e53e3e;
}

.prepare-btn {
  position: fixed;
  right: 25rpx;
  bottom: 25rpx;
  width: 60rpx;
  height: 60rpx;
  line-height: 60rpx;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #e53e3e, #d32f2f);
  border-radius: 50%;
  font-size: 18rpx;
  font-weight: bold;
  box-shadow: 0 4rpx 16rpx rgba(229, 62, 62, 0.4);
}