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

body {
    font-family: 'Comfortaa', 'Poppins', sans-serif;
    background: 
        linear-gradient(135deg, #ff6b9d 0%, #c44569 25%, #00d2ff 50%, #3a7bd5 75%, #ff6b9d 100%);
    background-size: 400% 400%;
    animation: miamiViceGradient 10s ease infinite;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

@keyframes miamiViceGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Memphis Style Geometric Patterns */
.memphis-patterns {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.memphis-shape {
    position: absolute;
    animation: memphisFloat 20s infinite ease-in-out;
}

.shape-1 {
    width: 150px;
    height: 150px;
    background: #ff6b9d;
    border-radius: 50% 0 50% 0;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    transform: rotate(45deg);
}

.shape-2 {
    width: 100px;
    height: 100px;
    background: #00d2ff;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    background: #ffd93d;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 15%;
    left: 8%;
    animation-delay: 4s;
}

.shape-4 {
    width: 80px;
    height: 200px;
    background: #ff6b9d;
    transform: rotate(25deg);
    bottom: 20%;
    right: 15%;
    animation-delay: 1s;
}

.shape-5 {
    width: 140px;
    height: 60px;
    background: #00d2ff;
    border-radius: 50px;
    top: 50%;
    left: 3%;
    animation-delay: 3s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    background: #ffd93d;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    top: 30%;
    right: 5%;
    animation-delay: 5s;
}

.shape-7 {
    width: 110px;
    height: 110px;
    background: #ff6b9d;
    border-radius: 20% 80% 20% 80% / 80% 20% 80% 20%;
    bottom: 10%;
    left: 50%;
    animation-delay: 2.5s;
}

.shape-8 {
    width: 70px;
    height: 70px;
    background: #00d2ff;
    transform: rotate(45deg);
    top: 15%;
    left: 50%;
    animation-delay: 1.5s;
}

@keyframes memphisFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-15px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(30px, 10px) rotate(270deg);
    }
}

/* Neon "OPEN" Sign */
.neon-sign {
    position: fixed;
    top: 20px;
    right: 20px;
    font-family: 'Bungee', cursive;
    font-size: 2.5rem;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #00ffff;
    animation: neonFlicker 2s infinite;
    z-index: 5;
    letter-spacing: 5px;
    transform: rotate(-5deg);
}

@keyframes neonFlicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #00ffff;
    }
    50% {
        opacity: 0.8;
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff,
            0 0 20px #00ffff;
    }
}

/* Laser Effects - Miami Vice Style */
.laser-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.laser {
    position: absolute;
    width: 4px;
    height: 100%;
    opacity: 0.6;
    filter: blur(1.5px);
    animation: laserMove 8s linear infinite;
}

