/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', 'Poppins', serif;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, #ffd6e8 0%, #ffb6d9 50%, #ffc0cb 100%);
    position: relative;
}

/* ===================================
   BACKGROUND EFFECTS
   =================================== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Sakura Petals Animation */
.sakura-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sakura-petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #ffb6d9, #ffc0cb);
    border-radius: 50% 0 50% 0;
    opacity: 0.7;
    animation: falling linear infinite;
    transform-origin: center;
}

@keyframes falling {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Sparkles Animation */
.sparkles-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: sparkle-twinkle 2s ease-in-out infinite;
}

@keyframes sparkle-twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff69b4;
    animation: confetti-fall linear forwards;
    opacity: 0;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===================================
   MUSIC TOGGLE BUTTON
   =================================== */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    border: none;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 8px 20px rgba(255, 20, 147, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(255, 20, 147, 0.5);
}

.music-toggle.playing {
    animation: music-pulse 1s ease-in-out infinite;
}

@keyframes music-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.music-icon {
    font-size: 28px;
    animation: music-note-bounce 2s ease-in-out infinite;
}

@keyframes music-note-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ===================================
   HOVER HEARTS EFFECT
   =================================== */
.hover-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.hover-heart {
    position: absolute;
    font-size: 20px;
    animation: hover-heart-float 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes hover-heart-float {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }

    100% {
        transform: translateY(-80px) scale(0.3);
        opacity: 0;
    }
}

/* ===================================
   MAIN CONTAINER
   =================================== */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===================================
   ENVELOPE STYLES
   =================================== */
.envelope-wrapper {
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope-wrapper:hover {
    transform: scale(1.05);
}

.envelope-wrapper.opening {
    animation: envelope-flip 1s ease-in-out forwards;
}

@keyframes envelope-flip {
    0% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }

    50% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: rotateY(180deg) scale(0);
        opacity: 0;
    }
}

.envelope {
    position: relative;
    width: 300px;
    height: 200px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.3);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #ffc0cb, #ffb6d9);
    clip-path: polygon(0 0, 50% 60%, 100% 0);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: white;
    border-radius: 0 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.envelope-decoration {
    text-align: center;
}

.heart-icon {
    font-size: 48px;
    animation: heart-beat 1.5s ease-in-out infinite;
}

@keyframes heart-beat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.envelope-text {
    margin-top: 10px;
    font-size: 14px;
    color: #ff69b4;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* ===================================
   INVITATION CARD STYLES
   =================================== */
.card-wrapper {
    display: none;
    opacity: 0;
    animation: card-appear 1s ease-out forwards;
}

.card-wrapper.show {
    display: block;
}

@keyframes card-appear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.invitation-card {
    background: white;
    border-radius: 30px;
    padding: 40px 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(255, 105, 180, 0.3);
    position: relative;
    overflow: hidden;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 182, 217, 0.1) 0%, transparent 70%);
    animation: card-glow 3s ease-in-out infinite;
}

@keyframes card-glow {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fade-in 1s ease-out 0.3s backwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-title {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    font-weight: 700;
    color: #ff69b4;
    display: block;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.card-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #666;
    margin-top: 10px;
    font-weight: 400;
    font-style: italic;
    animation: fade-in 1s ease-out 0.5s backwards;
}

.divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffb6d9, transparent);
    margin: 15px auto;
    border-radius: 10px;
}

/* Avatar Section */
.avatar-section {
    text-align: center;
    margin-bottom: 30px;
    animation: fade-in 1s ease-out 0.5s backwards;
}

.avatar-wrapper {
    display: inline-block;
    position: relative;
}

.avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ffc0cb, #ffb6d9, #ffd6e8);
    border-radius: 50%;
    z-index: -1;
    animation: avatar-glow 2s ease-in-out infinite;
}

@keyframes avatar-glow {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    position: relative;
    z-index: 10;
}

/* Music Visualizer - Blob Effect */
.music-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
            rgba(255, 105, 180, 0.4) 0%,
            rgba(255, 20, 147, 0.3) 50%,
            rgba(255, 182, 217, 0.2) 100%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.avatar-wrapper.music-playing .music-blob {
    opacity: 1;
    animation: blob-pulse 0.1s ease-in-out infinite;
}

/* Blob morphing animation */
@keyframes blob-pulse {

    0%,
    100% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }

    25% {
        border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%;
    }

    50% {
        border-radius: 50% 50% 45% 55% / 55% 50% 50% 45%;
    }

    75% {
        border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
    }
}

/* Outer glow ring */
.music-blob::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle,
            transparent 40%,
            rgba(255, 105, 180, 0.15) 60%,
            transparent 80%);
    border-radius: 50%;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Inner highlight */
.music-blob::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
}

