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

img {
    border: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top;
    display: block;
    line-height: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #e1f5fe;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Envelope Styles */
.envelope-wrapper {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.envelope-wrapper:hover {
    transform: scale3d(1.005, 1.005, 1);
}

.envelope-image {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    outline: none;
    vertical-align: top;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.envelope-wrapper.opened .envelope-image {
    opacity: 0;
    transform: translate3d(0, -50px, 0) scale(0.95);
}

.click-hint {
    margin-top: 20px;
    color: #555;
    font-size: 14px;
    font-weight: 300;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Invitation Styles */
.invitation {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.invitation-image {
    max-width: 95%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: flyIn 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.3));
    will-change: transform, opacity;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    vertical-align: top;
    display: block;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@keyframes flyIn {
    from {
        opacity: 0;
        transform: translate3d(0, 60px, 0) scale(0.92);
    }
    50% {
        opacity: 0.8;
        transform: translate3d(0, -10px, 0) scale(1.02);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .envelope-image, .invitation-image {
        max-width: 95%;
    }

    .click-hint {
        font-size: 12px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .click-hint {
        font-size: 11px;
    }
}