.laser-1 {
    background: linear-gradient(to bottom, transparent, #ff6b9d, transparent);
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
    box-shadow: 0 0 15px #ff6b9d;
}

.laser-2 {
    background: linear-gradient(to bottom, transparent, #00d2ff, transparent);
    left: 30%;
    animation-delay: 1s;
    animation-duration: 7s;
    box-shadow: 0 0 15px #00d2ff;
}

.laser-3 {
    background: linear-gradient(to bottom, transparent, #ffd93d, transparent);
    left: 50%;
    animation-delay: 2s;
    animation-duration: 8s;
    box-shadow: 0 0 15px #ffd93d;
}

.laser-4 {
    background: linear-gradient(to bottom, transparent, #ff6b9d, transparent);
    left: 70%;
    animation-delay: 0.5s;
    animation-duration: 6.5s;
    box-shadow: 0 0 15px #ff6b9d;
}

.laser-5 {
    background: linear-gradient(to bottom, transparent, #00d2ff, transparent);
    left: 90%;
    animation-delay: 1.5s;
    animation-duration: 7.5s;
    box-shadow: 0 0 15px #00d2ff;
}

@keyframes laserMove {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Floating Party Elements - 1989 Tech */
.party-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.party-emoji {
    position: absolute;
    font-size: 3rem;
    animation: dance1989 12s infinite ease-in-out;
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
    will-change: transform;
}

/* Specific styling for 1989 tech items */
.party-emoji:nth-child(1) { /* 📱 Brick Phone */
    font-size: 3.5rem;
    animation: phoneFloat 9s infinite ease-in-out;
    animation-delay: 0s;
    filter: drop-shadow(0 0 15px rgba(255,107,157,0.9));
}

.party-emoji:nth-child(2) { /* 📼 VHS */
    font-size: 3.5rem;
    animation: vhsFloat 8s infinite ease-in-out;
    animation-delay: 1s;
    filter: drop-shadow(0 0 15px rgba(0,210,255,0.9));
}

.party-emoji:nth-child(3) { /* 📺 TV/VCR */
    font-size: 4rem;
    animation: tvGlow 10s infinite ease-in-out;
    animation-delay: 2s;
    filter: drop-shadow(0 0 20px rgba(0,210,255,1));
}

.party-emoji:nth-child(4) { /* 🎮 Game Boy */
    font-size: 3.5rem;
    animation: gameBoyBounce 7s infinite ease-in-out;
    animation-delay: 0.5s;
    filter: drop-shadow(0 0 15px rgba(255,217,61,0.9));
}

.party-emoji:nth-child(5) { /* 💿 CD Player */
    font-size: 3.5rem;
    animation: cdSpin 6s infinite linear;
    animation-delay: 1.5s;
    filter: drop-shadow(0 0 15px rgba(0,210,255,0.9));
}

.party-emoji:nth-child(6) { /* 📻 Walkman */
    font-size: 3.5rem;
    animation: walkmanWave 9s infinite ease-in-out;
    animation-delay: 2.5s;
    filter: drop-shadow(0 0 15px rgba(255,107,157,0.9));
}

.party-emoji:nth-child(7) { /* 📷 Camera */
    left: 5%;
    animation-delay: 3s;
}

.party-emoji:nth-child(8) { /* 💾 Floppy */
    left: 15%;
    animation-delay: 3.5s;
}

.party-emoji:nth-child(9) { /* 🦇 Batman */
    left: 25%;
    animation-delay: 4s;
}

.party-emoji:nth-child(10) { /* 🤠 Indiana Jones */
    left: 35%;
    animation-delay: 4.5s;
}

.party-emoji:nth-child(11) { /* ⏰ Back to Future */
    left: 45%;
    animation-delay: 5s;
}

.party-emoji:nth-child(12) { /* 💕 When Harry Met Sally */
    left: 55%;
    animation-delay: 5.5s;
}

.party-emoji:nth-child(13) { /* 🎵 Music */
    left: 65%;
    animation-delay: 6s;
}

.party-emoji:nth-child(14) { /* 🎤 Microphone */
    left: 75%;
    animation-delay: 6.5s;
}

.party-emoji:nth-child(15) { /* 🕺 Dancing */
    left: 85%;
    animation-delay: 7s;
}

.party-emoji:nth-child(16) { /* 💃 Dancing */
    left: 10%;
    animation-delay: 7.5s;
}

.party-emoji:nth-child(17) { /* 🕶️ Miami Vice */
    left: 20%;
    animation-delay: 8s;
}

.party-emoji:nth-child(18) { /* ✨ Sparkles */
    left: 30%;
    animation-delay: 8.5s;
}

.party-emoji:nth-child(19) { /* 🎉 Party */
    left: 40%;
    animation-delay: 9s;
}

.party-emoji:nth-child(20) { /* 🎊 Party */
    left: 50%;
    animation-delay: 9.5s;
}

@keyframes phoneFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
    50% {
        transform: translateY(40vh) translateX(30px) rotate(15deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes vhsFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
    50% {
        transform: translateY(45vh) translateX(-25px) rotate(-20deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes tvGlow {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.3);
        opacity: 0;
        filter: drop-shadow(0 0 20px rgba(0,210,255,1)) brightness(1);
    }
    50% {
        transform: translateY(40vh) translateX(35px) rotate(10deg) scale(1.3);
        opacity: 1;
        filter: drop-shadow(0 0 40px rgba(0,210,255,1.8)) brightness(1.5);
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.3);
        opacity: 0;
        filter: drop-shadow(0 0 20px rgba(0,210,255,1)) brightness(1);
    }
}

@keyframes gameBoyBounce {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
    25% {
        transform: translateY(60vh) translateX(20px) rotate(10deg) scale(0.9);
        opacity: 1;
    }
    50% {
        transform: translateY(40vh) translateX(-20px) rotate(-10deg) scale(1.2);
        opacity: 1;
    }
    75% {
        transform: translateY(60vh) translateX(25px) rotate(8deg) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes cdSpin {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
    50% {
        transform: translateY(45vh) translateX(30px) rotate(360deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(720deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes walkmanWave {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
    50% {
        transform: translateY(50vh) translateX(-30px) rotate(25deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes dance1989 {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateY(40vh) translateX(30px) rotate(180deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(360deg) scale(0.3);
        opacity: 0;
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ff6b9d;
    animation: confettiFall 5s infinite linear;
    border-radius: 50%;
}

.confetti:nth-child(odd) {
    background: #00d2ff;
    animation-duration: 4s;
    border-radius: 0;
}

.confetti:nth-child(3n) {
    background: #ffd93d;
    animation-duration: 6s;
}

.confetti:nth-child(4n) {
    background: #ff6b9d;
    animation-duration: 5.5s;
    border-radius: 0;
}

.confetti:nth-child(5n) {
    background: #00d2ff;
    animation-duration: 4.5s;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
    padding: 20px;
}

/* Host Head Animation */
.host-head-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 900px;
    height: 600px;
    z-index: 9;
    pointer-events: none;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.host-head-container.visible {
    opacity: 1;
}

.host-head-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.host-head {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 200px;
    object-fit: cover;
    object-position: center 10%;
    clip-path: ellipse(45% 40% at 50% 50%);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)) brightness(1.05) contrast(1.1);
    animation: headPopInOutLeft 5s ease-in-out infinite;
    z-index: 10;
    border-radius: 50%;
    display: block;
    transition: opacity 0.3s ease-in-out;
}

/* Left side head */
.host-head:nth-of-type(1) {
    left: -80px;
    animation: headPopInOutLeft 5s ease-in-out infinite;
    animation-delay: 0s;
}

/* Right side head - duplicate for alternating sides */
.host-head:nth-of-type(2) {
    left: auto;
    right: -80px;
    animation: headPopInOutRight 5s ease-in-out infinite;
    animation-delay: 2.5s;
}

@keyframes headPopInOutLeft {
    0%, 100% {
        transform: translateY(-50%) translateX(-100px) scale(0.6);
        opacity: 0;
    }
    12% {
        transform: translateY(-50%) translateX(-20px) scale(0.9);
        opacity: 0.8;
    }
    18% {
        transform: translateY(-50%) translateX(5px) scale(1.08);
        opacity: 1;
    }
    25% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateY(-50%) translateX(8px) scale(1.05);
        opacity: 1;
    }
    55% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-50%) translateX(4px) scale(1.03);
        opacity: 1;
    }
    85% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    92% {
        transform: translateY(-50%) translateX(-20px) scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50%) translateX(-100px) scale(0.6);
        opacity: 0;
    }
}

@keyframes headPopInOutRight {
    0%, 100% {
        transform: translateY(-50%) translateX(100px) scale(0.6);
        opacity: 0;
    }
    12% {
        transform: translateY(-50%) translateX(20px) scale(0.9);
        opacity: 0.8;
    }
    18% {
        transform: translateY(-50%) translateX(-5px) scale(1.08);
        opacity: 1;
    }
    25% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateY(-50%) translateX(-8px) scale(1.05);
        opacity: 1;
    }
    55% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-50%) translateX(-4px) scale(1.03);
        opacity: 1;
    }
    85% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    92% {
        transform: translateY(-50%) translateX(20px) scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50%) translateX(100px) scale(0.6);
        opacity: 0;
    }
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    top: 30%;
    left: -200px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    padding: 12px 18px;
    border-radius: 18px;
    border: 3px solid #fff;
    box-shadow: 
        0 0 20px rgba(255, 107, 157, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 11;
    animation: bubblePopInOutLeft 5s ease-in-out infinite;
    min-width: 180px;
    text-align: center;
    display: block;
}

.speech-bubble.right {
    left: auto;
    right: -200px;
    animation: bubblePopInOutRight 5s ease-in-out infinite;
    animation-delay: 2.5s;
}

.speech-bubble p {
    color: #fff;
    font-family: 'Bungee', cursive;
    font-size: 1rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.speech-bubble-tail {
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #00d2ff;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.speech-bubble.right .speech-bubble-tail {
    left: auto;
    right: 30px;
}

.speech-bubble-tail::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: -12px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid #fff;
}

@keyframes bubblePopInOutLeft {
    0%, 100% {
        transform: translateY(-50%) translateX(-30px) scale(0.7);
        opacity: 0;
    }
    12% {
        transform: translateY(-50%) translateX(-5px) scale(1.15);
        opacity: 0.9;
    }
    18% {
        transform: translateY(-50%) translateX(3px) scale(1.05);
        opacity: 1;
    }
    25% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateY(-50%) translateX(5px) scale(1.08);
        opacity: 1;
    }
    55% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-50%) translateX(3px) scale(1.05);
        opacity: 1;
    }
    85% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    92% {
        transform: translateY(-50%) translateX(-10px) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50%) translateX(-30px) scale(0.7);
        opacity: 0;
    }
}

@keyframes bubblePopInOutRight {
    0%, 100% {
        transform: translateY(-50%) translateX(30px) scale(0.7);
        opacity: 0;
    }
    12% {
        transform: translateY(-50%) translateX(5px) scale(1.15);
        opacity: 0.9;
    }
    18% {
        transform: translateY(-50%) translateX(-3px) scale(1.05);
        opacity: 1;
    }
    25% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateY(-50%) translateX(-5px) scale(1.08);
        opacity: 1;
    }
    55% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-50%) translateX(-3px) scale(1.05);
        opacity: 1;
    }
    85% {
        transform: translateY(-50%) translateX(0px) scale(1);
        opacity: 1;
    }
    92% {
        transform: translateY(-50%) translateX(10px) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50%) translateX(30px) scale(0.7);
        opacity: 0;
    }
}

