.temas {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    justify-items: center;
    align-items: start;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin-bottom: 2rem;
    padding: 0 1rem;
    grid-auto-flow: row;
    grid-auto-rows: minmax(180px, auto);
}
body {
    font-family: 'Segoe UI', cursive, sans-serif;
    background: linear-gradient(135deg, #fbeee6 0%, #f7cac9 30%, #b3c6e7 65%, #a2d5c6 100%);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100vw;
    min-width: 0;
    overflow-x: hidden;
}
header {
    background: #fff0f5;
    text-align: center;
    padding: 2rem 0 1rem 0;
    border-bottom: 4px dashed #e75480;
}
h1 {
    font-size: 2.5rem;
    color: #e75480;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px #b3c6e7;
}
.tema {
    font-size: 1.2rem;
    color: #a0522d;
    font-style: italic;
}
main {
    padding: 2rem;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
}
.album {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
}
.foto {
    background: linear-gradient(135deg, #fff 60%, #b3c6e7 100%);
    border: 3px solid #e75480;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(67,142,185,0.15), 0 2px 8px rgba(162,213,198,0.10);
    padding: 1rem;
    width: 260px;
    max-width: 95vw;
    min-width: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.foto img {
    width: 220px;
    max-width: 90vw;
    min-width: 0;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid #b3c6e7;
    box-shadow: 0 0 0 6px #f7cac9, 0 0 0 12px #a2d5c6;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}
.legenda {
    font-size: 1rem;
    color: #a0522d;
    margin-top: 0.5rem;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(90deg, #f7cac9 0%, #b3c6e7 100%);
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    display: inline-block;
}
footer {
    background: linear-gradient(90deg, #fff0f5 60%, #b3c6e7 100%);
    text-align: center;
    padding: 1rem;
    border-top: 4px dashed #e75480;
    color: #e75480;
    font-size: 1.1rem;
}
/* Decoração temática: flores */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background-image: url('https://pngimg.com/uploads/flower/flower_PNG100.png'), url('https://pngimg.com/uploads/rose/rose_PNG106.png');
    background-repeat: repeat;
    opacity: 0.10;
    z-index: 0;
}

/* Responsividade */
@media (max-width: 900px) {
    .temas {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }
    .album {
        gap: 1rem;
    }
    .foto {
        width: 180px;
        padding: 0.5rem;
    }
    .foto img {
        width: 140px;
        height: 140px;
    }
    .capa-tema img {
    width: 100%;
    max-width: 220px !important;
    height: auto !important;
    min-width: 0 !important;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .temas {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0;
    }
    main {
        padding: 0.5rem;
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        box-sizing: border-box;
    }
    .album {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        box-sizing: border-box;
    }
    .foto {
        width: 95vw;
        max-width: 320px;
        min-width: 0;
        padding: 0.3rem;
        box-sizing: border-box;
    }
    .foto img {
        width: 90vw;
        max-width: 220px;
        min-width: 0;
        height: auto;
        box-sizing: border-box;
    }
    .capa-tema {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 160px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    }
    .capa-tema img {
    width: 100%;
    max-width: 120px !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    }
    #login-area, #add-foto-area {
        padding: 0.5rem;
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        box-sizing: border-box;
    }
    input, button {
        width: 90vw;
        max-width: 300px;
        min-width: 0;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        box-sizing: border-box;
    }
}
