html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* This locks the page from moving at all */
    position: fixed;  /* This prevents the "bounce" effect on iOS */
    touch-action: none; /* Disables browser-level gestures that cause shifting */
}

/* Ensure everything stays within the screen width */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
	/* This tells the browser to block text selection entirely */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* IE 10 and IE 11 */
    user-select: none;         /* Standard syntax */
    
    /* This prevents the "callout" menu (the copy/paste bar) on mobile */
    -webkit-touch-callout: none;
    font-family: 'Montserrat', sans-serif; 
    overflow-x: hidden; /* This prevents the site from scrolling sideways */
    background: #000; 
    color: #fff; 
    width: 100%;
    min-height: 100vh;
}

/* This forces every chapter to be the exact size of the screen */
.chapter {
	display: none; 
    opacity: 0;
    transition: opacity 1s ease;
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100dvh;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    text-align: center; 
    padding: 20px;
    overflow: hidden; /* Prevents contents from overflowing */
}
.chapter.active { opacity: 1; visibility: visible; z-index: 10; }

h1, h2 { font-family: 'Dancing Script', cursive; font-size: 2.8rem; margin-bottom: 20px; font-weight: normal; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
h3 { font-weight: 300; font-size: 1.2rem; margin-bottom: 30px; letter-spacing: 1px; }

.btn {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4);
    padding: 15px 30px; color: #fff; border-radius: 30px; font-size: 1.1rem;
    cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease; font-family: 'Montserrat', sans-serif; margin-top: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}
.btn:hover { background: rgba(255,255,255,0.3); transform: translateY(-3px); box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3); }

/* Utility Classes */
.hidden { display: none !important; }
.fade-text { opacity: 0; transform: translateY(20px); animation: fadeInUp 1s forwards ease-out; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2.5s; }
.delay-3 { animation-delay: 4s; }