/* Envelope Overlay */
.envelope-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 700px;
    height: 500px;
    z-index: 100;
    cursor: grab;
    perspective: 1000px;
}

.envelope-overlay:active {
    cursor: grabbing;
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    border-radius: 15px;
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.6),
        0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 15px 15px;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    border-radius: 15px 15px 0 0;
    transform-origin: top center;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
    overflow: hidden;
}

.envelope-flap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
}

/* Tear Line Effect */
.tear-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255,255,255,0.8) 20%,
        rgba(255,255,255,1) 50%,
        rgba(255,255,255,0.8) 80%,
        transparent 100%
    );
    opacity: 0;
    transform: translateY(0);
    z-index: 10;
    box-shadow: 
        0 0 10px rgba(255,255,255,0.8),
        0 0 20px rgba(255,255,255,0.6),
        inset 0 2px 4px rgba(0,0,0,0.2);
    clip-path: polygon(
        0% 0%,
        5% 100%,
        10% 0%,
        15% 100%,
        20% 0%,
        25% 100%,
        30% 0%,
        35% 100%,
        40% 0%,
        45% 100%,
        50% 0%,
        55% 100%,
        60% 0%,
        65% 100%,
        70% 0%,
        75% 100%,
        80% 0%,
        85% 100%,
        90% 0%,
        95% 100%,
        100% 0%
    );
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.tear-line.active {
    opacity: 1;
}

