:root{
    --bg1:#fff0f6;
    --bg2:#ffe3ec;
    --ink:#2b2b2b;
    --pink:#ff4d8d;
    --pink2:#ff8fb1;
    --card:#ffffffcc;
    --shadow: 0 18px 50px rgba(0,0,0,.12);
    --radius: 26px;
}

*{ box-sizing:border-box; }

body{
    margin:0;
    min-height:100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
    color:var(--ink);
    background:
            radial-gradient(1100px 700px at 20% 10%, var(--bg2), transparent 60%),
            radial-gradient(900px 600px at 90% 30%, #ffd1dc, transparent 60%),
            linear-gradient(180deg, var(--bg1), #ffffff);
    overflow:hidden;
}

.shell{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
}

/* Floating hearts */
.heartFloat{
    position:fixed;
    left:var(--x);
    top:110%;
    width:18px;
    height:18px;
    transform: rotate(45deg);
    background: color-mix(in srgb, var(--pink) var(--p), white);
    opacity:.85;
    animation: floatUp var(--d) linear infinite;
    filter: drop-shadow(0 8px 14px rgba(255,77,141,.22));
    border-radius:4px;
    pointer-events:none;
    z-index:0;
}
.heartFloat::before,.heartFloat::after{
    content:"";
    position:absolute;
    width:18px;height:18px;
    background:inherit;
    border-radius:50%;
}
.heartFloat::before{left:-9px; top:0}
.heartFloat::after{left:0; top:-9px}
@keyframes floatUp{
    0%{ transform: translateY(0) rotate(45deg) scale(var(--s)); }
    100%{ transform: translateY(-130vh) rotate(45deg) scale(var(--s)); }
}

.panel{
    width:min(980px, 100%);
    background:var(--card);
    backdrop-filter: blur(10px);
    border:1px solid rgba(255,77,141,.18);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding:28px;
    position:relative;
    overflow:hidden;
    z-index:2;
    text-align:center;
}

.panel::after{
    content:"";
    position:absolute;
    inset:-40px;
    background:
            radial-gradient(circle at 20% 20%, rgba(255,77,141,.16), transparent 45%),
            radial-gradient(circle at 90% 30%, rgba(255,143,177,.18), transparent 45%);
    pointer-events:none;
}

.hidden{ display:none !important; }

.naslov{
    margin-top: 40px; /* your tweak */
    margin-bottom: 10px;
    font-size: clamp(32px, 4.5vw, 50px);
    line-height:1.05;
    letter-spacing:-.02em;
    position:relative;
    z-index:2;
}

h1{
    margin:0 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing:-.02em;
    line-height:1.05;
    position:relative;
    z-index:2;
}

.sub{
    margin:0 0 10px;
    font-size: clamp(14px, 2vw, 18px);
    opacity:.85;
    position:relative;
    z-index:2;
}

/* Music button */
.musicToggle{
    position:absolute;
    top:48px;
    right:24px;
    width:64px;
    height:64px;
    border-radius:50%;
    border:0;
    cursor:pointer;
    font-size:26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 14px 26px rgba(0,0,0,.14);
    z-index:10;
    display:grid;
    place-items:center;

    /* smooth movement */
    transition:
            top .6s cubic-bezier(.2,.9,.2,1),
            right .6s cubic-bezier(.2,.9,.2,1),
            transform .15s ease,
            box-shadow .15s ease;
}

/* When envelope opens, shift the button somewhere else */
#appCard.opened .musicToggle{
    top:200px;
    right:488px;
    /* or you can move it lower/inward if you want */
    /* top: 90px; right: 26px; */
}

.musicToggle:hover{
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(0,0,0,.18);
}

.musicToggle:active{
    transform: scale(.94);
}




/* Open hint */
.openHint{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    justify-content:center;
    margin: 8px 0 18px;
    position:relative;
    z-index:2;
    font-weight:900;
    opacity:.9;
}
.openHint .arrow{
    font-size: 26px;
    transform-origin:center;
    animation: pulsePink 1.6s ease-in-out infinite;
    filter: drop-shadow(0 6px 10px rgba(255,77,141,.35));
}
@keyframes pulsePink{
    0%,100%{
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 6px 10px rgba(255,77,141,.25));
        opacity: .85;
    }
    50%{
        transform: translateY(8px) scale(1.18);
        filter: drop-shadow(0 10px 18px rgba(255,77,141,.55));
        opacity: 1;
    }
}

