:root {
    --red-deep: #8b0000;
    --red-main: #c41e3a;
    --red-bright: #e8364f;
    --gold: #d4af37;
    --gold-light: #f5d76e;
    --gold-pale: #fff8e7;
    --cream: #fff9f0;
    --text-dark: #3d1a1a;
    --text-muted: #7a5555;
    --shadow: 0 20px 60px rgba(139, 0, 0, 0.18);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.15), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(196, 30, 58, 0.12), transparent 45%),
        linear-gradient(160deg, #1a0505 0%, #3d0a0a 35%, #5c1010 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.7;
}

.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: bgDrift 20s ease-in-out infinite alternate;
}

@keyframes bgDrift {
    from { transform: scale(1) translateY(0); }
    to   { transform: scale(1.05) translateY(-10px); }
}

/* 背景装饰层 */
.fx-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.fx-lantern {
    position: absolute;
    font-size: 28px;
    opacity: 0.35;
    filter: drop-shadow(0 4px 8px rgba(196, 30, 58, 0.3));
    animation: floatLantern 8s ease-in-out infinite;
}

.fx-l1 { top: 12%; left: 8%; animation-delay: 0s; }
.fx-l2 { top: 20%; right: 10%; animation-delay: -3s; font-size: 22px; }

.fx-xi {
    position: absolute;
    font-weight: 900;
    color: rgba(212, 175, 55, 0.12);
    animation: floatXi 12s ease-in-out infinite;
}

.fx-x1 { top: 8%;  right: 18%; font-size: 48px; animation-delay: -2s; }
.fx-x2 { bottom: 25%; left: 5%;  font-size: 36px; animation-delay: -5s; }
.fx-x3 { bottom: 15%; right: 6%; font-size: 42px; animation-delay: -8s; }

@keyframes floatLantern {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50%      { transform: translateY(-18px) rotate(5deg); }
}

@keyframes floatXi {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
    50%      { transform: translateY(-12px) rotate(8deg); opacity: 0.18; }
}

/* 金粉粒子 */
.fx-sparkle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: sparkleFall linear forwards;
    box-shadow: 0 0 6px var(--gold);
}

@keyframes sparkleFall {
    0%   { opacity: 0; transform: translateY(0) scale(0); }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(100vh) scale(1); }
}

/* 卡片入场 */
.animate-card {
    animation: cardEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

.animate-item {
    opacity: 1;
}

html.js .animate-item {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

/* 滚动显现：默认可见，避免 JS 未加载时整页空白 */
.reveal {
    opacity: 1;
    transform: none;
}

html.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal.visible .section-title,
.reveal.visible .venue-intro,
.reveal.visible .info-grid,
.reveal.visible .venue-showcase,
.reveal.visible .hotel-callout,
.reveal.visible .hotel-gallery,
.reveal.visible .rsvp-form,
.reveal.visible .greeting,
.reveal.visible .guest-box {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal.visible .section-title  { animation-delay: 0.05s; }
.reveal.visible .greeting,
.reveal.visible .venue-intro     { animation-delay: 0.1s; }
.reveal.visible .guest-box,
.reveal.visible .venue-showcase  { animation-delay: 0.15s; }
.reveal.visible .info-grid,
.reveal.visible .hotel-callout   { animation-delay: 0.2s; }
.reveal.visible .hotel-gallery,
.reveal.visible .rsvp-form       { animation-delay: 0.25s; }

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    position: relative;
    z-index: 1;
}

.invite-card {
    background: linear-gradient(180deg, #fffef9 0%, var(--cream) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.5);
    position: relative;
}

.invite-card::before,
.invite-card::after {
    content: "囍";
    position: absolute;
    font-size: 120px;
    color: rgba(196, 30, 58, 0.06);
    font-weight: bold;
    z-index: 0;
    animation: xiFloat 10s ease-in-out infinite;
}

.invite-card::before { top: 40px; left: -20px; transform: rotate(-15deg); }
.invite-card::after  { bottom: 60px; right: -20px; transform: rotate(15deg); animation-name: xiFloatAlt; animation-delay: -5s; }

@keyframes xiFloat {
    0%, 100% { opacity: 0.06; transform: rotate(-15deg) scale(1); }
    50%      { opacity: 0.1; transform: rotate(-12deg) scale(1.03); }
}

@keyframes xiFloatAlt {
    0%, 100% { opacity: 0.06; transform: rotate(15deg) scale(1); }
    50%      { opacity: 0.1; transform: rotate(18deg) scale(1.03); }
}

.card-inner {
    position: relative;
    z-index: 1;
}

.hero {
    background: linear-gradient(135deg, var(--red-deep) 0%, var(--red-main) 50%, #a01830 100%);
    background-size: 200% 200%;
    animation: heroGradient 8s ease infinite;
    color: #fff;
    text-align: center;
    padding: 48px 24px 40px;
    position: relative;
    overflow: hidden;
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
    animation: heroGlow 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    50%      { transform: translate(10%, 5%); opacity: 1; }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.25), transparent 60%),
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.02) 20px, rgba(255,255,255,0.02) 40px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    border: 1px solid var(--gold-light);
    color: var(--gold-light);
    padding: 4px 20px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 4px;
    margin-bottom: 20px;
    animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 215, 110, 0.2); }
    50%      { box-shadow: 0 0 20px rgba(245, 215, 110, 0.45); }
}

