:root {
    --bg-color-1: #e9f5db;
    /* Moss green/cream custom blend */
    --bg-color-2: #cfe1b9;
    /* Sage green */
    --bg-color-3: #b5c99a;
    /* Darker moss */
    --accent-pink: #f4acb7;
    /* Dusty pink */
    --sky-blue: #d7e3fc;
    /* Soft sky blue */
    --text-primary: #3d405b;
    /* Deep slate */
    --text-secondary: #81b29a;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --font-heading: 'Lora', serif;
    --font-body: 'Patrick Hand', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-color-1), var(--sky-blue), var(--accent-pink));
    background-size: 300% 300%;
    animation: gradientBG 20s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Allow vertical stacking */
    justify-content: flex-start;
    /* Start from top */
    align-items: center;
    color: var(--text-primary);
    overflow-y: auto;
    /* Enable vertical scroll */
    overflow-x: hidden;
    position: relative;
    font-size: 1.1rem;
    padding-bottom: 50px;
    /* Space at bottom */
}

/* Optional Overlay for Texture (Noise/Paper) */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('forest_background.png');
    /* Will fallback to gradient if missing */
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.4);
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-primary);
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Glass Card */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    z-index: 10;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

.container {
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 550px;
    padding: 20px;
}

/* Image styling with "Film" look */
.image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
    border-radius: 20px;
    max-height: 450px;
    /* Soft film filter */
    filter: contrast(1.1) brightness(1.1) sepia(0.2) saturate(0.8);
}

.cat-img.loaded {
    opacity: 1;
}

.hidden {
    display: none;
}

.spinner {
    font-size: 3rem;
    animation: spin-sway 2s infinite ease-in-out;
    color: var(--text-secondary);
}

@keyframes spin-sway {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Overlay Message */
.overlay-message {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 15px;
    pointer-events: none;
}

#main-message {
    font-family: var(--font-heading);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-size: 1.4rem;
    background: rgba(61, 64, 91, 0.5);
    /* Dark slate semi-transparent */
    display: inline-block;
    padding: 0.6em 1.2em;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-style: italic;
}

/* Button */
.cozy-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid white;
    padding: 14px 35px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.5px;
}

.cozy-btn:hover {
    transform: scale(1.05);
    background-color: #fff;
    color: var(--accent-pink);
    box-shadow: 0 8px 25px rgba(244, 172, 183, 0.3);
}

/* Mascot */
.mascot-container {
    position: fixed;
    bottom: 0px;
    right: 20px;
    width: 140px;
    pointer-events: none;
    z-index: 5;
    transition: all 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    /* Bouncy transition */
}

.mascot-intro {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%) scale(4.0);
    /* Even Bigger and centered */
    width: 200px;
    z-index: 100;
}

.mascot-intro .speech-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.speech-bubble {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    border-bottom-left-radius: 0;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.5s ease 0.5s;
    /* Delay appearance */
    pointer-events: none;
    white-space: nowrap;
}

/* Bubble Tail */
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: white;
    border-left: 0;
    border-bottom: 0;
}

.mascot {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.floating {
    animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Fireflies */
.fireflies-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #fdffb6;
    /* Soft yellow */
    border-radius: 50%;
    box-shadow: 0 0 10px 2px #fdffb6;
    opacity: 0;
    animation: fireflyMove 15s infinite alternate ease-in-out, fireflyGlow 3s infinite alternate;
}

@keyframes fireflyGlow {
    0% {
        opacity: 0.2;
        box-shadow: 0 0 0px 0px #fdffb6;
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 10px 2px #fdffb6;
    }

    100% {
        opacity: 0.3;
        box-shadow: 0 0 2px 0px #fdffb6;
    }
}

@keyframes fireflyMove {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(100px, -50px);
    }

    50% {
        transform: translate(-50px, 100px);
    }

    75% {
        transform: translate(-100px, -50px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Rain Effect */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    display: none;
    /* Hidden by default, toggled via JS or if desired always on */
}

.rain-drop {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.4);
    width: 1px;
    height: 15px;
    top: -20px;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(105vh);
    }
}

/* Personal Section */
/* Personal Section */
.hidden-section {
    display: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.personal-section {
    width: 100%;
    max-width: 1200px;
    /* Wider container */
    margin: 100px auto 40px;
    /* More top margin for separation */
    text-align: center;
    padding-bottom: 60px;
}

.collage-container {
    position: relative;
    height: 700px;
    /* Taller */
    margin-bottom: 60px;
    perspective: 1000px;
    width: 100%;
    /* Full width */
}

.collage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    /* Slightly more opaque */
    padding: 25px 50px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.collage-text h2 {
    font-family: var(--font-heading);
    color: var(--accent-pink);
    font-size: 3rem;
    margin: 0;
}

.collage-img {
    position: absolute;
    width: 280px;
    /* Slightly larger images */
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 8px solid white;
    transition: transform 0.5s ease;
    filter: sepia(0.2) contrast(1.1);
}

.collage-img:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 25;
}

/* Scattering images nicely - WIDER SPREAD */
.img-1 {
    top: 0%;
    left: 2%;
    transform: rotate(-15deg);
}

.img-2 {
    top: 0%;
    right: 2%;
    transform: rotate(10deg);
}

.img-3 {
    top: 35%;
    left: 0%;
    transform: rotate(5deg);
}

.img-4 {
    top: 30%;
    right: 0%;
    transform: rotate(-8deg);
}

.img-5 {
    bottom: 0%;
    left: 15%;
    transform: rotate(-12deg);
}

.img-6 {
    bottom: 0%;
    right: 15%;
    transform: rotate(15deg);
}

.love-letter {
    text-align: left;
    background: rgba(255, 255, 255, 0.9);
    padding: 50px;
    margin: 20px auto;
    max-width: 900px;
}

.love-letter h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 2.2rem;
}

/* ... keep rest of typography ... */
.intro-text,
.outro-text {
    font-size: 1.3rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

.love-list {
    margin-left: 25px;
    margin-bottom: 40px;
}

.love-list li {
    margin-bottom: 18px;
    line-height: 1.6;
    padding-left: 10px;
    font-size: 1.2rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .collage-container {
        height: 500px;
    }

    .collage-img {
        width: 150px;
    }

    .collage-text h2 {
        font-size: 1.8rem;
        padding: 10px 20px;
    }

    .title {
        font-size: 2.8rem;
    }

    .mascot-container {
        width: 100px;
        bottom: 10px;
        right: 10px;
    }

    .container {
        padding-top: 10px;
    }

    .love-letter {
        padding: 25px;
    }

    /* Adjust scatter for mobile */
    .img-1 {
        top: 2%;
        left: -5%;
    }

    .img-2 {
        top: 5%;
        right: -5%;
    }

    .img-3 {
        top: 35%;
        left: -10%;
    }

    .img-4 {
        top: 30%;
        right: -10%;
    }

    .img-5 {
        bottom: 5%;
        left: 0%;
    }

    .img-6 {
        bottom: 2%;
        right: 0%;
    }
}