@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@300;400;500;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    font-family: 'Mitr', sans-serif;

    background: linear-gradient(
        135deg,
        #8fd3f4,
        #84c7f2,
        #f7a8c8
    );
}

.container {
    width: min(90%, 500px);

    padding: 50px 35px;

    text-align: center;

    background: rgba(255, 255, 255, 0.25);

    backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.4);

    border-radius: 30px;

    box-shadow: 0 20px 60px rgba(60, 100, 150, 0.2);

    z-index: 2;
}

.small-title {
    margin: 0 0 15px;

    letter-spacing: 4px;

    font-size: 12px;

    color: rgba(255, 255, 255, 0.8);
}

h1 {
    margin-bottom: 35px;

    font-size: clamp(28px, 5vw, 42px);

    font-weight: 500;

    color: white;
}

input {
    width: 100%;

    padding: 16px 20px;

    border: none;

    border-radius: 15px;

    outline: none;

    font-family: inherit;

    font-size: 18px;

    text-align: center;

    background: rgba(255, 255, 255, 0.85);
}

button {
    width: 100%;

    margin-top: 15px;

    padding: 16px;

    border: none;

    border-radius: 15px;

    cursor: pointer;

    font-family: inherit;

    font-size: 18px;

    color: white;

    background: linear-gradient(
        135deg,
        #f48fb1,
        #ec6f91
    );

    transition: 0.3s;
}

button:hover {
    transform: translateY(-3px);

    box-shadow: 0 10px 25px rgba(236, 111, 145, 0.4);
}

#errorMessage {
    min-height: 24px;

    color: #ffe3ec;

    margin-top: 15px;
}

.hearts span {
    position: absolute;

    font-size: 35px;

    animation: float 6s infinite ease-in-out;
}

.hearts span:nth-child(1) {
    top: 10%;
    left: 10%;
}

.hearts span:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.hearts span:nth-child(3) {
    bottom: 15%;
    left: 15%;
    animation-delay: 2s;
}

.hearts span:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

.hearts span:nth-child(5) {
    top: 50%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

}

.secret-message {
    color: white;

    font-size: 20px;

    line-height: 1.8;

    font-weight: 300;
}

/* =========================
   SECRET MESSAGE COVER
========================= */

#messageCover {

    position: fixed;

    inset: 0;

    display: flex;

    justify-content: center;
    align-items: center;

    z-index: 10;

    background: rgba(120, 190, 240, 0.35);

    backdrop-filter: blur(8px);

    transition:
        opacity 1.5s ease,
        visibility 1.5s ease;

}


.cover-content {

    width: min(85%, 400px);

    padding: 50px 30px;

    text-align: center;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.35);

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.5);

    box-shadow:
        0 20px 60px rgba(80, 120, 180, 0.25);

}


.heart-icon {

    font-size: 55px;

    margin-bottom: 15px;

    animation: heartbeat 2s infinite;

}


.cover-content h2 {

    color: white;

    font-weight: 400;

    margin-bottom: 30px;

}


#revealButton {

    padding: 15px 30px;

    border: none;

    border-radius: 50px;

    cursor: pointer;

    font-family: inherit;

    font-size: 18px;

    color: white;

    background: linear-gradient(
        135deg,
        #f48fb1,
        #ec6f91
    );

    transition: 0.3s;

}


#revealButton:hover {

    transform: scale(1.05);

}


/* ตอนกล่องหาย */

#messageCover.hidden {

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

}


/* Animation หัวใจ */

@keyframes heartbeat {

    0%,
    100% {

        transform: scale(1);

    }

    50% {

        transform: scale(1.15);

    }

}