@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;700&family=Quicksand:wght@400;700&display=swap');

:root {
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9f295 45%, #e6be8a 70%, #b8860b 100%);
    --deep-pink: #FF1493;
    --hot-pink: #FF69B4;
    --magenta: #C71585;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #880e4f, #ad1457, #c2185b);
    color: white;
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/gold-scale.png');
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* --- WELCOME SCREEN --- */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #fce4ec, #f06292);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.gift-box {
    text-align: center;
    cursor: pointer;
    width: 90%;
    max-width: 500px;
}

.gift-box .emoji {
    font-size: 8rem;
    display: block;
    animation: pulseHeart 2s infinite;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#start-btn {
    margin-top: 30px;
    padding: 18px 45px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    background: var(--gold-gradient);
    color: #4e342e;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    font-weight: 700;
    width: auto;
    max-width: 100%;
}

/* --- MAIN CONTENT --- */
#main-content {
    display: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

header {
    text-align: center;
    padding: 80px 20px;
}

h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 5.5rem;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    overflow-wrap: break-word;
    font-weight: 700;
}

.subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.2rem;
    color: #f8bbd0;
    font-weight: 700;
}

/* --- ALBUM GRID --- */
.album-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    justify-items: center;
}

.polaroid-wrapper {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
    width: 100%;
    display: flex;
    justify-content: center;
}

.polaroid-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.polaroid {
    background: white;
    padding: 15px 15px 65px 15px;
    border-radius: 15px; /* Angoli morbidi */
    box-shadow: 0 15px 35px rgba(199, 21, 133, 0.2); /* Ombra rosa scuro diffusa */
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid #fce4ec; /* Bordo rosa chiaro */
    width: 280px;
}

/* Washi Tape (Nastro Adesivo Decorativo) */
.polaroid::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 90px;
    height: 30px;
    background: rgba(212, 175, 55, 0.4); /* Oro semitrasparente */
    backdrop-filter: blur(2px);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
    z-index: 5;
    border-left: 2px dashed rgba(255,255,255,0.5);
    border-right: 2px dashed rgba(255,255,255,0.5);
}

.polaroid:hover {
    transform: scale(1.08) translateY(-15px);
    box-shadow: 0 30px 60px rgba(199, 21, 133, 0.3);
    border-color: #ffd700; /* Bordo dorato all'hover */
}

.polaroid img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-radius: 10px; /* Arrotonda anche l'immagine */
    border: 1px solid #f8bbd0;
}

.caption {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--magenta);
}

.floating-icon {
    position: fixed;
    font-size: 2rem;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
    animation: floatUpSlow 20s linear infinite;
}

@keyframes floatUpSlow {
    from { transform: translateY(100vh) rotate(0deg); }
    to { transform: translateY(-100vh) rotate(360deg); }
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 120px 20px;
}

.dedication-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 50px;
    border: 3px solid #ffd700;
    display: inline-block;
    max-width: 90%;
}

.dedication-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.5rem;
    color: #ffd700;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    header {
        padding: 40px 15px;
    }

    h1 {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.4rem;
    }

    .gift-box .emoji {
        font-size: 5rem;
    }

    #start-btn {
        font-size: 1.3rem;
        padding: 15px 30px;
    }

    .album-container {
        gap: 30px;
        padding: 10px;
    }

    .polaroid {
        width: 250px;
        padding: 10px 10px 55px 10px;
    }

    .caption {
        font-size: 1.1rem;
        bottom: 10px;
    }

    footer {
        padding: 60px 15px;
    }

    .dedication-card {
        padding: 30px 20px;
        border-radius: 30px;
    }

    .dedication-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 380px) {
    h1 {
        font-size: 2.2rem;
    }
    .polaroid {
        width: 220px;
    }
    .polaroid img {
        height: 200px;
    }
}
