﻿/* --- Global Reset & Cute Fonts --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Slightly deeper, more emotional gradient */
    background: linear-gradient(135deg, #fff0f5 0%, #ffd1dc 50%, #fff0f5 100%);
    font-family: 'Quicksand', sans-serif;
    color: #8b5e68;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">🐾</text></svg>'), auto;
    perspective: 1000px; /* Necessary for 3D effects */
}

h1, h2, h3 {
    font-family: 'Pacifico', cursive;
    color: #ff5e78;
    text-shadow: 4px 4px 0px rgba(255, 255, 255, 0.6);
}

/* --- Main Container --- */
.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* --- Header --- */
header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.3rem;
    color: #b08d96;
    background: rgba(255, 255, 255, 0.8);
    border: 3px dotted #ff5e78;
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
}

/* --- Crazy Photo Frame --- */
.photo-frame {
    margin: 60px auto;
    width: 260px;
    height: 260px;
    background: #fff;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(255, 94, 120, 0.5);
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
    /* Extreme 3D tilt on hover */
    .photo-frame:hover {
        transform: rotateX(15deg) rotateY(-15deg) rotateZ(5deg) scale(1.15);
    }

    .photo-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        border: 6px solid #ffe6ea;
    }

.sticker {
    position: absolute;
    bottom: 0px;
    right: 0px;
    font-size: 3.5rem;
    background: #fff;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    line-height: 75px;
    text-align: center;
    border: 4px solid #ffdde6;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 20;
}

/* --- The Apology Section --- */
.intro-text {
    margin-top: 40px;
}

    .intro-text h2 {
        font-size: 2.2rem;
        margin-bottom: 15px;
        color: #ff5e78;
    }

    .intro-text p {
        font-size: 1.2rem;
        line-height: 1.8;
        margin-bottom: 30px;
        background: rgba(255, 255, 255, 0.9);
        padding: 30px;
        border-radius: 30px;
        border: 4px dashed #ffb6c1;
        box-shadow: 0 15px 35px rgba(214, 109, 133, 0.2);
        text-align: left;
    }

.sparkle-divider {
    font-size: 1.8rem;
    margin: 40px 0;
    opacity: 0.8;
    letter-spacing: 8px;
    font-weight: bold;
    color: #ff5e78;
}

/* --- Crazy Pop-up Cards --- */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-top: 40px;
}

