:root {
    --sky-color: #e0f7fa;
    --primary: #f8bbd0;
    --accent: #f06292;
    --jar-glass: rgba(255, 255, 255, 0.4);
    --jar-border: rgba(255, 255, 255, 0.8);
    --text: #4a2c40;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--sky-color);
    font-family: 'Quicksand', sans-serif;
    color: var(--text);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.sky-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* --- Clouds Background --- */
.cloud {
    background: #fff;
    width: 300px;
    height: 100px;
    border-radius: 50px;
    position: absolute;
    opacity: 0.6;
}

.cloud::after,
.cloud::before {
    content: '';
    background: #fff;
    position: absolute;
    border-radius: 50%;
}

.cloud::after {
    width: 100px;
    height: 100px;
    top: -50px;
    left: 50px;
}

.cloud::before {
    width: 120px;
    height: 120px;
    top: -70px;
    right: 50px;
}

.cloud1 {
    top: 10%;
    animation: drift 40s linear infinite;
}

.cloud2 {
    top: 60%;
    right: -300px;
    animation: drift 50s linear infinite reverse;
}

@keyframes drift {
    0% {
        left: -300px;
    }

    100% {
        left: 100%;
    }
}

/* --- Jar Styling --- */
.jar-wrapper {
    text-align: center;
    z-index: 10;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.title {
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    margin-bottom: 5px;
    font-size: 2rem;
}

.subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #880e4f;
    margin-bottom: 40px;
}

.jar {
    width: 220px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jar:active {
    transform: scale(0.95) rotate(5deg);
}

.jar-top {
    width: 100px;
    height: 25px;
    background: #f48fb1;
    border-radius: 50px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.jar-body {
    width: 200px;
    height: 250px;
    background: var(--jar-glass);
    backdrop-filter: blur(8px);
    border: 3px solid var(--jar-border);
    border-radius: 60px 60px 50px 50px;
    margin-top: -10px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.label {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    border-radius: 40%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 2px dashed var(--accent);
    pointer-events: none;
}

.mini-heart {
    font-size: 25px;
    margin: 5px;
    opacity: 0.8;
}

/* --- Floating Message Heart --- */
.pop-heart {
    position: absolute;
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(240, 98, 146, 0.2);
    min-width: 200px;
    text-align: center;
    pointer-events: none;
    animation: popOut 1.5s ease-out forwards;
    z-index: 100;
}

.pop-heart::before {
    content: '❤️';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

.msg-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

@keyframes popOut {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5) rotate(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-120px) scale(1.1) rotate(10deg);
    }

    80% {
        opacity: 1;
        transform: translateY(-140px) scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(-180px) scale(0.8);
    }
}