body {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Tulip Animation on Load */
.tulip {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: bloom 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay);
}

.tulip-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawPath 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--delay) + 0.2s);
}

.tulip-fill {
    opacity: 0;
    animation: fadeInFill 2s ease forwards;
    animation-delay: calc(var(--delay) + 1.5s);
}

@keyframes bloom {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInFill {
    to {
        opacity: 1;
    }
}

/* Fade In Up Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Animation */
.floating {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Screen Transitions */
#screen-hook.fade-out {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    pointer-events: none;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#screen-result.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Glass & Shadows */
.glass-card {
    box-shadow:
        0 10px 40px -10px rgba(232, 180, 184, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 2px 20px rgba(255, 255, 255, 0.6);
}

.box-shadow-inner {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(232, 180, 184, 0.5);
    border-radius: 4px;
}

/* Animated Deep Gradient Background */
.animated-bg {
    background: linear-gradient(-45deg, #fdfbfb, #fdecf0, #fff0f5, #f4c2c2);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Custom CSS Envelope Animation */
.envelope-wrapper {
    position: relative;
    width: 200px;
    height: 140px;
    margin: 0 auto;
    perspective: 800px;
    z-index: 10;
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f4c2c2;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
}

.envelope::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 70px 100px;
    border-color: transparent transparent #e8b4b8 #e8b4b8;
    z-index: 3;
    border-radius: 0 0 0 8px;
    pointer-events: none;
}

.envelope::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 70px 100px;
    border-color: transparent #e1a6ab #e1a6ab transparent;
    z-index: 4;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}

.envelope .flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 80px 100px;
    border-color: #f4c2c2 transparent transparent transparent;
    transform-origin: top;
    transition: transform 0.6s ease-in-out;
    z-index: 5;
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}

.envelope-wrapper:hover .flap,
.envelope-wrapper.open .flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope .letter {
    position: absolute;
    top: 5px;
    left: 10px;
    right: 10px;
    bottom: 5px;
    background: #fff;
    border-radius: 4px;
    z-index: 2;
    transition: transform 0.6s ease-in-out 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.envelope-wrapper:hover .letter,
.envelope-wrapper.open .letter {
    transform: translateY(-40px);
}