/* filepath: c:\Users\admin\Desktop\biopage\pagecss\fun.css */
.fun-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 10px 20px;
    margin-left: 220px;
    transition: margin-left 0.3s ease;
    width: calc(100% - 220px);
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fun-container.collapsed {
    margin-left: 10px;
    width: calc(100% - 30px);
}

.gift-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    perspective: 100px; /* 3D effect for better animations */
}

/* Simple letter styling */
.simple-gift {
    position: relative;
    width: 300px; /* Increased from 200px */
    height: 225px; /* Increased from 150px */
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.3s ease;
    z-index: 5;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.25));
    transform-style: preserve-3d; /* 3D effect */
}

/* Letter animation */
.letter-fall {
    animation: letterAppear 0.7s ease-out forwards;
}

.letter-bounce {
    animation: letterBounce 1s ease-in-out infinite;
}

@keyframes landing {
    0% { transform: translateY(-300px) rotate(15deg); }
    70% { transform: translateY(20px) rotate(-5deg); }
    85% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    30% { transform: translateY(-30px) rotate(1deg) scale(1.02); }
    60% { transform: translateY(-15px) rotate(-1deg) scale(1.01); }
    80% { transform: translateY(-5px) rotate(0.5deg) scale(1); }
}

.gift-bottom {
    position: absolute;
    width: 320px; /* Doubled from 160px */
    height: 280px; /* Doubled from 140px */
    background: linear-gradient(135deg, #ff7bac, #ff4d8c);
    bottom: 0;
    border-radius: 20px; /* Increased for proportion */
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.1), 
                inset 0 5px 10px rgba(255, 255, 255, 0.2),
                0 10px 20px rgba(255, 77, 140, 0.4);
    animation: glow 2s infinite alternate;
    background-size: 200% 200%;
    background-position: 0% 0%;
}

@keyframes glow {
    0% { box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.1), 
                    inset 0 5px 10px rgba(255, 255, 255, 0.2),
                    0 10px 20px rgba(255, 77, 140, 0.2);
         background-position: 0% 0%; }
    100% { box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.1), 
                     inset 0 5px 10px rgba(255, 255, 255, 0.2),
                     0 10px 25px rgba(255, 77, 140, 0.6);
          background-position: 100% 100%; }
}

.gift-top {
    position: absolute;
    width: 360px; /* Doubled from 180px */
    height: 80px; /* Doubled from 40px */
    background: linear-gradient(135deg, #ff4d8c, #ff1f6c);
    top: 160px; /* Doubled from 80px */
    left: -20px; /* Doubled from -10px */
    border-radius: 16px; /* Doubled from 8px */
    z-index: 2;
    transform-origin: center;
    transition: transform 0.7s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1),
                0 0 15px rgba(255, 31, 108, 0.3);
    animation: shimmer 3s infinite alternate;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gift-open .gift-top {
    transform: translateY(-160px) rotateX(90deg); /* Doubled from -80px */
    box-shadow: 0 0 30px rgba(255, 31, 108, 0.5);
}

.gift-ribbon {
    position: absolute;
    width: 72px; /* Doubled from 36px */
    height: 280px; /* Doubled from 140px */
    background: linear-gradient(to bottom, #ffce5c, #ffb52e);
    top: 120px; /* Doubled from 60px */
    left: 124px; /* Doubled from 62px */
    z-index: 1;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1),
                0 0 15px rgba(255, 206, 92, 0.3);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1),
                     0 0 5px rgba(255, 206, 92, 0.2); }
    100% { box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1),
                        0 0 15px rgba(255, 206, 92, 0.5); }
}

.gift-bow {
    position: absolute;
    top: 100px; /* Doubled from 50px */
    left: 130px; /* Doubled from 65px */
    z-index: 3;
    transform: translateX(-30px); /* Doubled from -15px */
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.15));
    animation: bowWiggle 3s infinite ease-in-out;
    transform: scale(2); /* Double the size */
}

@keyframes bowWiggle {
    0%, 100% { transform: translateX(-30px) rotate(0deg) scale(2); } /* Updated for double size */
    25% { transform: translateX(-30px) rotate(-2deg) scale(2); } /* Updated for double size */
    75% { transform: translateX(-30px) rotate(2deg) scale(2); } /* Updated for double size */
}