.hero h1 {
    font-size: clamp(36px, 8vw, 52px);
    font-weight: 900;
    letter-spacing: 8px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff 0%, var(--gold-light) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 4s linear infinite;
}

@keyframes titleShine {
    to { background-position: 200% center; }
}

@supports not (background-clip: text) {
    .hero h1 {
        -webkit-text-fill-color: #fff;
        background: none;
        animation: none;
    }
}

.hero .subtitle {
    font-size: 16px;
    opacity: 0.9;
    letter-spacing: 2px;
    margin-bottom: 28px;
}

.date-block {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 16px 36px;
    backdrop-filter: blur(4px);
    animation: datePulse 3s ease-in-out infinite;
}

@keyframes datePulse {
    0%, 100% { transform: scale(1); border-color: rgba(212, 175, 55, 0.4); }
    50%      { transform: scale(1.02); border-color: rgba(212, 175, 55, 0.7); }
}

.date-block .year { font-size: 14px; opacity: 0.85; letter-spacing: 3px; }
.date-block .date { font-size: 28px; font-weight: 700; color: var(--gold-light); letter-spacing: 4px; margin: 4px 0; }
.date-block .weekday { font-size: 14px; opacity: 0.85; }

.section {
    padding: 32px 28px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.35);
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    text-align: center;
    font-size: 20px;
    color: var(--red-main);
    letter-spacing: 6px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 14px;
}

.section-title::before {
    content: "◆";
    color: var(--gold);
    font-size: 10px;
    margin-right: 12px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible .section-title::after {
    width: 80px;
}

.section-title .title-right {
    color: var(--gold);
    font-size: 10px;
    margin-left: 12px;
}

.greeting {
    text-align: center;
    font-size: 17px;
    line-height: 2;
    color: var(--text-dark);
}

.greeting .highlight {
    color: var(--red-main);
    font-weight: 700;
    font-size: 20px;
}

.guest-box {
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(196,30,58,0.06));
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
}

.guest-box .rep-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--red-main);
    text-align: center;
    margin-bottom: 12px;
}

.guest-box .member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.member-tag {
    background: #fff;
    border: 1px solid rgba(196, 30, 58, 0.25);
    color: var(--text-dark);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 14px;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.member-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.15);
    border-color: var(--red-main);
}

.guest-box .member-tags .member-tag {
    animation: tagPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.guest-box .member-tags .member-tag:nth-child(1)  { animation-delay: 0.5s; }
.guest-box .member-tags .member-tag:nth-child(2)  { animation-delay: 0.58s; }
.guest-box .member-tags .member-tag:nth-child(3)  { animation-delay: 0.66s; }
.guest-box .member-tags .member-tag:nth-child(4)  { animation-delay: 0.74s; }
.guest-box .member-tags .member-tag:nth-child(5)  { animation-delay: 0.82s; }
.guest-box .member-tags .member-tag:nth-child(6)  { animation-delay: 0.90s; }
.guest-box .member-tags .member-tag:nth-child(n+7) { animation-delay: 1s; }

@keyframes tagPop {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: none; }
}

.info-grid {
    display: grid;
    gap: 16px;
}

.info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--red-main), var(--red-deep));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: var(--gold-light);
}

.info-text .label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.info-text .value {
    font-size: 15px;
    font-weight: 600;
}

/* 饭店展示 */
.section-venue {
    background: linear-gradient(180deg, #fffef9 0%, rgba(255,248,231,0.5) 100%);
}

.venue-intro {
    text-align: center;
    margin-bottom: 20px;
}

.venue-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--red-main);
    letter-spacing: 4px;
}