/* Ripple effect around avatar */
.avatar-wrapper.music-playing::before {
    animation: ripple-pulse 2s ease-out infinite;
}

@keyframes ripple-pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* Card Content */
.card-content {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.content-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    animation: fade-in 1s ease-out backwards;
}

.content-item:nth-child(1) {
    animation-delay: 0.7s;
}

.content-item:nth-child(2) {
    animation-delay: 0.9s;
}

.content-item:nth-child(3) {
    animation-delay: 1.1s;
}

.content-item:nth-child(4) {
    animation-delay: 1.3s;
}

.card-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: #555;
    line-height: 2;
    margin-bottom: 18px;
    font-weight: 500;
}

.content-label {
    font-size: 16px;
    color: #ff69b4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-family: 'Quicksand', sans-serif;
}

.content-value {
    font-size: 16px;
    color: #333;
    font-weight: 400;
}

/* Message Section */
.message-section {
    background: linear-gradient(135deg, #fff0f5, #ffe4f0);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    animation: fade-in 1s ease-out 1.5s backwards;
    position: relative;
    z-index: 1;
}

.invitation-message {
    font-size: 20px;
    color: #555;
    line-height: 2;
    margin: 30px 0;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
}

.message-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
}

.event-details {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #fff0f6, #ffe6f0);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #ffb6d9;
}

.event-details p {
    margin: 12px 0;
    font-size: 20px;
    color: #ff1493;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
}

/* Action Section */
.action-section {
    text-align: center;
    animation: fade-in 1s ease-out 1.7s backwards;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accept-btn,
.share-btn {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 20, 147, 0.3);
    position: relative;
    overflow: hidden;
    margin: 10px;
    letter-spacing: 0.5px;
}

.accept-btn::before,
.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.accept-btn:hover::before {
    width: 300px;
    height: 300px;
}

.accept-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 20, 147, 0.4);
}

.accept-btn:active {
    transform: translateY(-1px);
}

/* Share Button */
.share-btn {
    background: linear-gradient(135deg, #ffb6d9, #ffc0cb);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(255, 182, 217, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-btn:hover::before {
    width: 300px;
    height: 300px;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 182, 217, 0.5);
}

.share-btn:active {
    transform: translateY(-1px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    font-size: 20px;
}

/* Countdown Timer Section */
.countdown-section {
    background: linear-gradient(135deg, #fff0f5, #ffe4f0);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    animation: fade-in 1s ease-out 1.6s backwards;
    position: relative;
    z-index: 1;
}

.countdown-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    color: #ff1493;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 20px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.15);
    min-width: 70px;
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.25);
}

.countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff69b4;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
    animation: countdown-flip 1s ease-in-out;
}

@keyframes countdown-flip {

    0%,
    100% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(90deg);
    }
}

.countdown-unit {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   MODAL STYLES
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: 25px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modal-slide-up 0.4s ease-out;
    position: relative;
}

@keyframes modal-slide-up {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    color: #ff69b4;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #ffe4f0;
    color: #ff69b4;
    transform: rotate(90deg);
}

.modal-body {
    text-align: center;
}

.modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #ff69b4;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffe4f0;
    border-radius: 15px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #ff69b4;
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.1);
}

.submit-btn {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(255, 20, 147, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 20, 147, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ===================================
   THANK YOU MESSAGE
   =================================== */
.thank-you-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s ease;
}

.thank-you-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.thank-you-content {
    text-align: center;
}

.thank-you-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: heart-beat 1s ease-in-out infinite;
}

.thank-you-title {
    font-family: 'Dancing Script', cursive;
    font-size: 32px;
    color: #ff69b4;
    margin-bottom: 10px;
}

.thank-you-text {
    font-size: 16px;
    color: #666;
}

/* ===================================
   FLYING HEARTS
   =================================== */
.flying-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

.flying-heart {
    position: absolute;
    font-size: 30px;
    animation: fly-up 2s ease-out forwards;
}

@keyframes fly-up {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }

    100% {
        transform: translateY(-200px) scale(0.5);
        opacity: 0;
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 600px) {
    .invitation-card {
        padding: 30px 20px;
    }

    .card-title {
        font-size: 36px;
    }

    .avatar-img {
        width: 100px;
        height: 100px;
    }

    .content-value {
        font-size: 15px;
    }

    .message-text {
        font-size: 13px;
    }

    .accept-btn {
        padding: 12px 30px;
        font-size: 15px;
    }

    .modal-container {
        padding: 25px 20px;
    }

    .modal-title {
        font-size: 24px;
    }

    .envelope {
        width: 260px;
        height: 170px;
    }
}

@media (max-width: 400px) {
    .card-title {
        font-size: 32px;
    }

    .envelope {
        width: 240px;
        height: 160px;
    }

    .heart-icon {
        font-size: 40px;
    }
}