*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red-deep: #7a0f0f;
  --red-main: #b91c1c;
  --red-light: #dc2626;
  --gold: #d4a853;
  --gold-light: #f5d78e;
  --gold-dark: #a67c2a;
  --cream: #fff8f0;
  --text-dark: #3d1515;
  --shadow: rgba(61, 21, 21, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Serif SC", "SimSun", serif;
  background: var(--red-deep);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

/* ===== 开场遮罩 ===== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(160deg, var(--red-deep) 0%, var(--red-main) 50%, #8b1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.cover.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-inner {
  text-align: center;
  padding: 2rem;
  animation: fadeUp 1s ease;
}

.cover-seal {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 3.5rem;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 30px rgba(212, 168, 83, 0.3);
  transform: rotate(-3deg);
}

.cover-title {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.8rem;
  color: var(--gold-light);
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.cover-sub {
  font-size: 1.3rem;
  color: var(--cream);
  letter-spacing: 0.5em;
  margin-bottom: 2.5rem;
}

.open-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--red-deep);
  border: none;
  border-radius: 50px;
  font-family: "Noto Serif SC", serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulse 2s infinite;
}

.open-btn:active {
  transform: scale(0.96);
}

.cover-tip {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 248, 240, 0.6);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(212, 168, 83, 0.5); }
  50% { box-shadow: 0 4px 35px rgba(212, 168, 83, 0.8); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 音乐按钮 ===== */
.music-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(122, 15, 15, 0.85);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.2s;
}

.music-btn.playing .music-icon {
  animation: spin 3s linear infinite;
}

.music-btn.paused {
  opacity: 0.7;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 主内容 ===== */
.main {
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
}

/* ===== 头部 Hero ===== */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-deep) 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212, 168, 83, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212, 168, 83, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-pattern {
  height: 24px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px,
    var(--gold) 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.4;
}

.hero-content {
  padding: 2rem 0;
  position: relative;
}

.hero-label {
  font-size: 0.95rem;
  color: var(--gold-light);
  letter-spacing: 0.8em;
  margin-bottom: 0.8rem;
}

.hero-name {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 3rem;
  color: var(--gold-light);
  line-height: 1.3;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.hero-name span {
  display: block;
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  margin-top: 0.3rem;
  color: var(--gold);
}

.hero-event {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--cream);
  letter-spacing: 0.3em;
}

.hero-divider {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

.hero-details {
  padding: 0.5rem 1rem;
  text-align: left;
}

.details-section {
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-deep) 100%);
  padding: 2rem 1.25rem;
}

.hero-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.hero-detail-item + .hero-detail-item {
  border-top: 1px dashed rgba(212, 168, 83, 0.25);
}

.hero-detail-label {
  flex-shrink: 0;
  width: 2.5em;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.2em;
}

.hero-detail-value {
  font-size: 0.95rem;
  color: var(--cream);
  line-height: 1.6;
  letter-spacing: 0.05em;
}

/* ===== 通用区块 ===== */
.section {
  padding: 2rem 1.25rem;
}

.section-title {
  text-align: center;
  font-size: 1.2rem;
  color: var(--red-main);
  letter-spacing: 0.4em;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 0.6rem auto 0;
}

/* ===== 邀请卡片 ===== */
.card {
  position: relative;
  background: #fff;
  border: 2px solid var(--gold);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
}

.card-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold-dark);
  border-style: solid;
}

.card-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.card-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.card-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.card-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.invite-text {
  font-size: 1rem;
  line-height: 2.2;
  color: var(--text-dark);
}

.invite-text strong {
  color: var(--red-main);
  font-weight: 700;
}

.invite-sign {
  margin-top: 1.5rem;
  color: var(--gold-dark);
  letter-spacing: 0.3em;
  font-size: 0.9rem;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--red-deep);
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: var(--gold-light);
}

.footer-seal {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer p {
  letter-spacing: 0.2em;
  font-size: 0.95rem;
}

.footer-sub {
  margin-top: 0.8rem;
  font-size: 0.8rem !important;
  color: rgba(245, 215, 142, 0.6) !important;
}
