body {
    /* Keep existing body styles (font, color, etc.) */
    font-family: 'Quicksand', sans-serif;
    color: #333;
    margin: 0;
    text-align: center;
    overflow-x: hidden;
    scroll-behavior: smooth;

    /* MASTER BACKGROUND: Soft, uniform pink gradient */
    background: linear-gradient(135deg, #fce4ec 0%, #ffffff 100%);
    background-attachment: fixed; /* NEW: Keeps the background still while scrolling */
}

h1, h2 {
    font-family: 'Dancing Script', cursive;
    color: #e91e63; /* Pinkish-red */
    font-weight: 700;
}

p.subtitle {
    font-weight: 300;
    color: #555;
    margin-bottom: 30px;
}

/* --- Full Screen Sections --- */
.full-screen-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
    box-sizing: border-box;
    position: relative;
    background-size: cover;
    background-position: center;
}

.content-wrapper {
    max-width: 900px;
    width: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 5; /* Ensure content is above background */
}

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    justify-content: center;
}
.main-nav a {
    color: #e91e63;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    transition: color 0.3s;
}
.main-nav a:hover {
    color: #ff4081;
}

/* --- Welcome Section --- */
.welcome-section {
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
.welcome-section h1 {
    font-size: 4em;
    color: #880e4f;
}
.welcome-section .intro-message {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #e91e63;
}
.welcome-section .subtitle {
    font-size: 1.2em;
    color: #555;
}
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scroll-indicator span {
    width: 8px;
    height: 8px;
    background: #e91e63;
    border-radius: 50%;
    margin-bottom: 5px;
    opacity: 0;
    animation: bounce 1.5s infinite;
}
.scroll-indicator span:nth-child(2) { animation-delay: 0.2s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    40% {
        transform: translateY(-15px);
        opacity: 0.5;
    }
    60% {
        transform: translateY(-5px);
        opacity: 0.8;
    }
}


/* --- Cake Section Specifics --- */
#cake-message {
    font-size: 2.5em;
    margin-bottom: 20px;
}
.instructions {
    margin-top: 20px;
    font-size: 1.1em;
    color: #888;
}

/* Cake & Candle Styles (FROM PREVIOUS CSS - Keep these!) */
.cake-area {
    margin-top: 50px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
    transition: transform 0.3s ease-in-out;
}
.cake-area:hover {
    transform: scale(1.03);
}

.cake-base {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto;
}
.layer {
    width: 100%;
    position: absolute;
    border-radius: 50%/20%;
    left: 0;
}
.layer-3 { top: 0px; height: 50px; background-color: #ffb3c1; z-index: 3; } /* Pink layer */
.layer-2 { top: 30px; height: 50px; background-color: #ffe0e6; z-index: 2; } /* Pale layer */
.layer-1 { top: 60px; height: 50px; background-color: #ffb3c1; z-index: 1; } /* Pink layer */

.layer-3::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: #ffffff; /* White icing */
    border-radius: 50%/20%;
}
.cherry {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #e84a5f;
    border-radius: 50%;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.candles-wrapper {
    position: absolute;
    width: 100%;
    top: -40px;
    display: flex;
    justify-content: space-around;
    padding: 0 30px;
    z-index: 5;
}

.candle {
    width: 10px;
    height: 30px;
    background: #fdfd96; /* Pale Yellow Candle Wax */
    border-radius: 2px;
    position: relative;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s;
}

.wick {
    width: 2px;
    height: 5px;
    background: #333;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    position: absolute;
    width: 10px;
    height: 15px;
    background: orange;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px 2px #ffd700;
    animation: flicker 0.2s infinite alternate;
}

@keyframes flicker {
    from {
        box-shadow: 0 0 10px 2px #ffd700;
        transform: translateX(-50%) scale(1);
    }
    to {
        box-shadow: 0 0 12px 3px #ffaa00;
        transform: translateX(-50%) scale(1.05);
    }
}

.lit .flame { display: block; }
.unlit .flame { display: none; }
.candle.lit { opacity: 1; }

.blown {
    background: #aaa;
}
.blown .flame {
    display: none;
}
.blown .wick::after {
    content: '💨';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    color: #555;
}


/* --- A-Z Section Specifics --- */

.az-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.az-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.az-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.az-letter {
    font-family: 'Dancing Script', cursive;
    font-size: 3em;
    color: #ff80ab; /* Bright pink */
    display: block;
    margin-bottom: 5px;
}
.az-title {
    font-weight: 700;
    color: #e91e63;
    display: block;
    margin-bottom: 5px;
}
.az-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}
.az-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ffcdd2;
}
.final-az-message {
    margin-top: 40px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    color: #880e4f;
}

/* --- Map Section Specifics --- */
.map-bg {
    min-height: 120vh; /* Make map section taller */
}
.world-map {
    position: relative;
    width: 100%;
    max-width: 900px; /* Adjust map size as needed */
    margin: 40px auto;
}
.map-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
.map-pin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #e91e63; /* Pink pin */
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.map-pin:hover {
    transform: scale(1.2);
    background: #ff4081;
}
.pin-label {
    position: absolute;
    bottom: -30px; /* Position label below pin */
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.map-pin:hover .pin-label {
    opacity: 1;
}

.pin-content {
    position: absolute;
    width: 150px; /* Size of the pop-up */
    background: #fff;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 10px;
    bottom: 40px; /* Position above pin */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    text-align: left;
    font-size: 0.9em;
}
.map-pin.active .pin-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-10px); /* Slight lift */
}
.pin-content p {
    margin: 5px 0;
    color: #555;
}
.pin-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 5px;
}
/* --- LDR Connection Line Styles --- */

