/* ====================================
   RESET
==================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(
        135deg,
        #ff9a9e,
        #fad0c4,
        #fbc2eb,
        #a18cd1
    );
    min-height:100vh;
    overflow-x:hidden;
    color:white;
}

/* ====================================
   SCREEN SYSTEM
==================================== */

.screen{
    display:none;
    min-height:100vh;
    width:100%;
    padding:25px;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.screen.active{
    display:flex;
}

/* ====================================
   COMMON CARD
==================================== */

.gift-container,
.envelope-section,
.typing-card,
.heart-game,
.gallery-section,
.countdown-section,
.love-letter,
.finale{
    width:100%;
    max-width:900px;

    background:rgba(255,255,255,0.15);

    backdrop-filter:blur(12px);

    border:1px solid rgba(
        255,
        255,
        255,
        0.25
    );

    border-radius:25px;

    padding:30px 20px;

    box-shadow:
    0 15px 35px rgba(0,0,0,.15);
}

/* ====================================
   HEADINGS
==================================== */

h1{
    font-size:clamp(
        2rem,
        7vw,
        4rem
    );
    margin-bottom:15px;
}

h2{
    font-size:clamp(
        1.6rem,
        5vw,
        3rem
    );
    margin-bottom:20px;
}

h3{
    font-size:clamp(
        1.3rem,
        4vw,
        2rem
    );
}

p{
    line-height:1.8;
    font-size:1.1rem;
    margin:10px 0;
}

/* ====================================
   BUTTONS
==================================== */

button{

    border:none;

    padding:14px 28px;

    border-radius:50px;

    cursor:pointer;

    background:#ff4d88;

    color:white;

    font-size:1rem;

    font-weight:600;

    margin-top:20px;

    transition:.3s;
}

button:hover{

    transform:translateY(-3px);

    background:#ff2f72;

    box-shadow:
    0 10px 25px rgba(
        255,
        77,
        136,
        .4
    );
}

/* ====================================
   GIFT BOX
==================================== */

.gift-box{

    font-size:120px;

    margin-bottom:20px;

    animation:
    bounceGift 2s infinite;
}

@keyframes bounceGift{

    0%,100%{
        transform:
        translateY(0);
    }

    50%{
        transform:
        translateY(-15px);
    }
}

/* ====================================
   ENVELOPE
==================================== */

.envelope{

    font-size:130px;

    cursor:pointer;

    animation:
    floatEnvelope 3s ease-in-out infinite;
}

@keyframes floatEnvelope{

    0%,100%{
        transform:
        translateY(0);
    }

    50%{
        transform:
        translateY(-15px);
    }
}

/* ====================================
   TYPEWRITER
==================================== */

#typedText{

    min-height:180px;

    font-size:1.2rem;

    line-height:2;
}

/* ====================================
   HEART GAME
==================================== */

.heart-options{

    display:flex;

    justify-content:center;

    align-items:center;

    flex-wrap:wrap;

    gap:20px;

    margin-top:25px;
}

.heart-btn{

    width:90px;

    height:90px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:3rem;

    cursor:pointer;

    transition:.3s;
}

.heart-btn:hover{

    transform:
    scale(1.2)
    rotate(10deg);
}

#heartResult{

    margin-top:25px;

    font-size:1.3rem;

    min-height:80px;

    font-weight:600;
}

/* ====================================
   GALLERY
==================================== */

.gallery{

    display:grid;

    grid-template-columns:
    repeat(
        auto-fit,
        minmax(220px,1fr)
    );

    gap:15px;

    margin-top:25px;
}

.gallery img{

    width:100%;

    height:280px;

    object-fit:cover;

    border-radius:20px;

    cursor:pointer;

    transition:.4s;

    border:4px solid white;
}

.gallery img:hover{

    transform:
    scale(1.05);

    box-shadow:
    0 10px 25px rgba(
        0,
        0,
        0,
        .25
    );
}

/* ====================================
   IMAGE MODAL
==================================== */

#imageModal{

    position:fixed;

    inset:0;

    background:
    rgba(0,0,0,.85);

    display:none;

    justify-content:center;

    align-items:center;

    z-index:9999;
}

#imageModal img{

    width:90%;

    max-width:900px;

    max-height:90vh;

    border-radius:20px;
}

#imageModal span{

    position:absolute;

    top:20px;

    right:30px;

    font-size:35px;

    cursor:pointer;

    color:white;
}

/* ====================================
   COUNTDOWN
==================================== */

.big-count{

    font-size:
    clamp(
        120px,
        25vw,
        250px
    );

    font-weight:900;

    color:white;

    animation:
    pulseCount 1.5s infinite;
}

@keyframes pulseCount{

    0%,100%{
        transform:
        scale(1);
    }

    50%{
        transform:
        scale(1.1);
    }
}

/* ====================================
   LOVE LETTER
==================================== */

.love-letter{

    text-align:left;
}

.love-letter h2{

    text-align:center;
}

.love-letter p{

    margin-bottom:15px;
}

/* ====================================
   FINALE
==================================== */

.finale h1{

    color:#fff;
}

.finale h2{

    color:#ffe7f0;
}

.finale h3{

    margin-top:20px;
}

.ring{

    font-size:120px;

    margin:20px 0;

    animation:
    ringGlow 2s infinite;
}

@keyframes ringGlow{

    0%,100%{
        transform:
        scale(1);
    }

    50%{
        transform:
        scale(1.15);
    }
}

/* ====================================
   FLOATING HEARTS
==================================== */

.floating-heart{

    position:fixed;

    bottom:-50px;

    font-size:24px;

    pointer-events:none;

    z-index:999;

    animation:
    riseHeart
    8s linear forwards;
}

@keyframes riseHeart{

    from{

        transform:
        translateY(0)
        rotate(0deg);

        opacity:1;
    }

    to{

        transform:
        translateY(-120vh)
        rotate(360deg);

        opacity:0;
    }
}

/* ====================================
   FIREWORKS CANVAS
==================================== */

#fireworks{

    position:fixed;

    inset:0;

    width:100%;

    height:100%;

    pointer-events:none;

    z-index:-1;
}

/* ====================================
   MOBILE
==================================== */

@media(max-width:768px){

    .gift-box{
        font-size:90px;
    }

    .envelope{
        font-size:100px;
    }

    .heart-btn{

        width:75px;
        height:75px;

        font-size:2.5rem;
    }

    .gallery img{

        height:240px;
    }

    .love-letter{

        text-align:center;
    }

    button{

        width:100%;
    }
}

center {
  display: none !important;
}

div[style*="position: fixed"][style*="bottom: 0px"] {
    display: none !important;
}