.card {
    background: linear-gradient(to bottom right, #ffffff, #fff0f3);
    padding: 30px;
    border-radius: 30px;
    width: 45%; /* Two cards per row */
    box-shadow: 0 15px 30px rgba(214, 109, 133, 0.2);
    border-bottom: 8px solid #ff8fa3;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}
    /* Cards pop out at you on hover */
    .card:hover {
        transform: translateY(-20px) scale(1.1) rotateX(5deg);
        background: #fff;
        z-index: 20;
        box-shadow: 0 30px 50px rgba(255, 94, 120, 0.3);
    }

    .card .icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .card h3 {
        font-size: 1.4rem;
        margin-bottom: 10px;
        color: #ff5e78;
    }

    .card p {
        font-size: 1.05rem;
        font-weight: 600;
        color: #a88891;
    }

/* --- The 3D Love Letter --- */
.love-letter {
    margin-top: 70px;
}

.paper {
    background: #fff;
    padding: 40px 40px 60px 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
    border: 3px solid #ffe6ea;
    background-image: linear-gradient(#f0f0f0 2px, transparent 2px);
    background-size: 100% 2.2rem;
    line-height: 2.2rem;
    font-size: 1.15rem;
    border-radius: 15px;
    transition: all 0.6s ease;
    transform-style: preserve-3d;
}

.tilt-3d:hover {
    transform: rotateX(10deg) rotateY(-5deg) translateZ(20px);
    box-shadow: 20px 20px 60px rgba(0,0,0,0.2);
}

.paper::before { /* Tape sticker */
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 35px;
    background: rgba(255, 94, 120, 0.5);
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* --- The Crazy Shaking Button --- */
.interaction {
    margin: 80px 0;
    position: relative;
}

#meowaBtn {
    background: linear-gradient(45deg, #ff5e78, #ff9a9e, #fad0c4, #ff5e78);
    background-size: 400% 400%;
    border: none;
    padding: 25px 50px;
    border-radius: 60px;
    color: white;
    font-family: 'Quicksand', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(255, 94, 120, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    animation: gradientBG 4s ease infinite; /* Plus shaking animation defined below */
}

    #meowaBtn:hover {
        transform: scale(1.15);
        box-shadow: 0 20px 50px rgba(255, 94, 120, 0.8);
    }

.hidden {
    display: none;
    margin-top: 40px;
    padding: 40px;
    background: #fff;
    border-radius: 30px;
    color: #ff5e78;
    font-weight: 900;
    font-size: 1.8rem;
    border: 5px dashed #ff5e78;
    box-shadow: 0 20px 60px rgba(255, 94, 120, 0.4);
    transform: scale(0); /* Starts tiny for explosion effect */
}

footer {
    margin-top: 60px;
    margin-bottom: 30px;
    font-weight: 700;
    opacity: 0.7;
}

/* ============================
   CRAZY COOL ANIMATIONS DEFINITIONS
============================ */

/* 1. Scroll Reveal States (Used by JS) */
.reveal, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

.reveal {
    transform: translateY(100px);
}

.reveal-left {
    transform: translateX(-100px);
}

    .reveal-left.active {
        opacity: 1;
        transform: translateX(0);
    }

.reveal-right {
    transform: translateX(100px);
}

    .reveal-right.active {
        opacity: 1;
        transform: translateX(0);
    }

/* 2. Header Fade In */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 1.5s ease-out;
}

/* 3. Crazy Floating Background with Sway */
@keyframes crazyFloat {
    0% {
        transform: translateY(105vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
        translateX(-50px);
    }

    50% {
        translateX(50px);
        rotate(180deg);
    }

    80% {
        opacity: 0.8;
        translateX(-30px);
    }

    100% {
        transform: translateY(-10vh) translateX(30px) rotate(360deg);
        opacity: 0;
    }
}

.bg-elements span {
    position: fixed;
    bottom: -10vh;
    font-size: 3rem;
    animation: crazyFloat linear infinite;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 10px 10px rgba(255, 94, 120, 0.5));
}

/* 4. Floaty Boaty Frame */
@keyframes floatyBoaty {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }

    25% {
        transform: translateY(-20px) rotate(2deg) translateX(10px);
    }

    50% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-15px) rotate(3deg) translateX(-10px);
    }
}

.floaty-boaty {
    animation: floatyBoaty 6s infinite ease-in-out;
}

/* 5. Spinning Pulse Sticker */
@keyframes spinPulse {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.spinning {
    animation: spinPulse 4s linear infinite;
}

/* 6. Crazy Button Shake - IMPATIENT! */
@keyframes shakeCrazy {
    0%, 100% {
        transform: translateX(0%);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px) rotate(-2deg);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px) rotate(2deg);
    }
}

.shake-crazy {
    animation: gradientBG 2s infinite, shakeCrazy 1s infinite ease-in-out;
}

/* 7. Gradient BG Animator */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 8. Explosive Message Reveal */
@keyframes explodeIn {
    0% {
        transform: scale(0) translateY(100px) rotate(-20deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 9. Click Hearts floating away fast */
@keyframes floatAwayFast {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-150px) scale(0) rotate(180deg);
        opacity: 0;
    }
}

.click-heart {
    position: absolute;
    pointer-events: none;
    animation: floatAwayFast 1.5s ease-out forwards;
    z-index: 100;
}

/* Mobile fixes */
@media (max-width: 600px) {
    .card {
        width: 100%;
    }

    header h1 {
        font-size: 2.8rem;
    }

    .photo-frame {
        width: 200px;
        height: 200px;
    }

    #meowaBtn {
        padding: 20px 30px;
        font-size: 1.2rem;
    }
}
