body {
    margin: 0;
    background: linear-gradient(to bottom right, #FF1493, #8A2BE2, #FF69B4);
    min-height: 100vh;
    overflow: hidden;
    font-family: 'Comic Sans MS', cursive, 'Segoe UI', Tahoma;
    color: #fff;
}

.container {
    position: relative;
    text-align: center;
    padding-top: 2rem;
}

.title {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 1rem;
    animation: softGlow 3s ease-in-out infinite;
}

.rose-container {
    position: relative;
    height: 70vh;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #FF1493, #FF69B4);
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 15px #FF69B4;
    user-select: none;
}

.btn:hover {
    animation: rainbow 1.5s infinite;
    box-shadow: 0 0 25px #FF1493;
}

.btn:active {
    transform: scale(0.95);
    filter: brightness(1.1);
}

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.heart {
    position: absolute;
    color: #ff0066;
    animation: float 6s infinite ease-in-out;
    will-change: transform;
    filter: drop-shadow(0 0 5px rgba(255, 105, 180, 0.5));
}

/* Updated message styling for love letter effect */
.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 240, 245, 0.98);
    color: #4A154B;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 20, 147, 0.4);
    max-width: 80%;
    border: 3px solid #FF69B4;
    animation: letterAppear 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    font-family: 'Comic Sans MS', cursive, 'Segoe UI', Tahoma;
    line-height: 1.6;
}

.message h2 {
    color: #FF1493;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(255, 105, 180, 0.3);
}

.message p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.signature {
    font-style: italic;
    margin-top: 2rem;
    color: #FF1493;
    font-size: 1.3rem !important;
    font-weight: bold;
}

.hidden {
    display: none;
}

.petal {
    position: absolute;
    width: 20px;
    height: 30px;
    background: linear-gradient(45deg, #FF1493, #FF69B4, #FFB6C1);
    border-radius: 50%;
    transform-origin: bottom center;
    filter: drop-shadow(0 2px 5px rgba(255, 20, 147, 0.3));
}

.floating-message {
    position: absolute;
    animation: float 6s ease-out;
    font-size: 1.3rem;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    border: 2px solid #FF69B4;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.4);
    color: #FF1493;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

/* Keyframe Animations */
@keyframes float {
    0% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0; 
    }
    20% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-100vh) rotate(360deg); 
        opacity: 0; 
    }
}

@keyframes rainbow {
    0% { background-color: #FF1493; }
    25% { background-color: #FF69B4; }
    50% { background-color: #8A2BE2; }
    75% { background-color: #FF6B6B; }
    100% { background-color: #FF1493; }
}

@keyframes softGlow {
    0%, 100% { 
        text-shadow: 0 0 10px #fff, 0 0 20px #FF69B4; 
    }
    50% { 
        text-shadow: 0 0 20px #fff, 0 0 30px #FF1493, 0 0 40px #FF69B4; 
    }
}

@keyframes letterAppear {
    0% { 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0;
    }
    70% { 
        transform: translate(-50%, -50%) scale(1.05); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1;
    }
}

/* Rose animation adjustments */
.rose {
    position: absolute;
    transition: all 2s ease-out;
    transform-origin: center bottom;
    filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.6));
}

/* Mobile-First Enhancements */
@media (max-width: 768px) {
    body {
        overflow: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .container {
        padding-top: 1rem;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .title {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 1rem;
        margin: 0.5rem 0;
    }

    .btn {
        padding: 1rem;
        font-size: 1.1rem;
        margin: 1rem auto;
        width: 80%;
        max-width: 300px;
        touch-action: manipulation;
    }

    .message {
        width: 90%;
        padding: 1.2rem;
        font-size: 0.95rem;
        max-height: 80vh;
        overflow-y: auto; /* Allow scrolling for long message */
    }

    .message h2 {
        font-size: 1.5rem;
    }

    .message p {
        font-size: 0.95rem;
    }

    .signature {
        font-size: 1.1rem !important;
    }

    .floating-message {
        font-size: 1.1rem;
        padding: 0.4rem 1rem;
    }

    /* Mobile-specific landscape orientation */
    @media (orientation: landscape) {
        .title {
            font-size: 1.5rem;
        }
        
        .rose-container {
            height: 50vh;
        }

        .message {
            max-height: 70vh;
        }
    }
}

/* Small phones */
@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .message {
        padding: 1rem;
    }

    .message h2 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* Prevent accidental horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}