/* ========================================= */
/* Chapter 1: The 3D Interactive Warp Portal */
/* ========================================= */
.theme-warp { background: #000; overflow: hidden; perspective: 1000px; }

/* The 3D Container */
.warp-container {
    position: absolute; top: 50%; left: 50%;
    width: 0; height: 0;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(60deg) rotateY(0deg) rotateZ(0deg);
    transition: transform 0.5s ease-out;
    z-index: 1;
}

/* The Glowing Rings */
.warp-ring {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 15px #2e8b57, inset 0 0 20px #2e8b57;
    transition: all 0.5s ease;
}

/* Sizing and base rotation for the sphere effect */
.r1 { width: 300px; height: 300px; animation: spinX 8s linear infinite; border-color: rgba(46, 139, 87, 0.8); }
.r2 { width: 280px; height: 280px; animation: spinY 7s linear infinite; }
.r3 { width: 260px; height: 260px; animation: spinZ 6s linear infinite; border-color: rgba(255, 215, 0, 0.8); }
.r4 { width: 240px; height: 240px; animation: spinX 5s linear infinite reverse; }
.r5 { width: 220px; height: 220px; animation: spinY 4s linear infinite reverse; border-color: #fff; box-shadow: 0 0 30px #fff; }

@keyframes spinX { 100% { transform: translate(-50%, -50%) rotateX(360deg); } }
@keyframes spinY { 100% { transform: translate(-50%, -50%) rotateY(360deg); } }
@keyframes spinZ { 100% { transform: translate(-50%, -50%) rotateZ(360deg); } }

/* ========================================= */
/* THE "CHARGING" STATE (When she holds the button) */
/* ========================================= */
.warp-container.charging { transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(2.5); transition: transform 3.5s ease-in; }
.warp-container.charging .warp-ring { border-width: 6px; box-shadow: 0 0 50px #fff, inset 0 0 50px #ffd700; border-color: #fff; }
.warp-container.charging .r1 { animation: spinX 0.5s linear infinite; }
.warp-container.charging .r2 { animation: spinY 0.4s linear infinite; }
.warp-container.charging .r3 { animation: spinZ 0.3s linear infinite; }
.warp-container.charging .r4 { animation: spinX 0.2s linear infinite reverse; }
.warp-container.charging .r5 { animation: spinY 0.1s linear infinite reverse; }

/* Blinding White Flash */
.flashbang {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 50; opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease;
}
.flashbang.flash { opacity: 1; }

/* Text & Buttons */
.warp-content { z-index: 10; position: relative; margin-top: 150px; }
.warp-btn { background: rgba(46, 139, 87, 0.3); border-color: #2e8b57; padding: 20px 40px; font-size: 1.3rem; user-select: none; -webkit-user-select: none; }
.warp-btn:active { transform: scale(0.95); background: #2e8b57; }
.hold-hint { font-size: 0.9rem; margin-top: 15px; opacity: 0.6; font-style: italic; }


/* ========================================= */
/* Chapter 2: The Floating Lanterns          */
/* ========================================= */
.theme-lanterns { 
    background: #000; /* Pitch black start! */
    overflow: hidden; 
    position: relative;
}

/* The beautiful green background that fades in */
.lantern-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at bottom, #0a331a 0%, #020a05 80%);
    opacity: 0; /* Hidden at first */
    transition: opacity 3s ease-in-out; /* Slow, dramatic fade */
    z-index: 0;
}

/* The text content that fades in */
.chap2-content {
    z-index: 10; position: relative; 
    opacity: 0; /* Hidden at first */
    transition: opacity 3s ease-in-out 1s; /* Fades in slowly, slightly after the background */
}

/* THE MAGIC TRIGGER: When JS adds the 'illuminated' class */
.theme-lanterns.illuminated .lantern-bg,
.theme-lanterns.illuminated .chap2-content {
    opacity: 1;
}

/* Lantern Styles & Animation */
.lantern-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

.lantern { 
    position: absolute; bottom: -100px; 
    width: 25px; height: 35px; 
    background: rgba(255, 180, 50, 0.9); 
    border-radius: 12px 12px 3px 3px; /* Rounded at the top, flat at the bottom */
    box-shadow: 0 0 20px #ffb432, inset 0 5px 10px rgba(255,255,255,0.4), inset 0 -8px 15px rgba(220, 80, 0, 0.9); 
    animation: float-up infinite ease-in; opacity: 0; 
}

/* The glowing flame (Moved to the BOTTOM) */
.lantern::before { 
    content: ''; 
    position: absolute; 
    bottom: -3px; /* Poking out the bottom now! */
    left: 50%; transform: translateX(-50%); 
    width: 12px; height: 8px; 
    background: rgba(255, 255, 255, 0.9); 
    border-radius: 50%; 
    box-shadow: 0 0 15px 5px #fff, 0 5px 20px #ffaa00; 
}

@keyframes float-up { 
    0% { top: 110%; margin-left: -15px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: -20%; margin-left: 15px; opacity: 0; }
}


/* ========================================= */
/* Chapter 3: Wish (Premium Cake & Lighting) */
/* ========================================= */
.theme-wish { background: #08120b; }

/* Dynamic Ambient Glow from Candle */
.ambient-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(255, 180, 50, 0.25) 0%, rgba(10, 34, 19, 0) 70%);
    z-index: 1; pointer-events: none;
    transition: opacity 1.5s ease;
}
.glow-text { text-shadow: 0 0 15px rgba(255, 200, 100, 0.4); z-index: 5; position: relative; }

/* CSS Cake Design */
.cake-container { position: relative; margin-top: 60px; transition: opacity 1s, transform 1s; z-index: 5; height: 150px; }
.css-cake { position: relative; width: 140px; height: 120px; margin: 0 auto; }
.cake-tier { position: absolute; left: 50%; transform: translateX(-50%); background: #fdf8ea; border-radius: 8px; box-shadow: inset 0 -5px 15px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.2); }
.bottom-tier { width: 140px; height: 60px; bottom: 0; border-bottom: 4px solid #c2a675; }
.top-tier { width: 100px; height: 50px; bottom: 60px; background: #fffaf0; }
.icing-drip { position: absolute; bottom: 95px; left: 50%; transform: translateX(-50%); width: 110px; height: 20px; background: #fff; border-radius: 20px; box-shadow: 0 3px 5px rgba(0,0,0,0.05); z-index: 2; }
.candle-stand { position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); z-index: 3; }
.css-candle { position: relative; width: 12px; height: 45px; background: repeating-linear-gradient(45deg, #fff, #fff 5px, #ffd1dc 5px, #ffd1dc 10px); border-radius: 4px; box-shadow: inset -2px 0 5px rgba(0,0,0,0.1); }

/* Candle Flame & Animations */
.flame { position: absolute; top: -30px; left: -4px; width: 20px; height: 28px; background: #ff9d00; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 20px #ff9d00, 0 0 40px #ff6600, 0 0 80px #ffb347; animation: flicker 0.1s infinite alternate; }

@keyframes flicker { 0% { transform: scale(1) skewX(-2deg); opacity: 0.9; } 100% { transform: scale(1.1) skewX(2deg); opacity: 1; } }

/* Candle Flinch Animation */
@keyframes flinch {
    0% { transform: scale(1) skewX(-2deg); opacity: 0.9; }
    25% { transform: scale(0.4) skewX(15deg) translateY(5px); opacity: 0.5; }
    50% { transform: scale(0.2) skewX(-20deg) translateY(10px); opacity: 0.2; }
    75% { transform: scale(0.5) skewX(10deg) translateY(2px); opacity: 0.6; }
    100% { transform: scale(1) skewX(2deg); opacity: 1; }
}

/* Magic Dust */
.magic-dust { font-size: 3rem; animation: float-dust 3s infinite ease-in-out; text-shadow: 0 0 20px rgba(255, 182, 193, 0.8); }
.wish-text { font-family: 'Dancing Script', cursive; font-size: 2rem; color: #fdf8ea; margin-top: 15px; }


/* ========================================= */
/* Chapter 4: Memories (Sunbeams & Nature)   */
/* ========================================= */
.theme-memories { background: linear-gradient(to bottom, #fdfbfb, #e6efe8); color: #2e593a; }
.theme-memories .content { z-index: 5; position: relative; }
.theme-memories h2 { text-shadow: 1px 1px 3px rgba(0,0,0,0.1); }
.theme-memories .btn { color: #fff; border-color: #4a5d23; background: #4a5d23; }

/* Dreamy Sunbeams Background */
.sunbeams { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; background: repeating-linear-gradient( 45deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 10%, rgba(255, 255, 255, 0) 20% ); opacity: 0.4; z-index: 0; pointer-events: none; animation: shift-beams 15s linear infinite; }
@keyframes shift-beams { 0% { transform: translateX(-5%); } 100% { transform: translateX(5%); } }

/* Premium CSS Landscape Base */
.css-landscape { position: absolute; bottom: 0; left: 0; width: 100%; height: 200px; z-index: 1; pointer-events: none; overflow: hidden; }

/* Soft Rolling Hills */
.hill { position: absolute; border-radius: 50%; }
.hill-bg { width: 160%; height: 120px; bottom: -50px; left: -30%; background: #cce0d4; }
.hill-mg { width: 140%; height: 90px; bottom: -30px; right: -20%; background: #a6cbb5; }
.hill-fg { width: 120%; height: 60px; bottom: -20px; left: -10%; background: #8fa681; }

/* Nature Container (Grass & Flowers) */
.nature-container { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }

/* Swaying Grass */
.blade { position: absolute; bottom: 0; width: 4px; background: linear-gradient(to top, #4a5d23, #72905c); border-radius: 50% 50% 0 0; transform-origin: bottom center; animation: sway-nature 3s infinite ease-in-out alternate; }

/* Pure CSS Pink Tulips */
.css-tulip { position: absolute; bottom: 0; width: 3px; background: #4a5d23; border-radius: 2px; transform-origin: bottom center; animation: sway-nature 3.5s infinite ease-in-out alternate; }
.tulip-head { position: absolute; top: -14px; left: -5px; width: 13px; height: 16px; background: #f472b6; border-radius: 40% 40% 50% 50%; overflow: hidden; box-shadow: inset -2px -2px 4px rgba(0,0,0,0.1); }
.tulip-head::after { content: ''; position: absolute; bottom: 0; left: 4px; width: 5px; height: 12px; background: #db2777; border-radius: 50px; }

/* Pure CSS White Daisies */
.css-flower { position: absolute; bottom: 0; width: 2px; background: #72905c; transform-origin: bottom center; animation: sway-nature 4s infinite ease-in-out alternate; }
.flower-head { position: absolute; top: -10px; left: -6px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 0 2px rgba(0,0,0,0.1); }
.flower-head::before { content: ''; position: absolute; top: 2px; left: -6px; width: 26px; height: 10px; background: #fff; border-radius: 10px; z-index: -1; transform: rotate(45deg); box-shadow: 0 0 2px rgba(0,0,0,0.1); }
.flower-head::after { content: ''; position: absolute; top: 2px; left: -6px; width: 26px; height: 10px; background: #fff; border-radius: 10px; z-index: -1; transform: rotate(-45deg); box-shadow: 0 0 2px rgba(0,0,0,0.1); }
.flower-center { position: absolute; top: 3px; left: 3px; width: 8px; height: 8px; background: #fbbf24; border-radius: 50%; }

@keyframes sway-nature { 0% { transform: rotate(-8deg); } 100% { transform: rotate(12deg); } }

/* Magical Fireflies */
.firefly { position: absolute; bottom: 10px; width: 4px; height: 4px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px 3px rgba(255, 235, 59, 0.8); animation: float-firefly 6s infinite ease-in; opacity: 0; }
.ff1 { left: 20%; animation-delay: 0s; } .ff2 { left: 50%; animation-delay: 2s; animation-duration: 5s; } .ff3 { left: 80%; animation-delay: 1s; animation-duration: 7s; } .ff4 { left: 35%; animation-delay: 3s; animation-duration: 5.5s; } .ff5 { left: 65%; animation-delay: 4s; animation-duration: 6.5s; }
@keyframes float-firefly { 0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-120px) translateX(20px) scale(0.5); opacity: 0; } }

/* Circular Gallery */
.circle-gallery { 
    position: relative; 
    width: 90vw; /* Use viewport width instead of fixed pixels */
    max-width: 440px; /* Keep it from getting too big on PC */
    height: 90vw; 
    max-height: 440px;
    margin: 20px auto; 
    border-radius: 50%; 
}
.orbit-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; animation: orbit 40s linear infinite; }
.polaroid-wrapper { position: absolute; top: 50%; left: 50%; width: 110px; height: 135px; margin-top: -67.5px; margin-left: -55px; }
.orbit-container .polaroid-wrapper { transform: rotate(var(--angle)) translateY(-200px); }
.center-wrapper { z-index: 10; transform: scale(1.25); }
.un-rotate { width: 100%; height: 100%; transform: rotate(calc(-1 * var(--angle))); }
.counter-orbit { width: 100%; height: 100%; animation: counter-orbit 40s linear infinite; }

/* Shortened Branches */
.branch { position: absolute; top: 100%; left: 50%; width: 2px; height: 35px; background: #8fa681; margin-left: -1px; z-index: -1; }
.branch::before { content: '🌸'; position: absolute; left: -10px; top: 25%; font-size: 0.8rem; }

/* Premium Polaroid Styling & Tape (WITH UPDATED PADDING) */
.circle-gallery .polaroid { 
    position: relative; background: #fff; 
    padding: 6px 6px 12px 6px; /* <-- Reduced padding to remove white space! */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    width: 100%; height: 100%; border-radius: 2px; 
    transform-origin: top center; animation: swing 4s infinite ease-in-out alternate; 
}
.circle-gallery .polaroid::before { 
    content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-2deg); 
    width: 40px; height: 12px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    z-index: 5; border-radius: 1px; backdrop-filter: blur(2px); 
}

/* Elegant Photo Placeholders (WITH UPDATED HEIGHT) */
.circle-gallery .polaroid .img-ph { 
    height: 110px; /* <-- Stretches the image down to fill the card! */
    background: linear-gradient(135deg, #e6efe8, #c2d6c9); 
    display: flex; align-items: center; justify-content: center; 
    margin-bottom: 4px; border-radius: 2px; 
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05); 
    overflow: hidden; 
}
.circle-gallery .center-wrapper .img-ph { height: 85px; margin-bottom: 8px; }
.circle-gallery .polaroid .center-ph { background: linear-gradient(135deg, #fdf8ea, #e8dcc7); }

/* This makes the photos fit flawlessly */
.circle-gallery .polaroid .photo {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.circle-gallery .polaroid p { font-family: 'Dancing Script', cursive; font-size: 1.15rem; color: #4a2c2a; margin: 0; }

/* Staggered Swing Animations */
.center-wrapper .polaroid { animation-duration: 6s; }
.orbit-container .polaroid-wrapper:nth-child(1) .polaroid { animation-delay: 0s; }
.orbit-container .polaroid-wrapper:nth-child(2) .polaroid { animation-delay: 0.5s; animation-direction: alternate-reverse; }
.orbit-container .polaroid-wrapper:nth-child(3) .polaroid { animation-delay: 1s; }
.orbit-container .polaroid-wrapper:nth-child(4) .polaroid { animation-delay: 1.5s; animation-direction: alternate-reverse; }
.orbit-container .polaroid-wrapper:nth-child(5) .polaroid { animation-delay: 2s; }
.orbit-container .polaroid-wrapper:nth-child(6) .polaroid { animation-delay: 2.5s; animation-direction: alternate-reverse; }

@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes counter-orbit { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes swing { 0% { transform: rotate(-4deg); } 100% { transform: rotate(4deg); } }


/* ========================================= */
/* Chapter 5: Letter (Stylish Paper & Rain)  */
/* ========================================= */
.theme-letter { background: radial-gradient(circle at center, #113321, #05120b); }
.theme-letter .letter-content { z-index: 5; position: relative; display: flex; flex-direction: column; align-items: center; }

.hearts-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 1; }
.falling-heart { position: absolute; top: -10%; font-size: 1.8rem; animation: fall 7s linear infinite; opacity: 0; filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.5)); }

@keyframes fall { 0% { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; } 10% { opacity: 0.8; } 80% { opacity: 0.8; } 100% { transform: translateY(110vh) rotate(360deg) scale(1.2); opacity: 0; } }

.stylish-paper { 
    position: relative; 
    max-width: 600px; 
    width: 90%; 
    /* NEW: Control height and add scrolling */
    max-height: 65vh; 
    overflow-y: auto;
	scroll-behavior: smooth;
    /* Optional: Improves smooth scrolling on phones */
    -webkit-overflow-scrolling: touch; 
    
    margin: 0 auto 30px auto; 
    background: #fdf8eab3; 
    border-radius: 6px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 60px rgba(139, 69, 19, 0.08); 
    padding: 25px; 
    backdrop-filter: blur(5px); 
}

.paper-pattern { 
    border: 1.5px solid #c2a675; 
    padding: 30px 25px; 
    border-radius: 4px; 
    /* NEW: Removed min-height so it wraps the text naturally */
    position: relative; 
    background: repeating-linear-gradient( transparent, transparent 31px, rgba(139, 69, 19, 0.15) 31px, rgba(139, 69, 19, 0.15) 32px ); 
    line-height: 32px; 
    text-align: left; 
	font-family: 'Dancing Script', cursive; 
    font-size: 1.7rem; 
    color: #4a2c2a !important; /* The !important forces it to be dark brown */
    margin: 0; 
    letter-spacing: 1px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.stylish-paper::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.stylish-paper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.theme-letter .btn.letter-btn { color: #fff; border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.1); }
.theme-letter .btn.letter-btn:hover { background: rgba(255, 255, 255, 0.25); }


/* ========================================= */
/* Chapter 6: Finale                         */
/* ========================================= */
.theme-finale { background: radial-gradient(circle at center, #0e2b1d, #020a05); }
.big-heart { font-size: 7rem; animation: pulse 1.2s infinite; margin-bottom: 20px; filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.6)); }
.fireworks { font-size: 2rem; letter-spacing: 20px; margin-bottom: 20px; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
.sub-msg { font-size: 1.3rem; margin-bottom: 40px; font-weight: 300; opacity: 0.9; }
.signature { font-family: 'Dancing Script', cursive; font-size: 2.5rem; color: #f472b6; text-shadow: 0 0 10px rgba(244, 114, 182, 0.4); }


/* Candle Flinch Animation for Chapter 3 */
@keyframes flinch {
    0% { transform: scale(1) skewX(-2deg); opacity: 0.9; }
    25% { transform: scale(0.4) skewX(15deg) translateY(5px); opacity: 0.5; }
    50% { transform: scale(0.2) skewX(-20deg) translateY(10px); opacity: 0.2; }
    75% { transform: scale(0.5) skewX(10deg) translateY(2px); opacity: 0.6; }
    100% { transform: scale(1) skewX(2deg); opacity: 1; }
} 
/* ========================= */
/* PREMIUM EFFECTS V3 */
/* ========================= */

.warp-subtitle{
    margin-top:15px;
    font-size:1.2rem;
    opacity:.85;
    color:#d4ffd4;
}

.magic-star{
    font-size:7rem;
    color:gold;
    animation:
        starRise 3s ease forwards,
        starSpin 6s linear infinite;
    filter:
        drop-shadow(0 0 15px gold)
        drop-shadow(0 0 35px gold);
}

@keyframes starRise{
    from{
        opacity:0;
        transform:translateY(100px) scale(.2);
    }
    to{
        opacity:1;
        transform:translateY(-50px) scale(1.2);
    }
}

@keyframes starSpin{
    from{transform:translateY(-50px) rotate(0deg);}
    to{transform:translateY(-50px) rotate(360deg);}
}

.wax-seal{
    position:absolute;
    right:-20px;
    bottom:-20px;
    width:70px;
    height:70px;
    border-radius:50%;
    background:#b91c1c;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:2rem;
    color:white;
    box-shadow:
        0 0 20px rgba(255,0,0,.4),
        inset 0 0 15px rgba(255,255,255,.2);
}

.chapter{
    transition:
        opacity 1.2s ease,
        visibility 1.2s ease,
        transform 1.2s ease;
}

.chapter.active{
    transform:scale(1);
}

.chapter:not(.active){
    transform:scale(1.05);
}

.fireworks{
    animation:fireworkPulse 2s infinite;
}

@keyframes fireworkPulse{
    0%{transform:scale(1);}
    50%{transform:scale(1.3);}
    100%{transform:scale(1);}
}

.big-heart{
    animation:
        pulse 1.2s infinite,
        heartGlow 3s infinite;
}

@keyframes heartGlow{
    0%{
        filter:drop-shadow(0 0 15px #ff4d6d);
    }
    50%{
        filter:drop-shadow(0 0 40px #ff4d6d);
    }
    100%{
        filter:drop-shadow(0 0 15px #ff4d6d);
    }
}