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

body {
    font-family: 'Dancing Script', cursive;
    height: 100vh;
    overflow: hidden;
    background-color: white;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
}

.page.active {
    opacity: 1;
    visibility: visible;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Card background images - centered and same size */
.card-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 500px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

#page1 .card-background, #page2 .card-background {
    background-image: url('card.png');
}

#page3 .card-background {
    background-image: url('finalpage.jpeg');
}

/* Content overlay */
.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(10px);
}

.heart-image {
    max-width: 200px;
    max-height: 200px;
    margin-bottom: 40px;
    transform: translateY(45px);
}

.feeling-lucky {
    font-family: "Qwitcher Grypen", cursive !important;
    font-weight: 400;
    font-size: 2.8em;
    color: black;
    transform: rotate(-13deg) translateX(-50px) translateY(25px);
    cursor: pointer;
    text-shadow: 0 0 8px rgba(0, 0, 0, 1);
    transition: text-shadow 0.3s ease;
    user-select: none;
    animation: pulse-glow 1.5s ease-in-out infinite alternate;
    letter-spacing: 2pt;
}

.feeling-lucky:hover {
    text-shadow: 0 0 25px rgba(0, 0, 0, 1);
}

@keyframes pulse-glow {
    0% {
        text-shadow: 0 0 8px rgba(0, 0, 0, 1);
    }
    100% {
        text-shadow: 0 0 20px rgba(0, 0, 0, 1), 0 0 30px rgba(0, 0, 0, 0.8);
    }
}

/* Page 2 Styles */
#rsvpForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.input-group {
    position: relative;
}

input {
    background: transparent;
    border: 0.5px solid black;
    border-radius: 2px 1px 3px 1px;
    padding: 10px 12px;
    font-size: 14px;
    width: 200px;
    outline: none;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2pt;
    position: relative;
    color: black;
    box-shadow: 
        0 0 0 0.3px rgba(0, 0, 0, 0.2),
        inset 0.2px 0.2px 0 rgba(0, 0, 0, 0.1),
        inset -0.2px -0.2px 0 rgba(0, 0, 0, 0.1);
    transform: rotate(0.2deg);
}

input:nth-child(odd) {
    transform: rotate(-0.3deg);
    border-radius: 1px 3px 1px 2px;
}

input:nth-child(even) {
    transform: rotate(0.4deg);
    border-radius: 3px 1px 2px 1px;
}

input::placeholder {
    color: black;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2pt;
    font-size: 10px;
}

.get-in-button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s ease;
}

.get-in-button:hover {
    transform: scale(1.05);
}

.get-in-text {
    font-weight: bold;
    font-size: 14px;
    color: black;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2pt;
}

.arrow {
    font-size: 14px;
    color: black;
    font-weight: bold;
    font-family: 'Times New Roman', serif;
}

/* Page 3 Styles */
.final-card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.confetti {
    position: absolute;
    top: -50px;
    width: 30px;
    height: 45px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    left: var(--start-x);
    transform: rotate(var(--rotation));
    animation: confetti-fall var(--fall-speed) ease-in var(--delay) forwards;
    border: 2px solid red; /* Debug border */
    z-index: 10; /* Make sure they're visible */
}

.card1-confetti {
    background-image: url('card1.jpg');
}

.ace-confetti {
    background-image: url('ace.png');
}

.eight-confetti {
    background-image: url('eight.png');
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .confetti {
        width: 25px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .confetti {
        width: 20px;
        height: 30px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .card-background {
        width: 380px;
        height: 480px;
    }
    
    .heart-image {
        max-width: 180px;
        max-height: 180px;
        transform: translateY(40px);
    }
    
    .feeling-lucky {
        font-size: 2.6em;
        transform: rotate(-13deg) translateX(-45px) translateY(20px);
        letter-spacing: 2pt;
    }
    
    input {
        width: 180px;
        font-size: 13px;
        padding: 9px 11px;
    }
    
    .get-in-text {
        font-size: 13px;
    }
    
    .arrow {
        font-size: 13px;
    }
    
    .wax-seal img {
        max-width: 170px;
        max-height: 170px;
    }
    .wax-seal {
        top: 10%;
    }
}

@media (max-width: 480px) {
    .card-background {
        width: 360px;
        height: 460px;
    }
    
    .heart-image {
        max-width: 160px;
        max-height: 160px;
        margin-bottom: 35px;
        transform: translateY(35px);
    }
    
    .feeling-lucky {
        font-size: 2.4em;
        transform: rotate(-13deg) translateX(-40px) translateY(15px);
        letter-spacing: 2pt;
    }
    
    input {
        width: 160px;
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .get-in-text {
        font-size: 12px;
    }
    
    .arrow {
        font-size: 12px;
    }
    
    .wax-seal img {
        max-width: 150px;
        max-height: 150px;
    }
    .wax-seal {
        top: 8%;
    }
}
