/* =========================
   PENGATURAN DASAR
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    min-height: 100vh;
    color: #70466f;

    background: linear-gradient(
        135deg,
        #ffd6e8,
        #e8c8f5,
        #d2b8f3
    );

    overflow-x: hidden;
}

h1, h2 {
    font-weight: 700;
}

button {
    font-family: 'Poppins', sans-serif;
}


/* =========================
   LATAR HIASAN
========================= */

.latar-hiasan {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.gelembung {
    position: absolute;
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    animation: mengambang 8s infinite ease-in-out;
}

.gelembung:nth-child(1) {
    left: 10%;
    top: 20%;
}

.gelembung:nth-child(2) {
    left: 80%;
    top: 30%;
    animation-delay: 2s;
}

.gelembung:nth-child(3) {
    left: 25%;
    top: 75%;
    animation-delay: 3s;
}

.gelembung:nth-child(4) {
    left: 90%;
    top: 80%;
    animation-delay: 1s;
}

.gelembung:nth-child(5) {
    left: 50%;
    top: 10%;
    animation-delay: 4s;
}


/* =========================
   HALAMAN
========================= */

main {
    position: relative;
    z-index: 1;
}

.halaman {
    display: none;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;

    justify-content: center;
    align-items: center;
    text-align: center;
}

.halaman.aktif {
    display: flex;
    animation: muncul 0.8s ease;
}

.konten {
    width: 100%;
    max-width: 750px;
    margin: auto;
}

h1 {
    font-size: clamp(32px, 6vw, 55px);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(25px, 5vw, 38px);
    margin-bottom: 20px;
}

.teks-kecil {
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.deskripsi {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 30px;
}


/* =========================
   TOMBOL
========================= */

.tombol {
    border: none;
    padding: 13px 30px;
    border-radius: 30px;

    background: linear-gradient(
        135deg,
        #d76db0,
        #a66bd1
    );

    color: white;
    font-size: 14px;

    cursor: pointer;
    margin-top: 25px;

    transition: 0.3s;
}

.tombol:hover {
    transform: translateY(-4px);
    box-shadow: 0 7px 20px rgba(150, 75, 160, 0.3);
}


/* =========================
   KUE ULANG TAHUN
========================= */

.dekorasi-kue {
    margin: 40px auto;
}

.kue {
    position: relative;
    width: 140px;
    height: 100px;
    margin: auto;
    animation: naikTurun 2s infinite ease-in-out;
}

.lapisan-kue {
    position: absolute;
    bottom: 25px;
    width: 140px;
    height: 45px;
    background: #f4a8c9;
    border-radius: 10px 10px 5px 5px;
}

.dasar-kue {
    position: absolute;
    bottom: 0;
    width: 160px;
    height: 25px;
    left: -10px;
    background: #c77bb5;
    border-radius: 5px 5px 15px 15px;
}

.lilin {
    position: absolute;
    width: 8px;
    height: 30px;
    background: white;
    top: 0;
    left: 66px;
    z-index: 2;
}

.lilin::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 16px;
    background: #ffb347;
    border-radius: 50%;
    top: -17px;
    left: -2px;
    animation: nyala 0.8s infinite alternate;
}


/* =========================
   ALBUM FOTO
========================= */

.album {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;

    max-width: 500px;
    margin: 30px auto;
}

.bingkai-foto {
    background: white;
    padding: 8px;
    border-radius: 12px;

    box-shadow: 0 5px 20px rgba(100, 50, 100, 0.15);

    transition: 0.4s;
}

.bingkai-foto:nth-child(odd) {
    transform: rotate(-3deg);
}

.bingkai-foto:nth-child(even) {
    transform: rotate(3deg);
}

.bingkai-foto:hover {
    transform: rotate(0deg) scale(1.05);
}

.bingkai-foto img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 7px;
}


/* =========================
   AMPLOP
========================= */