.venue-slogan {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 2px;
    font-style: italic;
}

.venue-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
}

.venue-photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #f5f0eb;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    width: 100%;
    height: 150px;
    min-width: 0;
}

.venue-photo img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.venue-photo:hover img {
    transform: scale(1.03);
}

.venue-photo figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 4px 4px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}

.venue-info {
    margin-top: 4px;
}

@media (min-width: 560px) {
    .venue-photo,
    .venue-photo img {
        height: 175px;
    }
}

@media (max-width: 400px) {
    .venue-showcase {
        gap: 6px;
    }

    .venue-photo,
    .venue-photo img {
        height: 132px;
    }

    .venue-photo figcaption {
        font-size: 9px;
        padding: 8px 3px 3px;
    }
}

/* 图片灯箱 */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: lightboxFadeIn 0.25s ease both;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.photo-lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
}

.lightbox-panel {
    position: relative;
    z-index: 1;
    max-width: 94vw;
    max-height: 92vh;
    text-align: center;
    animation: lightboxPanelIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lightboxPanelIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.lightbox-frame {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3), 0 24px 80px rgba(0, 0, 0, 0.5);
    display: inline-block;
    max-width: 100%;
}

.lightbox-frame img {
    display: block;
    max-width: 88vw;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 2px;
}

#lightbox-caption {
    color: #fff;
    margin-top: 14px;
    font-size: 15px;
    letter-spacing: 2px;
}

#lightbox-counter {
    color: rgba(255, 255, 255, 0.65);
    margin-top: 6px;
    font-size: 12px;
}

.lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    display: none;
}

.lightbox-nav.show {
    display: block;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: -56px; }
.lightbox-next { right: -56px; }

@media (max-width: 640px) {
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
    .lightbox-close { top: -48px; right: 50%; transform: translateX(50%); }
    .lightbox-frame img { max-height: 65vh; }
}

.hotel-callout {
    background: linear-gradient(135deg, #1a2840, #2a3f5f);
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 8px;
}

.hotel-callout h3 {
    color: var(--gold-light);
    font-size: 18px;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.hotel-callout p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.8;
}

.hotel-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.hotel-photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
}

.hotel-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: transform 0.3s, filter 0.3s;
    display: block;
}

.hotel-photo:hover img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.rsvp-form {
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.form-group .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(196, 30, 58, 0.25);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--red-main);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 120px;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: block;
    text-align: center;
    padding: 12px 16px;
    border: 2px solid rgba(196, 30, 58, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    margin-bottom: 0;
}

.radio-option input:checked + label {
    background: var(--red-main);
    border-color: var(--red-main);
    color: #fff;
}

.member-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid rgba(196, 30, 58, 0.2);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.member-checkbox:has(input:checked) {
    background: rgba(196, 30, 58, 0.08);
    border-color: var(--red-main);
    color: var(--red-main);
    font-weight: 600;
}

.member-checkbox input {
    accent-color: var(--red-main);
}

.conditional-field {
    display: none;
}

.conditional-field.show {
    display: block;
}

.daytrip-hint {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border: 1px solid #ffe082;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #8d6e00;
}

.daytrip-hint p {
    margin: 0;
}

.daytrip-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.daytrip-modal[hidden] {
    display: none;
}

.daytrip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.daytrip-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(212, 175, 55, 0.4);
    animation: lightboxPanelIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.daytrip-modal-panel h3 {
    color: var(--red-main);
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 14px;
    text-align: center;
}

.daytrip-modal-panel p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.daytrip-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-modal {
    width: 100%;
    padding: 13px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--red-main), var(--red-deep));
    color: #fff;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.3);
}

.btn-modal-secondary {
    background: #fff;
    color: var(--text-muted);
    border: 1px solid #ddd;
    font-size: 13px;
    font-weight: 500;
}