/* Torn edge effect on flap bottom */
.envelope-flap::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.3);
    clip-path: polygon(
        0% 0%,
        3% 100%,
        6% 0%,
        9% 100%,
        12% 0%,
        15% 100%,
        18% 0%,
        21% 100%,
        24% 0%,
        27% 100%,
        30% 0%,
        33% 100%,
        36% 0%,
        39% 100%,
        42% 0%,
        45% 100%,
        48% 0%,
        51% 100%,
        54% 0%,
        57% 100%,
        60% 0%,
        63% 100%,
        66% 0%,
        69% 100%,
        72% 0%,
        75% 100%,
        78% 0%,
        81% 100%,
        84% 0%,
        87% 100%,
        90% 0%,
        93% 100%,
        96% 0%,
        99% 100%,
        100% 0%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.envelope-flap.tearing::before {
    opacity: 1;
}

.envelope-seal {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: sealPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.8));
}

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

.envelope-instruction {
    color: #fff;
    font-family: 'Bungee', cursive;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: instructionBlink 2s ease-in-out infinite;
}

@keyframes instructionBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes invitationReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.invitation-card {
    width: 100%;
    max-width: 700px;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,235,245,0.98) 100%);
    border: 6px solid;
    border-image: linear-gradient(45deg, #ff6b9d, #00d2ff, #ffd93d, #ff6b9d) 1;
    border-radius: 25px;
    padding: 35px;
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.4),
        0 0 80px rgba(0, 210, 255, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.2);
    animation: cardPulse 4s ease-in-out infinite;
    position: relative;
    overflow: visible;
    opacity: 0;
    z-index: 8;
    margin-bottom: 100px;
}