/* Envelope */
.envelopeWrap{
    display:grid;
    place-items:center;
    margin-top: 18px;
    position:relative;
    z-index:2;
}
.envelope{
    width: min(520px, 92%);
    height: 320px;
    border-radius: 26px;
    background: linear-gradient(145deg, #fff, #ffe6ef);
    border:1px solid rgba(0,0,0,.06);
    position:relative;
    overflow:hidden;
    box-shadow: 0 18px 46px rgba(255,77,141,.18);
    display:grid;
    place-items:center;
}
.env-body{
    width: 80%;
    height: 64%;
    background: linear-gradient(180deg, #ffffff, #fff5fa);
    border:1px solid rgba(0,0,0,.06);
    border-radius:20px;
    position:relative;
    transform: translateY(12px);
    z-index:1;
}
.env-flap{
    position:absolute;
    top:12%;
    width: 0; height: 0;
    border-left: 190px solid transparent;
    border-right: 190px solid transparent;
    border-top: 150px solid #ffd1e0;
    filter: drop-shadow(0 16px 20px rgba(0,0,0,.08));
    transform-origin: top center;
    transform: translateY(-6px) rotateX(0deg);
    transition: transform .65s cubic-bezier(.2,.9,.2,1);
    z-index:2;
}
@media (max-width: 520px){
    .env-flap{
        border-left: 150px solid transparent;
        border-right: 150px solid transparent;
        border-top: 125px solid #ffd1e0;
    }
    .envelope{height: 300px;}
}
.seal{
    position:absolute;
    bottom:17%;
    width:74px;height:74px;
    border-radius:50%;
    background: radial-gradient(circle at 30% 30%, #ff9ec2, #ff4d8d);
    box-shadow: 0 18px 30px rgba(255,77,141,.25);
    display:grid;
    place-items:center;
    color:white;
    font-size:32px;
    border: 3px solid rgba(255,255,255,.75);
    z-index:3;
    cursor:pointer;
    user-select:none;
    transition: transform .12s ease, box-shadow .12s ease;
}
.seal:hover{
    box-shadow: 0 22px 36px rgba(255,77,141,.28);
    transform: translateY(-1px);
}
.seal:active{ transform: scale(.98); }
.envelope.opened .env-flap{
    transform: translateY(-6px) rotateX(65deg);
}

/* Question */
.question{
    margin-top: 18px;
    display:none;
    position:relative;
    z-index:2;
    text-align:center;
}
.question.show{ display:block; }
.qTitle{
    font-size: 22px;
    font-weight: 900;
    margin: 4px 0 12px;
}
.controls{
    display:flex;
    gap:12px;
    justify-content:center;
    flex-wrap:wrap;
    margin-top: 10px;
    min-height:56px;
    position:relative;
}
button{
    border:0;
    cursor:pointer;
    padding:14px 18px;
    font-weight:900;
    border-radius: 14px;
    font-size:16px;
    transition: transform .12s ease, box-shadow .12s ease;
    user-select:none;
}
button:active{transform: translateY(1px) scale(.99)}
.yes{
    background: linear-gradient(135deg, #ff4d8d, #ff86b1);
    color:white;
    box-shadow: 0 14px 26px rgba(255,77,141,.28);
}
.yes:hover{transform: translateY(-1px)}
.no{
    background: rgba(255,255,255,.9);
    border:1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
    position:relative;
}

/* Gifts */
.grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
    margin-top: 14px;
    position:relative;
    z-index:2;
}
@media (max-width: 860px){
    .grid{grid-template-columns: 1fr}
}
.gift{
    background: rgba(255,255,255,.9);
    border:1px solid rgba(0,0,0,.07);
    border-radius: 22px;
    padding:18px;
    box-shadow: 0 14px 28px rgba(0,0,0,.08);
    cursor:pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    position:relative;
    overflow:hidden;
}
.gift:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0,0,0,.10);
}
.emoji{
    font-size: 44px;
    margin-bottom: 8px;
}
.title{
    font-weight:900;
    font-size: 18px;
    margin:0 0 6px;
}
.desc{
    margin:0;
    opacity:.85;
    line-height:1.4;
}
.result{
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,77,141,.10);
    border:1px solid rgba(255,77,141,.18);
    font-weight:900;
    display:none;
}
.footer{
    margin-top: 18px;
    opacity:.75;
    font-size: 13px;
}
/* Mystery boxes layout */
.mysteryRow{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
    margin-top: 14px;
    position:relative;
    z-index:2;
}
@media (max-width: 860px){
    .mysteryRow{ grid-template-columns: 1fr; }
}

