* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Georgia", serif;
}


body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}


/* Background kerajaan */
.background {
    position: fixed;
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            135deg,
            #12001f,
            #3b1d5a,
            #12001f
        );

    z-index: -1;
}


.stars {

    position: absolute;

    width: 100%;
    height: 100%;

    background-image: url("assets/sparkle.png");

    background-repeat: repeat;

    background-size: 40px;

    opacity: 0.4;

    animation: moveStars 20s linear infinite;

}


/* Container utama */
.container {

    position: relative;

    width: 90%;
    max-width: 500px;

    text-align: center;

    padding: 30px;

    background: rgba(255,255,255,0.1);

    border-radius: 20px;

    backdrop-filter: blur(10px);

}


/* Mahkota */
.crown {

    width: 120px;

    animation: float 3s infinite ease-in-out;

    filter: drop-shadow(0 0 15px gold);

}

/* Judul */
.title {

    color: #ffd700;

    margin: 20px 0;

    font-size: 35px;

}


/* Surat */
.letter {

    background-image: url("assets/paper.png");

    background-size: cover;

    background-position: center;

    color: #3b2a16;

    padding: 25px;

    border-radius: 15px;

    min-height: 180px;

    line-height: 1.8;

    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    animation: openLetter 0.8s ease;

}


/* Tombol */
.open-btn {

    margin-top: 25px;

    padding: 12px 30px;

    border: none;

    border-radius: 30px;

    background: #ffd700;

    color: #3b1d5a;

    font-size: 16px;

    cursor: pointer;

    transition: 0.3s;

    box-shadow: 0 0 15px rgba(255,215,0,0.6);

}


.open-btn:hover {

    transform: scale(1.08);

    box-shadow: 0 0 25px rgba(255,215,0,0.9);

}


/* Sparkle */
.sparkle {

    position: absolute;

    width: 50px;

    animation: sparkle 2s infinite alternate;

}


.sparkle-left {

    left: 10px;

    top: 20px;

}


.sparkle-right {

    right: 10px;

    bottom: 20px;

}



/* Animasi crown */
@keyframes float {

    0%,100% {

        transform: translateY(0);

    }


    50% {

        transform: translateY(-15px);

    }

}


/* Animasi surat */
@keyframes openLetter {

    from {

        opacity: 0;

        transform: scale(0.7) translateY(30px);

    }


    to {

        opacity: 1;

        transform: scale(1) translateY(0);

    }

}


/* Animasi sparkle */
@keyframes sparkle {

    from {

        opacity: 0.4;

        transform: scale(0.8);

    }


    to {

        opacity: 1;

        transform: scale(1.2);

    }

}


/* Transisi halaman surat */

.page-change {

    animation: pageChange 0.7s ease;

}

@keyframes pageChange {

    from {

        opacity: 0;

        transform: translateX(40px);

    }


    to {

        opacity: 1;

        transform: translateX(0);

    }

}


@keyframes moveStars {

    from {

        background-position: 0 0;

    }


    to {

        background-position: 500px 500px;

    }

}