/* Memphis pattern overlay on card */
.invitation-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(255,107,157,0.05) 15px, rgba(255,107,157,0.05) 30px),
        repeating-linear-gradient(-45deg, transparent, transparent 15px, rgba(0,210,255,0.05) 15px, rgba(0,210,255,0.05) 30px);
    animation: patternMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.invitation-card > * {
    position: relative;
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes cardPulse {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(255, 107, 157, 0.4),
            0 0 80px rgba(0, 210, 255, 0.3),
            0 20px 60px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(255, 107, 157, 0.6),
            0 0 120px rgba(0, 210, 255, 0.5),
            0 20px 60px rgba(0, 0, 0, 0.2);
    }
}

.header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.8rem;
    font-weight: 400;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 50%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: titleShimmer 3s ease infinite;
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
    letter-spacing: 2px;
    transform: rotate(-1deg);
    line-height: 1.2;
}

@keyframes titleShimmer {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% { 
        background-position: 100% 50%;
        filter: hue-rotate(20deg);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: #ff6b9d;
    font-weight: 700;
    text-shadow: 2px 2px 0px #00d2ff;
    animation: subtitleBounce 2s ease-in-out infinite;
    line-height: 1.4;
}

@keyframes subtitleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.event-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    border-radius: 15px;
    border: 3px solid #fff;
    box-shadow: 
        0 0 15px rgba(255, 107, 157, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: stripeMove 3s linear infinite;
}

@keyframes stripeMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.detail-item:nth-child(1) { animation-delay: 0.1s; }
.detail-item:nth-child(2) { animation-delay: 0.2s; }
.detail-item:nth-child(3) { animation-delay: 0.3s; }
.detail-item:nth-child(4) { animation-delay: 0.4s; }

.detail-item:hover {
    transform: translateX(10px) scale(1.03) rotate(1deg);
    box-shadow: 
        0 0 30px rgba(255, 107, 157, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.icon {
    font-size: 2.2rem;
    margin-right: 12px;
    flex-shrink: 0;
    animation: iconBounce 2s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-8px) rotate(10deg) scale(1.1);
    }
}

.detail-content h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Bungee', cursive;
    line-height: 1.3;
}

.detail-content p {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-weight: 600;
}

.note {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.95);
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.location-link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.25);
    padding: 6px 12px;
    border-radius: 10px;
    border: 2px solid #fff;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.location-link:hover {
    background: rgba(255,255,255,0.4);
    transform: translateX(5px) scale(1.1) rotate(2deg);
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

.location-link:active {
    transform: translateX(3px) scale(1.05) rotate(1deg);
}

