body {
    font-family: "Montserrat", sans-serif;
    background: linear-gradient(135deg, #ffdde1, #ee9ca7);
    margin: 0;
    padding: 0;
    text-align: center;
    overflow-x: hidden;
}

.container {
    max-width: 850px;
    margin: 60px auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.container audio{
    width: 100%;
    background-color: transparent;
}

h1 {
    font-family: "Qwitcher Grypen", cursive;
    font-size: 3rem;
    color: #c0392b;
    margin-bottom: 20px;
}

h3 {
    font-weight: 300;
    color: #444;
    margin-bottom: 20px;
}

#tempo {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 15px;
    color: #27ae60;
}

/* Galeria */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

fieldset {
    border: solid black 1px;
    border-radius: .3em;
}

legend {
    color: black;
    margin: 3px;
    border: 3px 0 3px 0;
    border-color: black;
    border-width: 1px;
    text-align: left;
}

.gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}
.gallery video{
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.gallery img:hover,
.gallery video:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 100, 0.3);
}


/* Corações animados */
.heart {
    position: fixed;
    top: -10px;
    font-size: 20px;
    color: red;
    animation: fall linear forwards;
    z-index: 0;
    opacity: 0.8;
}

.fixImg{
    position: fixed;
    max-width: 850px;
    z-index: 2;
    & .Img_right{   transform: rotate(0.015turn) translate(20%, 0%);    }

    & .Img_left{
        left: 0px;
        top: 50%;
    }
}

@keyframes fall {
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

h1 {
    animation: pulseCartoon 10s infinite ease-in-out;
    transform-style: preserve-3d;
    display: inline-block;
    perspective: 1000px;
}

@keyframes pulseCartoon {
    0%   { transform: scale(1) rotate3d(0, 0, 0, 0deg); }
    10%  { transform: scale(1.05) rotate3d(1, 0, 0, 2deg); }
    20%  { transform: scale(1.1) rotate3d(0, 1, 0, -2deg); }
    30%  { transform: scale(1.15) rotate3d(1, 1, 0, 3deg); }
    40%  { transform: scale(1.1) rotate3d(0, 1, 0, -1deg); }
    50%  { transform: scale(1.2) rotate3d(1, 0, 1, 4deg); }
    60%  { transform: scale(1.1) rotate3d(0, 1, 0, -2deg); }
    70%  { transform: scale(1.15) rotate3d(1, 0, 0, 2deg); }
    80%  { transform: scale(1.08) rotate3d(0, 0, 1, -1deg); }
    90%  { transform: scale(1.03) rotate3d(1, 1, 0, 1deg); }
    100% { transform: scale(1) rotate3d(0, 0, 0, 0deg); }
}



@media (max-width: 600px) {
    .container {
        margin: 20px;
        padding: 20px;
    }

    .fixImg{
        visibility: hidden;
    }

    h1 {
        font-size: 2.2rem;
    }

    #tempo {
        font-size: 1rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
}