.gift-bow-left,
.gift-bow-right {
    position: absolute;
    width: 42px;
    height: 30px;
    background: linear-gradient(135deg, #ffce5c, #ffb52e);
    border-radius: 50%;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.1), 
                0 0 10px rgba(255, 206, 92, 0.4);
}

.gift-bow-left {
    transform: rotate(30deg);
    left: -15px;
}

.gift-bow-right {
    transform: rotate(-30deg);
    left: 15px;
}

.gift-bow-center {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #ffce5c;
    border-radius: 50%;
    top: 0;
    left: 5px;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.gift-shadow {
    position: absolute;
    width: 360px; /* Doubled from 180px */
    height: 50px; /* Doubled from 25px */
    background: rgba(0, 0, 0, 0.15);
    bottom: -30px; /* Doubled from -15px */
    border-radius: 50%;
    z-index: 1;
    filter: blur(16px); /* Doubled from 8px */
    animation: shadowPulse 1.2s infinite alternate;
}

@keyframes shadowPulse {
    from { transform: scale(1); opacity: 0.15; }
    to { transform: scale(1.15); opacity: 0.3; }
}

.click-instruction {
    position: static;
    margin-top: 30px;
    text-align: center;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards, float 2s ease-in-out infinite;
    font-weight: bold;
    color: #ff4d8c;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 16px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Popup styling */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.popup-show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(255, 77, 140, 0.3);
    position: relative;
    background: linear-gradient(135deg, #fff8f9, #fff);
    border: 2px solid #ffebf1;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-content h2 {
    margin-bottom: 30px;
    color: #ff4d8c;
    font-size: 24px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.05);
    position: relative;
    display: inline-block;
}

.popup-content h2:before, .popup-content h2:after {
    content: '❤️';
    font-size: 20px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.popup-content h2:before {
    left: -30px;
}

.popup-content h2:after {
    right: -30px;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.popup-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.popup-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.popup-btn:hover:before {
    left: 100%;
}

.yes-btn {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
}

.yes-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

.no-btn {
    background: linear-gradient(to right, #ff7bac, #ff4d8c);
    color: white;
    transition: all 0.3s ease;
}

.no-btn:hover {
    transform: scale(0.95);
    box-shadow: 0 8px 20px rgba(255, 77, 140, 0.3);
}

.popup-message {
    display: none;
    margin-top: 20px;
}

.popup-message h3 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 22px;
}

.popup-message i {
    color: #e74c3c;
    animation: heartBeat 1s infinite alternate;
}

@keyframes heartBeat {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

/* Hearts animation */
.heart-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.heart {
    position: absolute;
    font-size: 24px;
    animation: floatUp linear forwards;
    bottom: -20px;
    opacity: 0.9;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-25vh) rotate(10deg);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-50vh) rotate(-10deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-75vh) rotate(10deg);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(-10deg);
        opacity: 0;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .fun-container {
        margin-left: 30px;
        width: calc(100% - 30px);
        padding: 20px;
    }
    
    .gift-box {
        width: 120px;
        height: 120px;
    }
    
    .gift-bottom {
        width: 120px;
        height: 80px;
    }
    
    .gift-top {
        width: 140px;
        height: 30px;
        top: 50px;
    }
    
    .gift-ribbon {
        width: 24px;
        height: 80px;
        left: 48px;
    }
    
    .gift-bow {
        left: 48px;
        transform: translateX(-12px);
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .popup-btn {
        padding: 8px 20px;
    }
}

/* Remove all complex gift styles and add simple letter styles */

@keyframes letterAppear {
    0% { transform: translateY(-50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes letterBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.letter {
    position: relative;
    width: 300px;
    height: 225px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.5s ease;
}

.letter-top {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    transform-origin: top;
    transition: transform 0.6s ease;
    z-index: 3;
    border-radius: 5px;
    background-image: linear-gradient(135deg, transparent 0%, transparent 50%, #f0f0f0 50%, #f0f0f0 100%);
}

.letter-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff7bac, #ff4d8c);
    border-radius: 5px;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter-seal {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #ffce5c;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#gift:hover .letter-seal {
    transform: translate(-50%, -50%) scale(1.1);
}

#gift.open .letter-top {
    transform: rotateX(180deg);
}

#gift.open .letter-seal {
    opacity: 0;
}