.mysteryBox{
    border:0;
    padding:0;
    cursor:pointer;
    background: transparent;
    position:relative;
    height: 190px;
    border-radius: 24px;
    overflow:hidden;
    box-shadow: 0 14px 28px rgba(0,0,0,.08);
    border:1px solid rgba(0,0,0,.07);
    transition: transform .14s ease, box-shadow .14s ease;
}
.mysteryBox:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0,0,0,.10);
}
.mysteryBox.seen{
    opacity: .82;
}
.mysteryBox.seen .boxTag::after{
    content:" ✓";
    color: rgba(255,77,141,.95);
    font-weight: 900;
}

.boxBody{
    position:absolute;
    left:14px; right:14px;
    bottom:18px;
    height:110px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #ffe6ef);
    border:1px solid rgba(0,0,0,.06);
}
.boxLid{
    position:absolute;
    left:18px; right:18px;
    top:40px;
    height:44px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffd1e0, #ffb3cc);
    border:1px solid rgba(0,0,0,.06);
    transform-origin: top center;
    transition: transform .35s ease;
}
.mysteryBox:hover .boxLid{
    transform: rotateX(20deg) translateY(-2px);
}

.boxBow{
    position:absolute;
    left:50%;
    top:58px;
    transform: translateX(-50%);
    font-size: 30px;
    filter: drop-shadow(0 10px 16px rgba(255,77,141,.22));
}
.boxTag{
    position:absolute;
    left:16px;
    top:14px;
    font-weight: 900;
    opacity:.88;
    background: rgba(255,255,255,.75);
    border:1px solid rgba(0,0,0,.06);
    padding: 6px 10px;
    border-radius: 999px;
}

/* Reveal overlay */
.revealOverlay{
    position:fixed;
    inset:0;
    background: rgba(10,10,10,.42);
    backdrop-filter: blur(6px);
    display:grid;
    place-items:center;
    z-index:999;
    padding: 18px;
}
.revealCard{
    width: min(720px, 100%);
    min-height: 420px;              /* 👈 locks overall height */
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(0,0,0,.22);
    padding: 18px 18px 16px;
    position:relative;
    overflow:hidden;
    display:flex;                  /* 👈 allows vertical layout control */
    flex-direction: column;
}

.revealClose{
    position:absolute;
    top:12px;
    right:12px;
    width:42px;
    height:42px;
    border-radius:50%;
    border:0;
    cursor:pointer;
    background: rgba(255,255,255,.9);
    box-shadow: 0 10px 18px rgba(0,0,0,.12);
    font-size:18px;
}
.revealTitle{
    font-weight: 1000;
    font-size: 22px;
    margin: 4px 0 10px;
}
.revealStage{
    flex: 1;                       /* 👈 fills available space */
    min-height: 260px;             /* fallback */
    border-radius: 22px;
    border:1px solid rgba(0,0,0,.06);
    background:
            radial-gradient(circle at 20% 20%, rgba(255,77,141,.18), transparent 45%),
            radial-gradient(circle at 80% 30%, rgba(255,143,177,.18), transparent 50%),
            linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,230,239,.75));
    display:grid;
    place-items:center;
    padding: 18px;
    position:relative;
    overflow:hidden;
}

.revealActions{
    display:flex;
    justify-content:center;
    margin-top: 12px;
    min-height: 56px;   /* 👈 prevents button jump */
    align-items:center;
}

