/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #FFFFFF;
    font-family: 'Playfair Display', serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Text container for centered layout */
.text-container {
    text-align: center;
    z-index: 10;
    position: relative;
}

/* First greeting text - "Oi bb!" with fade-in animation */
.greeting-text {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #DC143C;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 2s ease-in-out 0.5s forwards;
}

/* Second message text - "Saudades de você!" with fade-in and scale-up */
.message-text {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #000000;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 2.5s ease-in-out 3s forwards;
}

/* Heart decorations base styles */
.heart {
    position: absolute;
    font-size: 2rem;
    color: #FF69B4;
    z-index: 5;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* Individual heart positioning and rotation animations */
.heart-1 {
    top: 15%;
    left: 20%;
    animation: rotateHeart 4s infinite, float 6s ease-in-out infinite;
    animation-delay: 1s;
}

.heart-2 {
    top: 25%;
    right: 15%;
    animation: rotateHeart 3.5s infinite reverse, float 5s ease-in-out infinite;
    animation-delay: 2s;
}

.heart-3 {
    bottom: 20%;
    left: 25%;
    animation: rotateHeart 5s infinite, float 7s ease-in-out infinite;
    animation-delay: 3.5s;
}

.heart-4 {
    bottom: 15%;
    right: 20%;
    animation: rotateHeart 4.5s infinite reverse, float 6.5s ease-in-out infinite;
    animation-delay: 4s;
}

.heart-5 {
    top: 40%;
    left: 10%;
    animation: rotateHeart 3s infinite, float 5.5s ease-in-out infinite;
    animation-delay: 5s;
}

.heart-6 {
    top: 60%;
    right: 8%;
    animation: rotateHeart 3.8s infinite reverse, float 6.2s ease-in-out infinite;
    animation-delay: 1.5s;
}

.heart-7 {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    animation: rotateHeart 4.2s infinite, float 5.8s ease-in-out infinite;
    animation-delay: 6s;
}

.heart-8 {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    animation: rotateHeart 3.3s infinite reverse, float 6.8s ease-in-out infinite;
    animation-delay: 2.5s;
}

/* Animation keyframes */

/* Fade-in animation for the first text */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-in with scale-up animation for the second text */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Heart rotation animation */
@keyframes rotateHeart {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Floating animation for hearts */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Mobile-first responsive design */

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
    .greeting-text {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .message-text {
        font-size: 1.8rem;
    }
    
    .heart {
        font-size: 1.5rem;
    }
    
    /* Adjust heart positions for mobile */
    .heart-1 { top: 10%; left: 15%; }
    .heart-2 { top: 20%; right: 10%; }
    .heart-3 { bottom: 15%; left: 20%; }
    .heart-4 { bottom: 10%; right: 15%; }
    .heart-5 { top: 35%; left: 5%; }
    .heart-6 { top: 55%; right: 5%; }
}

/* Medium mobile devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .greeting-text {
        font-size: 3.5rem;
        margin-bottom: 1.8rem;
    }
    
    .message-text {
        font-size: 2.2rem;
    }
    
    .heart {
        font-size: 1.8rem;
    }
}

/* Tablets and small desktops (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .greeting-text {
        font-size: 4.5rem;
        margin-bottom: 2.2rem;
    }
    
    .message-text {
        font-size: 2.8rem;
    }
    
    .heart {
        font-size: 2.2rem;
    }
}

/* Large desktops (1025px and up) */
@media (min-width: 1025px) {
    .greeting-text {
        font-size: 5rem;
        margin-bottom: 2.5rem;
    }
    
    .message-text {
        font-size: 3rem;
    }
    
    .heart {
        font-size: 2.5rem;
    }
    
    /* Add more hearts for larger screens */
    .heart-7, .heart-8 {
        display: block;
    }
}

/* Reduce motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    .heart {
        animation: none;
    }
    
    .greeting-text,
    .message-text {
        animation-duration: 0.5s;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .greeting-text {
        color: #B91C3C;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
    
    .message-text {
        color: #000000;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    }
    
    .heart {
        color: #E1306C;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }
}

/* Print styles */
@media print {
    .heart {
        animation: none;
    }
    
    .container {
        height: auto;
    }
    
    .greeting-text,
    .message-text {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