.btn-modal:hover {
    transform: translateY(-1px);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--red-main), var(--red-deep));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(196, 30, 58, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0%, 100% { left: -100%; }
    50%      { left: 150%; }
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(196, 30, 58, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

.footer-note {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 2px;
}

.footer-note .hosts {
    font-size: 18px;
    color: var(--red-main);
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: 4px;
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.alert-info {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #f57f17;
}

/* 管理页 */
.admin-page {
    background: #f5f0eb;
    min-height: 100vh;
    padding: 24px 16px;
}

.admin-card {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.admin-header {
    background: var(--red-main);
    color: #fff;
    padding: 24px 28px;
}

.admin-header h1 {
    font-size: 22px;
    letter-spacing: 4px;
}

.admin-body {
    padding: 24px 28px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--cream);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(212,175,55,0.3);
}

.stat-box .num {
    font-size: 28px;
    font-weight: 700;
    color: var(--red-main);
}

.stat-box .lbl {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #faf6f0;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.copy-link {
    color: var(--red-main);
    text-decoration: none;
    font-size: 12px;
    word-break: break-all;
}

.copy-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-xf { background: #fce4ec; color: #c2185b; }
.badge-tj { background: #e8eaf6; color: #3949ab; }
.badge-fr { background: #e8f5e9; color: #388e3c; }
.badge-self { background: #e3f2fd; color: #1565c0; }
.badge-yes { background: #e8f5e9; color: #2e7d32; }
.badge-no { background: #fafafa; color: #999; }
.badge-hotel { background: #fff3e0; color: #e65100; }

.nav-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--gold-light);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(212,175,55,0.5);
    padding: 4px 14px;
    border-radius: 999px;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.15);
}

@media (max-width: 600px) {
    .section { padding: 24px 18px; }
    .hero { padding: 36px 18px 28px; }
    .hero h1 { letter-spacing: 4px; }
    .hotel-gallery { grid-template-columns: 1fr; }
    .hotel-gallery img { height: 180px; }
    .radio-group { flex-direction: column; }
}

/* ===== 后台管理系统 ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: linear-gradient(180deg, var(--red-deep), #6b1010);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    padding: 28px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h2 {
    font-size: 18px;
    letter-spacing: 3px;
}

.sidebar-brand p {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--gold-light);
}

.nav-badge {
    background: var(--gold);
    color: var(--red-deep);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: auto;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-footer a:hover {
    color: var(--gold-light);
    background: rgba(255,255,255,0.08);
    border-color: rgba(212, 175, 55, 0.35);
}

.admin-main {
    flex: 1;
    overflow-x: hidden;
}

.admin-topbar {
    background: #fff;
    padding: 20px 28px;
    border-bottom: 1px solid #eee;
}

.admin-topbar h1 {
    font-size: 20px;
    color: var(--red-main);
    letter-spacing: 3px;
}

.admin-topbar p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-content {
    padding: 0 28px 28px;
}

.stats-wide {
    padding: 20px 28px 0;
}

.stat-warn .num { color: #e65100; }
.stat-ok .num { color: #2e7d32; }

.badge-pending { background: #fff3e0; color: #e65100; }

.filter-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 120px;
}

.filter-search input {
    min-width: 160px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.pagination-bar-bottom {
    margin-top: 12px;
    margin-bottom: 0;
}

.pagination-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.pagination-meta strong {
    color: var(--red-main);
}

.pagination-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--red-main);
    color: #fff;
    border: 1px solid var(--red-main);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-sm:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.25);
}

.btn-outline {
    background: #fff;
    color: var(--red-main);
    border-color: rgba(196, 30, 58, 0.45);
}

.btn-outline:hover {
    background: rgba(196, 30, 58, 0.06);
    color: var(--red-deep);
    border-color: var(--red-main);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--red-deep);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold), #c9a020);
    border-color: #c9a020;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.admin-table th {
    white-space: nowrap;
    font-size: 12px;
}

.admin-table td {
    vertical-align: top;
}

.admin-table td.link-actions {
    vertical-align: middle;
}

.cell-members { max-width: 180px; font-size: 12px; color: #666; }
.cell-attendees { max-width: 140px; font-size: 12px; }
.cell-msg { max-width: 120px; font-size: 12px; color: #888; }
.cell-time { white-space: nowrap; font-size: 12px; color: #999; }
.cell-count { font-weight: 700; color: var(--red-main); text-align: center; }

.empty-row {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* 后台操作按钮（表格、工具栏通用） */
.link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-width: 88px;
}

.links-table .link-actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 148px;
}

/* 邀请链接页操作按钮 */
.admin-page button.btn-action {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
}

.link-actions-invite {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 148px;
}

.link-actions-inline {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
}

.invite-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.links-table .link-actions-invite .btn-action,
.links-table .link-actions-invite .btn-copy-msg {
    width: 100%;
}

.invite-action-row .btn-action {
    width: 100%;
    padding: 7px 8px;
    font-size: 11px;
}

.links-table .btn-copy-msg {
    padding: 8px 12px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.btn-preview {
    background: #f7f7f7;
    color: #555;
    border-color: #ddd;
}

.btn-preview:hover {
    background: #eee;
    border-color: #bbb;
    color: #333;
}

.links-table td.link-actions {
    vertical-align: middle;
    padding: 10px 12px;
}

.admin-table .link-actions .btn-action,
.admin-table .link-actions .btn-link {
    min-height: 32px;
}

.btn-action,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(196, 30, 58, 0.35);
    background: #fff;
    color: var(--red-main);
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-action:hover,
.btn-link:hover {
    background: rgba(196, 30, 58, 0.08);
    border-color: var(--red-main);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-copy-primary,
.btn-edit-rsvp {
    background: var(--red-main);
    color: #fff;
    border-color: var(--red-main);
}

.btn-copy-primary:hover,
.btn-edit-rsvp:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
    color: #fff;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.25);
}

.btn-edit-guest {
    background: #fff8e1;
    color: #e65100;
    border-color: #ffcc80;
}

.btn-edit-guest:hover {
    background: #ffe0b2;
    border-color: #ffb74d;
    color: #bf360c;
}

.btn-back {
    display: inline-flex;
    margin-bottom: 16px;
    background: #fff;
    color: var(--text-muted);
    border-color: #ddd;
    font-size: 13px;
    padding: 8px 14px;
}

.btn-back:hover {
    color: var(--red-main);
    border-color: rgba(196, 30, 58, 0.35);
    background: rgba(196, 30, 58, 0.04);
}

.btn-action.copied {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

.btn-action.copied:hover {
    background: #1b5e20;
    border-color: #1b5e20;
    color: #fff;
}

.section-heading {
    margin: 24px 0 12px;
    color: var(--red-main);
    letter-spacing: 2px;
    font-size: 16px;
}

.hotel-summary {
    background: var(--cream);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.hotel-summary strong { color: var(--red-main); }

.hint-block {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.login-card {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
}

.login-header {
    background: var(--red-main);
    color: #fff;
    padding: 32px 28px;
    text-align: center;
}

.login-header h1 {
    font-size: 22px;
    letter-spacing: 4px;
}

.login-form {
    padding: 28px;
}

.login-form .btn-submit {
    margin-top: 4px;
}

.edit-page {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #eee;
}

.back-link {
    text-decoration: none;
}

.guest-info-box {
    background: var(--cream);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.guest-info-box strong {
    font-size: 18px;
    color: var(--red-main);
    margin-left: 8px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(212, 175, 55, 0.35);
}

.btn-admin-save {
    width: auto;
    min-width: 160px;
    padding: 12px 32px;
    font-size: 15px;
    letter-spacing: 4px;
}

.admin-edit-form .btn-submit {
    max-width: none;
}

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }
    .sidebar-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 10px 14px;
    }
    .sidebar-nav a.active { border-bottom-color: var(--gold-light); }
    .sidebar-footer { flex-direction: row; }
    .admin-content { padding: 0 16px 16px; }
    .stats-wide { padding: 16px 16px 0; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-form { width: 100%; }
    .link-actions { gap: 4px; }
    .btn-action, .btn-link { padding: 7px 10px; font-size: 11px; }
    .links-table .link-actions-invite { min-width: 120px; }
    .invite-action-row { grid-template-columns: 1fr; }
}

/* 邀请链接页 */
.cell-toggle {
    text-align: center;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #2e7d32;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.55;
    cursor: wait;
}

.links-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.links-per-page-form {
    margin-left: auto;
}

.links-per-page-form .filter-group {
    margin-bottom: 0;
}

.links-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid #ddd;
    background: #fff;
    transition: all 0.2s;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--red-main);
    color: #fff;
    border-color: var(--red-main);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.public-link-box {
    margin-top: 28px;
    background: var(--cream);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    padding: 20px;
}

.public-link-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.msg-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.msg-preview-modal[hidden] {
    display: none;
}

.msg-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.msg-preview-panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.msg-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    color: var(--red-main);
}

.msg-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.msg-preview-close:hover {
    background: #ffebee;
    border-color: rgba(196, 30, 58, 0.35);
    color: var(--red-main);
}

#msg-preview-body {
    padding: 20px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
    background: #fafafa;
}

.msg-preview-panel .btn-sm {
    margin: 16px 20px 20px;
    align-self: flex-end;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html.js .reveal,
    .reveal { opacity: 1; transform: none; }
    html.js .animate-item,
    .animate-item { opacity: 1; animation: none; }
}