.revealNext{
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 900;
    border:0;
    cursor:pointer;
    background: linear-gradient(135deg, #ff4d8d, #ff86b1);
    color:white;
    box-shadow: 0 14px 26px rgba(255,77,141,.20);
}
.revealNext:active{ transform: translateY(1px) scale(.99); }

/* Big flowers scene */
.bigFlowers{
    font-size: 96px;
    line-height:1;
    filter: drop-shadow(0 18px 30px rgba(255,77,141,.22));
    animation: bloom 1.25s ease-in-out infinite;
}
@keyframes bloom{
    0%,100%{ transform: translateY(0) scale(1); }
    50%{ transform: translateY(-6px) scale(1.05); }
}

/* Hug scene */
.hugScene{
    width: min(520px, 100%);
    height: 220px;
    display:grid;
    place-items:center;
    position:relative;
}
.hugWrap{
    display:flex;
    align-items:flex-end;
    gap:14px;
}
.char{
    width: 110px;
    height: 160px;
    border-radius: 30px;
    position:relative;
    box-shadow: 0 16px 30px rgba(0,0,0,.10);
    border:1px solid rgba(0,0,0,.06);
}
.char .face{
    position:absolute;
    top:26px;
    left:50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    border:1px solid rgba(0,0,0,.06);
    display:grid;
    place-items:center;
    font-size: 28px;
}
.char.left{
    background: linear-gradient(180deg, rgba(255,77,141,.35), rgba(255,255,255,.85));
    animation: hugLeft 1.4s ease-in-out infinite;
}
.char.right{
    background: linear-gradient(180deg, rgba(255,143,177,.35), rgba(255,255,255,.85));
    animation: hugRight 1.4s ease-in-out infinite;
}
@keyframes hugLeft{
    0%,100%{ transform: translateX(0); }
    50%{ transform: translateX(10px); }
}
@keyframes hugRight{
    0%,100%{ transform: translateX(0); }
    50%{ transform: translateX(-10px); }
}
.hugHearts{
    position:absolute;
    top:18px;
    font-size: 34px;
    opacity:.9;
    animation: popHearts 1.2s ease-in-out infinite;
    filter: drop-shadow(0 12px 18px rgba(255,77,141,.18));
}
@keyframes popHearts{
    0%,100%{ transform: translateY(0) scale(1); opacity:.75; }
    50%{ transform: translateY(-10px) scale(1.12); opacity:1; }
}

/* Spicy scene */
.spicyScene{
    text-align:center;
}
.spicyBig{
    font-size: 86px;
    line-height:1;
    animation: spicyWiggle .9s ease-in-out infinite;
    filter: drop-shadow(0 18px 30px rgba(255,77,141,.18));
    margin-bottom: 30px;
}
@keyframes spicyWiggle{
    0%,100%{ transform: rotate(0deg) scale(1); }
    50%{ transform: rotate(0deg) scale(1.01); }
}
.spicyText{
    margin-top: 10px;
    font-weight: 1000;
    font-size: 20px;
}


/* Requests */
.requests{
    margin-top: 18px;
    padding: 16px;
    border-radius: 22px;

    /* darker attention grey */
    background:
            radial-gradient(circle at 20% 20%, rgba(255,255,255,.55), transparent 45%),
            linear-gradient(180deg, #e2e2e2, #d4d4d4);

    border: 1px solid rgba(0,0,0,.22);
    box-shadow:
            0 16px 32px rgba(0,0,0,.20),
            inset 0 1px 0 rgba(255,255,255,.6);

    position:relative;
    z-index:2;
}

@keyframes requestGlowGrey{
    0%,100%{
        box-shadow:
                0 16px 32px rgba(0,0,0,.20),
                inset 0 1px 0 rgba(255,255,255,.6);
    }
    50%{
        box-shadow:
                0 20px 40px rgba(0,0,0,.32),
                inset 0 1px 0 rgba(255,255,255,.6);
    }
}

.requests.attention{
    animation: requestGlowGrey 2.2s ease-in-out infinite;
}


.reqTop{
    display:flex;
    align-items:center;
    gap:12px;
    cursor:pointer;
    user-select:none;
}
.reqAnimal{
    width:52px;
    height:52px;
    border-radius:18px;
    display:grid;
    place-items:center;
    font-size:30px;
    background: rgba(255,77,141,.10);
    border: 1px solid rgba(255,77,141,.18);
}
.reqText{ flex:1; }
.reqTitle{
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 2px;
}
.reqSub{
    opacity:.75;
    font-weight: 900;
    font-size: 13px;
}
.qm{
    display:inline-block;
    font-weight: 900;
    color: var(--pink);
    margin-left: 4px;
    animation: qmpulse 1.4s ease-in-out infinite;
}
@keyframes qmpulse{
    0%,100%{ transform: scale(1); opacity:.75; }
    50%{ transform: scale(1.18); opacity:1; }
}
.reqBox{
    display:none;
    margin-top: 12px;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}
.reqBox.show{ display:flex; }
#reqInput{
    flex:1;
    min-width: 220px;
    padding:12px 14px;
    border-radius: 14px;
    border:1px solid rgba(0,0,0,.10);
    outline:none;
    font-size:15px;
    background: rgba(255,255,255,.85);
}
.reqSend{
    padding:12px 14px;
    border-radius: 14px;
    font-weight: 900;
    border:0;
    cursor:pointer;
    background: linear-gradient(135deg, #ff4d8d, #ff86b1);
    color:white;
    box-shadow: 0 14px 26px rgba(255,77,141,.20);
}
.reqSend:active{ transform: translateY(1px) scale(.99); }

/* Toast */
.toast{
    position:fixed;
    left:50%;
    bottom:18px;
    transform: translateX(-50%);
    background: rgba(43,43,43,.92);
    color:white;
    padding:12px 14px;
    border-radius: 999px;
    box-shadow: 0 16px 30px rgba(0,0,0,.22);
    font-weight:800;
    opacity:0;
    pointer-events:none;
    transition: opacity .25s ease, transform .25s ease;
    z-index:80;
}
.toast.show{
    opacity:1;
    transform: translateX(-50%) translateY(-6px);
}

#headline {
    margin-top: 40px;
}