/* --- RESET & BASICS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    /* RESTORED: The original soft gradient background */
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcce0 100%);
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- TYPOGRAPHY --- */
h1 { font-family: 'Dancing Script', cursive; color: #d6336c; font-size: 3rem; margin-top: -20px; }
.subtitle { color: #888; font-size: 1rem; margin-bottom: 2rem; }
h2 { font-family: 'Dancing Script', cursive; color: #d6336c; font-size: 2.8rem; margin-bottom: 10px; }

/* --- SCREEN LOGIC --- */
.screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease; z-index: 10;
}
.hidden { opacity: 0; pointer-events: none; z-index: -1; }

/* --- INTRO HEART --- */
.heart-wrapper { 
    cursor: pointer; margin-top: 10px; transition: transform 0.2s; padding: 20px;
}
.heart-wrapper:active { transform: scale(0.9); }
.big-heart { font-size: 7rem; animation: beat 1.2s infinite; filter: drop-shadow(0 5px 15px rgba(214,51,108,0.4)); }
.click-text { margin-top: 15px; font-size: 1rem; color: #d6336c; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; }

@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* --- THE JAR --- */
.jar-container {
    position: relative; width: 280px; height: 380px; margin: 10px auto;
}

.jar-body {
    width: 100%; height: 90%;
    background: rgba(255, 255, 255, 0.4);
    border: 6px solid #fff;
    border-radius: 30px 30px 60px 60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), inset 0 0 30px rgba(255,255,255,0.7);
    position: absolute; bottom: 0; left: 0; overflow: hidden; z-index: 2;
}

.jar-lid {
    width: 110%; height: 50px; background: #ffb3c1; border-radius: 15px;
    position: absolute; top: 5%; left: -5%; z-index: 3; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- THE PAPERS (Folded) --- */
.paper {
    width: 60px; height: 35px; border-radius: 4px;
    position: absolute; cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; justify-content: center; align-items: center;
}
.paper:hover { transform: scale(1.1) !important; z-index: 100; }

/* ❀ The Tone-on-Tone Floral Design ❀ */
.paper::after { 
    content: '❀'; 
    font-size: 20px; 
    color: rgba(0,0,0,0.15); /* Semi-transparent black makes a darker shade of ANY color */
    mix-blend-mode: multiply; /* Blends nicely with the paper color */
    transform: rotate(10deg);
}

/* Positions */
.p1  { bottom: 20px;  left: 30px;  transform: rotate(-10deg); background-color: #ffadad; }
.p2  { bottom: 30px;  right: 40px; transform: rotate(15deg);  background-color: #ffd6a5; }
.p3  { bottom: 50px;  left: 80px;  transform: rotate(5deg);   background-color: #fdffb6; }
.p4  { bottom: 70px;  right: 30px; transform: rotate(-20deg); background-color: #caffbf; }
.p5  { bottom: 90px;  left: 40px;  transform: rotate(45deg);  background-color: #9bf6ff; }
.p6  { bottom: 110px; right: 60px; transform: rotate(-5deg);  background-color: #a0c4ff; }
.p7  { bottom: 130px; left: 20px;  transform: rotate(25deg);  background-color: #bdb2ff; }
.p8  { bottom: 150px; right: 80px; transform: rotate(-15deg); background-color: #ffc6ff; }
.p9  { bottom: 170px; left: 90px;  transform: rotate(10deg);  background-color: #fffffc; }
.p10 { bottom: 190px; right: 20px; transform: rotate(-30deg); background-color: #ff99c8; }
.p11 { bottom: 210px; left: 30px;  transform: rotate(5deg);   background-color: #e4c1f9; }
.p12 { bottom: 220px; right: 50px; transform: rotate(-10deg); background-color: #d0f4de; }
.p13 { bottom: 240px; left: 60px;  transform: rotate(20deg);  background-color: #fcf6bd; }
.p14 { bottom: 260px; right: 30px; transform: rotate(-5deg);  background-color: #ffcbc1; }
.p15 { bottom: 270px; left: 20px;  transform: rotate(15deg);  background-color: #80ed99; }

/* --- POPUP NOTE (Unfolded) --- */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 100; backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}

.note-paper {
    width: 320px; min-height: 240px;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: rotate(-2deg);
    animation: unfold 0.4s ease-out;
    border: 8px solid white; /* Photo frame style border */
}

/* --- THE 5 CUSTOM BACKGROUND PATTERNS --- */

/* 1. Polka Dots */
.pattern-0 {
    background-color: #fff0f5;
    background-image: radial-gradient(#db7093 15%, transparent 16%);
    background-size: 20px 20px;
}
/* 2. Grid (Graph Paper) */
.pattern-1 {
    background-color: #f0f8ff;
    background-image: linear-gradient(#b0c4de 1px, transparent 1px), linear-gradient(90deg, #b0c4de 1px, transparent 1px);
    background-size: 20px 20px;
}
/* 3. Hearts (CSS Radial Gradient trick) */
.pattern-2 {
    background-color: #fff5f5;
    background-image: radial-gradient(circle at 10px 10px, #ffb3c1 2px, transparent 2.5px);
    background-size: 20px 20px;
}
/* 4. Diagonal Stripes */
.pattern-3 {
    background-color: #f5f5dc;
    background-image: repeating-linear-gradient(45deg, #e6e6fa 0, #e6e6fa 10px, #ffffff 10px, #ffffff 20px);
}
/* 5. Clouds/Soft */
.pattern-4 {
    background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
}

/* Washi Tape at Top */
.tape-strip {
    width: 120px; height: 35px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0,0,0,0.1);
    position: absolute; top: -15px; left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
}

@keyframes unfold { from { transform: scale(0) rotate(20deg); } to { transform: scale(1) rotate(-2deg); } }

/* ARTISTIC FONT */
#note-text { 
    font-size: 2rem; /* Large and Readable */
    color: #444; 
    font-family: 'Sacramento', cursive; /* The new artistic font */
    line-height: 1.4;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

.note-footer { 
    margin-top: 30px; font-size: 0.8rem; color: #777; font-family: 'Poppins', sans-serif;
}

.back-btn { 
    margin-top: 20px; padding: 10px 25px; background: white; 
    border: none; border-radius: 50px; cursor: pointer; color: #d6336c; 
    font-weight: bold; font-size: 1rem; box-shadow: 0 5px 15px rgba(214,51,108,0.2); 
}