.calendar-section {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 3px dashed;
    border-image: linear-gradient(90deg, #ff6b9d, #00d2ff, #ffd93d) 1;
}

.btn {
    padding: 14px 28px;
    border: 3px solid #fff;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Bungee', cursive;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-calendar {
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 100%);
    color: #fff;
    box-shadow: 
        0 0 25px rgba(255, 107, 157, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-calendar:hover {
    transform: translateY(-5px) scale(1.08) rotate(-1deg);
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.8),
        0 15px 40px rgba(0, 0, 0, 0.3);
}

.registration-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, #ff6b9d, #00d2ff) 1;
}

.registration-section h2 {
    text-align: center;
    background: linear-gradient(135deg, #ff6b9d, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-family: 'Fredoka One', cursive;
    animation: titleShimmer 3s ease infinite;
}

.rsvp-subtitle {
    text-align: center;
    color: #ff6b9d;
    margin-bottom: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,210,255,0.4);
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #ff6b9d;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0,210,255,0.3);
    font-family: 'Bungee', cursive;
}

.form-group input {
    padding: 12px 16px;
    border: 3px solid;
    border-image: linear-gradient(45deg, #ff6b9d, #00d2ff) 1;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    transition: all 0.3s;
    background: rgba(255,255,255,0.95);
}

.form-group input:focus {
    outline: none;
    border-image: linear-gradient(45deg, #ffd93d, #ff6b9d) 1;
    box-shadow: 0 0 25px rgba(255, 107, 157, 0.5);
    transform: scale(1.03);
    background: #fff;
}

.btn-submit {
    background: linear-gradient(135deg, #ff6b9d 0%, #00d2ff 50%, #ffd93d 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #fff;
    margin-top: 10px;
    box-shadow: 
        0 0 25px rgba(255, 107, 157, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-submit:hover {
    transform: translateY(-5px) scale(1.08) rotate(1deg);
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.8),
        0 15px 40px rgba(0, 0, 0, 0.3);
    animation: gradientShift 1s ease infinite;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.success-message,
.error-message {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-weight: 700;
    animation: fadeIn 0.3s ease;
    border: 4px solid;
    font-size: 1.1rem;
}

.success-message {
    background: linear-gradient(135deg, #00d2ff, #00ff80);
    color: #fff;
    border-image: linear-gradient(45deg, #00d2ff, #00ff80) 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.error-message {
    background: linear-gradient(135deg, #ff6b9d, #ff8000);
    color: #fff;
    border-image: linear-gradient(45deg, #ff6b9d, #ff8000) 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hidden {
    display: none;
}

.registrations-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, #ff6b9d, #00d2ff) 1;
}

.registrations-list h3 {
    text-align: center;
    background: linear-gradient(135deg, #ff6b9d, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Fredoka One', cursive;
    animation: titleShimmer 3s ease infinite;
}

.guests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guest-item {
    background: linear-gradient(135deg, #ff6b9d, #00d2ff);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    padding: 12px 18px;
    border-radius: 12px;
    border: 3px solid #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease, gradientShift 3s ease infinite;
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.4);
}

.guest-item .guest-name {
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    flex: 1;
}

.guest-item .guest-count {
    color: #ffd93d;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 0.95rem;
    margin-right: auto;
    margin-left: 10px;
}

.loading {
    text-align: center;
    color: #ff6b9d;
    font-style: italic;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,210,255,0.4);
}

.empty-state {
    text-align: center;
    color: #00d2ff;
    padding: 20px;
    font-style: italic;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(255,107,157,0.4);
}

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

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

/* Delete button styling */
.btn-delete {
    background: #ff6b9d;
    color: white;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.6);
    font-weight: 700;
}

.btn-delete:hover {
    background: #00d2ff;
    transform: scale(1.2) rotate(90deg);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.9);
}

.time-remaining {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.95);
    font-weight: normal;
    margin-left: 8px;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
    .invitation-card {
        padding: 25px;
        border-width: 4px;
    }

    .title {
        font-size: 2.5rem;
    }

    .detail-item {
        flex-direction: column;
        text-align: center;
    }

    .icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .neon-sign {
        font-size: 1.8rem;
        top: 10px;
        right: 10px;
    }
}