/* Initially hidden container for the path */
#connection-path {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none; /* Ignore clicks */
    z-index: 5;
    transition: opacity 0.5s;
    opacity: 0; /* Starts invisible */
}

/* The actual line element */
#connection-line {
    position: absolute;
    height: 3px; /* Thickness of the line */
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0) 0%, 
        #ffc0cb 10%, /* Soft pink color */
        #e91e63 50%, 
        #ffc0cb 90%, 
        rgba(255, 255, 255, 0) 100%);
    
    /* Make it look dotted/dashed and animated */
    background-size: 10px 100%;
    animation: dash-flow 1s linear infinite;
    transform-origin: left center; /* Ensure scaling/rotation is correct */
}

/* Animation to make the gradient "flow" along the line */
@keyframes dash-flow {
    to {
        background-position: -10px 0;
    }
}

/* When the line is active/visible */
#connection-path.active {
    opacity: 1;
}
/* --- Comfort Section Specifics --- */

.comfort-input-area {
    margin-bottom: 30px;
}

#feeling-selector {
    padding: 12px 20px;
    font-size: 1.2em;
    border: 3px solid #ff80ab; /* Pink border */
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Quicksand', sans-serif;
}

#feeling-selector:hover {
    box-shadow: 0 0 10px rgba(255, 128, 171, 0.5);
}

.comfort-message-box {
    min-height: 150px;
    padding: 20px;
    margin-top: 20px;
    border: 1px dashed #cccccc;
    border-radius: 15px;
    background-color: #fff9e6; /* Creamy yellow, like an old letter */
    text-align: left;
    font-family: 'Caveat', cursive; /* NEW: Applying the cursive font */
    font-size: 1.4em; /* NEW: Slightly larger for readability */
    color: #4a4a4a;
    transition: background-color 0.5s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Ensure any paragraphs inside the box use the new style, but still look neat */
.comfort-message-box p {
    font-family: 'Caveat', cursive;
    font-size: 1em; /* Ensures consistency */
    line-height: 1.5;
    margin-bottom: 10px;
}
.comfort-gif {
    width: 250px;
    height: auto;
}
/* --- Scroll Section Styles --- */

/* --- Scroll Opening Logic --- */

#the-scroll {
    /* REMOVED: width: 300px; */
    
    /* NEW: Set width as a percentage of the parent container */
    width: 90%; 
    max-width: 650px; /* Limits the width on very large screens for comfortable reading */
    
    background-color: #fff8e1; /* Pale parchment color */
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
    cursor: pointer;
    transition: height 1.5s ease-in-out, box-shadow 0.3s; 
}

#the-scroll:hover {
    box-shadow: 0 5px 25px rgba(255, 100, 150, 0.5);
}

/* Ensure the wrapper uses flex to center the percentage-based width */
.letter-scroll-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px auto;
    perspective: 1000px;
}

/* --- Scroll Rollers/Caps (Top and Bottom) --- */
.scroll-top, .scroll-bottom {
    height: 20px;
    background-color: #d8c29e; /* Darker parchment/wood tone */
    border-bottom: 2px solid #b69e7e;
}

.scroll-bottom {
    border-top: 2px solid #b69e7e;
    border-bottom: none;
}

/* --- Content Styling (The Letter Itself) --- */
.scroll-content {
    padding: 15px 25px;
    color: #333;
    text-align: left;
    /* Use the cursive font for a beautiful letter effect */
    font-family: 'Caveat', cursive; 
    font-size: 1.4em; 
    line-height: 1.6;
}

.letter-opener, .letter-closer, .signature {
    font-weight: 700;
    font-size: 1.1em;
    color: #e91e63; /* Pink highlights */
}
.letter-opener {
    margin-bottom: 15px;
}
.signature {
    text-align: right;
    margin-top: 20px;
    font-style: italic;
    font-size: 1.2em;
}

/* --- Scroll Open/Closed States --- */

.scroll-closed {
    /* Set the initial height to look like a small, rolled-up scroll */
    height: 40px; 
}

.scroll-opened {
    /* NEW: Use height: auto for content flexibility */
    height: auto; 
    
    /* NEW: Add min-height to ensure the transition works smoothly */
    /* This needs to be large enough to trigger the transition initially */
    min-height: 400px; 
    
    /* NEW: Add padding-bottom to ensure the bottom scroll bar doesn't cut off text */
    padding-bottom: 20px; 
    
    cursor: auto; 
}