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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 50%, #fff0f5 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    transform: rotate(-45deg);
    opacity: 0.6;
    animation: float-heart 8s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: inherit;
    border-radius: 50%;
}

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

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

.heart:nth-child(1) { left: 10%; animation-delay: 0s; }
.heart:nth-child(2) { left: 25%; animation-delay: 1s; }
.heart:nth-child(3) { left: 40%; animation-delay: 2s; }
.heart:nth-child(4) { left: 55%; animation-delay: 3s; }
.heart:nth-child(5) { left: 70%; animation-delay: 4s; }
.heart:nth-child(6) { left: 85%; animation-delay: 5s; }
.heart:nth-child(7) { left: 15%; animation-delay: 2.5s; }
.heart:nth-child(8) { left: 65%; animation-delay: 1.5s; }

@keyframes float-heart {
    0% {
        bottom: -50px;
        transform: rotate(-45deg) scale(1);
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        bottom: 100vh;
        transform: rotate(-45deg) scale(0.5);
        opacity: 0;
    }
}

section {
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.decor-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff69b4, transparent);
}

.title-text {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 28px;
    font-weight: 600;
    color: #db7093;
    margin: 0 20px;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 228, 236, 0.5) 100%);
    padding: 20px;
}

.hero-content {
    animation: fade-in-up 1s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-frame {
    margin-bottom: 30px;
    animation: fade-in 1.5s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo {
    width: 280px;
    height: 380px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(219, 112, 147, 0.3);
    border: 4px solid #fff;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-container {
    margin-bottom: 30px;
}

.subtitle {
    display: block;
    font-size: 16px;
    color: #db7093;
    margin-bottom: 10px;
    letter-spacing: 8px;
}

.main-title {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 48px;
    font-weight: 700;
    color: #db7093;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(219, 112, 147, 0.2);
}

.hearts-decoration {
    font-size: 24px;
    color: #ff69b4;
    letter-spacing: 10px;
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(219, 112, 147, 0.2);
}

.countdown-ended {
    color: #db7093;
    font-size: 24px;
    font-weight: 600;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-item .number {
    font-size: 36px;
    font-weight: 700;
    color: #db7093;
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}

.countdown-item .label {
    font-size: 12px;
    color: #ff69b4;
    margin-top: 5px;
}

.separator {
    font-size: 28px;
    color: #ff69b4;
    font-weight: bold;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #db7093;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-hint span {
    font-size: 14px;
    margin-bottom: 10px;
}

.scroll-arrow {
    width: 20px;
    height: 30px;
    border: 2px solid #db7093;
    border-radius: 10px;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #db7093;
    border-radius: 50%;
    animation: scroll-down 1.5s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: 8px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.invitation {
    background: rgba(255, 255, 255, 0.6);
    margin: 20px;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 40px rgba(219, 112, 147, 0.15);
}

.couple-info {
    text-align: center;
    margin-bottom: 30px;
}

.couple-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.groom, .bride {
    font-size: 20px;
    color: #db7093;
    font-weight: 500;
}

.heart-icon {
    font-size: 28px;
    color: #ff69b4;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.wedding-date {
    margin-bottom: 20px;
}

.date-main {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 28px;
    color: #db7093;
    font-weight: 600;
    margin-bottom: 5px;
}

.date-sub {
    font-size: 16px;
    color: #ff69b4;
}

.wedding-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    color: #db7093;
}

.invitation-text {
    text-align: center;
    line-height: 2;
    color: #8b4557;
    font-size: 16px;
}

.story {
    padding: 40px 20px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #ffb6c1, #ff69b4, #ffb6c1);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #ffb6c1;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

.timeline-dot.highlight {
    background: #ff69b4;
    width: 20px;
    height: 20px;
    left: -26px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 105, 180, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 105, 180, 0.8); }
}

.timeline-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(219, 112, 147, 0.1);
}

.timeline-date {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 16px;
    color: #db7093;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-text {
    font-size: 14px;
    color: #8b4557;
}

.gallery {
    padding: 40px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(219, 112, 147, 0.2);
    aspect-ratio: 3/4;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.map-section {
    background: rgba(255, 255, 255, 0.6);
    margin: 20px;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 40px rgba(219, 112, 147, 0.15);
}

.map-container {
    text-align: center;
}

.map-placeholder {
    background: linear-gradient(135deg, #fff5f8, #ffe4ec);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.map-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.map-title {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 20px;
    color: #db7093;
    font-weight: 600;
    margin-bottom: 5px;
}

.map-address {
    font-size: 14px;
    color: #8b4557;
}

.nav-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.5);
}

.wishes {
    padding: 40px 20px;
}

.wishes-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.wish-card {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(219, 112, 147, 0.1);
    animation: wish-slide-in 0.5s ease-out;
}

@keyframes wish-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wish-avatar {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe4ec, #ffb6c1);
    border-radius: 50%;
    flex-shrink: 0;
}

.wish-content {
    flex: 1;
}

.wish-name {
    font-weight: 600;
    color: #db7093;
    margin-bottom: 5px;
}

.wish-text {
    font-size: 14px;
    color: #8b4557;
    margin-bottom: 5px;
    line-height: 1.6;
}

.wish-time {
    font-size: 12px;
    color: #ccc;
}

.wish-form {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(219, 112, 147, 0.1);
}

.wish-form input,
.wish-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #ffe4ec;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.wish-form input:focus,
.wish-form textarea:focus {
    border-color: #ff69b4;
}

.wish-form textarea {
    height: 80px;
    resize: none;
}

.wish-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wish-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.5);
}

.rsvp {
    background: rgba(255, 255, 255, 0.6);
    margin: 20px;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 40px rgba(219, 112, 147, 0.15);
}

.rsvp-form {
    text-align: center;
}

.rsvp-options {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.rsvp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.rsvp-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #ff69b4;
}

.option-text {
    font-size: 18px;
    color: #db7093;
}

.rsvp-guests,
.rsvp-message {
    margin-bottom: 20px;
}

.rsvp-guests label,
.rsvp-message label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #db7093;
}

.rsvp-guests input {
    width: 80px;
    padding: 12px 15px;
    border: 2px solid #ffe4ec;
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

.rsvp-guests input:focus {
    border-color: #ff69b4;
}

.rsvp-message textarea {
    width: 100%;
    height: 100px;
    padding: 12px 15px;
    border: 2px solid #ffe4ec;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
}

.rsvp-message textarea:focus {
    border-color: #ff69b4;
}

.rsvp-form button {
    padding: 15px 60px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rsvp-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.5);
}

.footer {
    background: linear-gradient(180deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 228, 236, 0.5) 100%);
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-heart {
    color: #ff69b4;
    font-size: 20px;
}

.footer-text {
    font-size: 16px;
    color: #db7093;
}

.footer-date {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 18px;
    color: #ff69b4;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fade-in 0.3s ease;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    animation: scale-in 0.3s ease;
}

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

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-title {
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    font-size: 24px;
    color: #db7093;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 16px;
    color: #8b4557;
    margin-bottom: 25px;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-content button {
    padding: 12px 40px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}

@media (min-width: 768px) {
    .photo {
        width: 320px;
        height: 420px;
    }

    .main-title {
        font-size: 56px;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .invitation,
    .map-section,
    .rsvp {
        margin: 40px auto;
        max-width: 600px;
    }
}

.animate-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-hidden {
        opacity: 1;
        transform: none;
    }
}