.amplop {
    position: relative;
    width: 250px;
    height: 165px;
    margin: 55px auto 25px;
    cursor: pointer;

    animation: naikTurun 2s infinite ease-in-out;
}

.bagian-belakang {
    position: absolute;
    inset: 0;
    background: #c17bbd;
    border-radius: 8px;
}

.surat-di-dalam {
    position: absolute;
    width: 85%;
    height: 120px;
    background: #fff7fb;
    left: 7.5%;
    top: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #a35b9b;
    transition: 0.7s;
}

.bagian-depan {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;

    border-left: 125px solid #d995c9;
    border-right: 125px solid #d995c9;
    border-top: 85px solid transparent;
}

.penutup-amplop {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;

    border-left: 125px solid transparent;
    border-right: 125px solid transparent;
    border-top: 90px solid #e6a9d6;

    transform-origin: top;
    transition: 0.6s;
    z-index: 3;
}

.amplop.dibuka .penutup-amplop {
    transform: rotateX(180deg);
}

.amplop.dibuka .surat-di-dalam {
    transform: translateY(-80px);
}

.petunjuk {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 20px;
}


/* =========================
   KARTU UCAPAN
========================= */

.kartu-ucapan {
    width: 290px;
    height: 360px;
    margin: 30px auto;

    padding: 15px;
    background: #fff5fa;
    border-radius: 15px;

    box-shadow: 0 10px 30px rgba(100, 50, 100, 0.2);

    cursor: pointer;
    transition: 0.4s;
}

.kartu-ucapan:hover {
    transform: rotate(-3deg) scale(1.04);
}

.isi-kartu {
    height: 100%;
    border: 2px dashed #d69acb;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 25px;
}

.isi-kartu p {
    font-size: 17px;
}

.isi-kartu h2 {
    color: #b45da6;
    font-size: 25px;
}

.isi-kartu span {
    font-size: 13px;
}


/* =========================
   UCAPAN
========================= */

.konten-ucapan {
    max-width: 760px;
}

.kotak-ucapan {
    background: rgba(255, 255, 255, 0.65);
    padding: 30px;
    border-radius: 18px;

    text-align: left;
    line-height: 2;

    box-shadow: 0 8px 25px rgba(100, 50, 100, 0.1);
}

.kotak-ucapan p {
    font-size: 14px;
    margin-bottom: 25px;
}

.kotak-ucapan p:last-child {
    margin-bottom: 0;
}

.kalimat-penutup {
    margin-top: 30px;
    font-size: 14px;
    font-style: italic;
    line-height: 1.9;
}

.tanda-tangan {
    text-align: right;
    margin-top: 25px;
    line-height: 1.8;
    font-size: 13px;
}

.tanda-tangan span {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 38px;
    font-weight: 600;
    color: #92528f;
    margin-top: 5px;
}


/* =========================
   PLAYLIST
========================= */

.daftar-lagu {
    max-width: 500px;
    margin: 30px auto;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-lagu {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px 18px;
    border-radius: 13px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.item-lagu p {
    font-size: 14px;
    text-align: left;
}

.item-lagu button {
    border: none;
    background: #b66bb6;
    color: white;

    padding: 9px 18px;
    border-radius: 20px;

    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.item-lagu button:hover {
    background: #914b99;
}

#pemutarLagu {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
}


/* =========================
   ANIMASI
========================= */

@keyframes muncul {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes naikTurun {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes mengambang {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

@keyframes nyala {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1.2);
    }
}


/* =========================
   TAMPILAN HP
========================= */

@media (max-width: 600px) {

    .halaman {
        padding: 30px 18px;
    }

    .bingkai-foto img {
        height: 145px;
    }

    .kotak-ucapan {
        padding: 20px;
    }

    .kotak-ucapan p {
        font-size: 13px;
    }

    .amplop {
        transform: scale(0.9);
    }

    .item-lagu {
        padding: 12px;
    }

}