/* 
   ==========================================================================
   SCROLLING BIRTHDAY STORY v6.0
   Concept: Modern, Romantic, Scrolling Narrative for Margareta
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Satisfy&family=Dancing+Script:wght@400;700&display=swap');

:root {
    --bg-dreamy: #fdf5f5;
    --dusty-rose: #d4a3a3;
    --champagne: #f7e7ce;
    --silk-white: #fffcfc;
    --velvet-maroon: #5d101d;
    --gold-rose: #b76e79;
    --text-serene: #4a4a4a;
    --pink-soft: #f8e0e6;
    --rose-accent: #e8899e;
    --warm-gold: #d4a574;
    --transition-silk: 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dreamy);
    font-family: 'Playfair Display', serif;
    color: var(--text-serene);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============ Story Layout ============ */
.story-container {
    position: relative;
    z-index: 100;
    width: 100%;
}

.story-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6rem 1.5rem;
    overflow: hidden;
}

.content-wrapper {
    width: 100%;
    max-width: 700px;
    text-align: center;
    position: relative;
    z-index: 5;
}

/* ============ Background Layers ============ */
#bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dreamy);
    z-index: 5;
}

#petal-container, #particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Section Themes */
.section-dedication { background: linear-gradient(to bottom, transparent, rgba(212, 163, 163, 0.08)); }
.section-greeting { background: linear-gradient(to bottom, rgba(212, 163, 163, 0.08), rgba(248, 224, 230, 0.1)); }
.section-note { background: linear-gradient(to bottom, rgba(248, 224, 230, 0.1), rgba(247, 231, 206, 0.08)); }
.section-wishes { background: linear-gradient(to bottom, rgba(247, 231, 206, 0.08), rgba(212, 163, 163, 0.05)); }
.section-world { background: linear-gradient(to bottom, rgba(212, 163, 163, 0.05), rgba(93, 16, 29, 0.03)); }
.section-finale { background: linear-gradient(to bottom, rgba(93, 16, 29, 0.03), rgba(183, 110, 121, 0.1)); }

/* ============ Typography ============ */
.story-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gold-rose);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.story-title-main {
    font-family: 'Satisfy', cursive;
    font-size: 5rem;
    color: var(--velvet-maroon);
    margin: 0.5rem 0;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.05);
}

.story-title-sub {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--gold-rose);
    font-weight: 700;
}

.section-heading {
    font-family: 'Satisfy', cursive;
    font-size: 3rem;
    color: var(--velvet-maroon);
    margin-bottom: 2.5rem;
}

.cursive-story {
    font-family: 'Satisfy', cursive;
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-serene);
}

.cursive-story.small { font-size: 1.3rem; }
.cursive-story.large { font-size: 2.2rem; }

/* ============ Fancy Elements ============ */
.divider-fancy {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.divider-fancy::before, .divider-fancy::after {
    content: '';
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-rose), transparent);
}

.divider-fancy span {
    margin: 0 20px;
    color: var(--gold-rose);
    font-size: 1.4rem;
}

.quote-box-premium {
    padding: 3.5rem 2.5rem;
    background: white;
    border-radius: 25px;
    box-shadow: 0 25px 60px rgba(212, 163, 163, 0.12);
    border: 1px solid rgba(212, 163, 163, 0.1);
}

.line-divider {
    width: 80px;
    height: 2px;
    background: var(--pink-soft);
    margin: 2rem auto;
}

.tagline {
    font-style: italic;
    color: var(--dusty-rose);
    letter-spacing: 1px;
}

/* ============ Components ============ */
.romantic-card {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(248, 224, 230, 0.4), rgba(247, 231, 206, 0.2));
    border-radius: 25px;
    border: 1px solid rgba(212, 163, 163, 0.15);
    margin-bottom: 2.5rem;
}

.story-wish-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.2rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 45px rgba(212, 163, 163, 0.08);
    text-align: left;
    margin: 2rem 0;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.story-wish-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 60px rgba(212, 163, 163, 0.15);
}

.pink-glow:hover { 
    box-shadow: 0 0 40px rgba(255, 105, 180, 0.2);
}
.gold-glow:hover { 
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
}

.wish-icon { 
    font-size: 2.5rem;
    background: white;
    width: 75px;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.story-wish-card:hover .wish-icon {
    transform: scale(1.1) rotate(5deg);
}

.paper-note {
    background: #fff;
    padding: 3rem 2.5rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 2.5rem;
    border-radius: 4px;
    transform: rotate(-1deg);
}

.blessing-list-story {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blessing-list-story li {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.2rem;
    color: var(--text-serene);
    background: white;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(212, 163, 163, 0.05);
    transition: transform 0.3s ease;
}

.blessing-list-story li:hover { transform: translateX(12px); }

.blessing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 3rem;
}

.b-item {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    font-family: 'Satisfy', cursive;
    color: var(--velvet-maroon);
    font-size: 1.2rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.03);
}

/* ============ Finale ============ */
.finale-candle {
    margin: 3rem 0;
    filter: drop-shadow(0 0 30px rgba(212, 163, 163, 0.4));
}

.candle-glow-img {
    width: 220px;
    height: auto;
    border-radius: 20px;
    animation: glow-pulse 3s infinite alternate;
}

@keyframes glow-pulse {
    from { transform: scale(1); filter: brightness(1) drop-shadow(0 0 10px rgba(212, 163, 163, 0.3)); }
    to { transform: scale(1.03); filter: brightness(1.15) drop-shadow(0 0 35px rgba(212, 163, 163, 0.6)); }
}

.finale-text {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--dusty-rose);
    margin: 2.5rem 0;
    line-height: 1.6;
}

.closing-box { margin: 4rem 0; }

.signature {
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--dusty-rose);
    letter-spacing: 2px;
}

.magic-heart-btn {
    padding: 1.3rem 3.5rem;
    background: var(--velvet-maroon);
    color: var(--champagne);
    border: none;
    border-radius: 60px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 35px rgba(93, 16, 29, 0.2);
}

.magic-heart-btn:hover {
    transform: scale(1.1);
    background: #7d1526;
}

/* ============ Reveal System ============ */
.reveal {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0) !important;
}

[data-reveal="fade-up"] { transform: translateY(80px); }
[data-reveal="fade-in"] { transform: scale(0.92); }
[data-reveal="slide-left"] { transform: translateX(-80px); }
[data-reveal="zoom-in"] { transform: scale(0.6); }
[data-reveal="scale-up"] { transform: translateY(120px) scale(0.8); }

/* Scroll Hint */
.scroll-hint {
    margin-top: 4rem;
    opacity: 0.7;
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

.arrow-down {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--gold-rose);
    border-bottom: 2px solid var(--gold-rose);
    transform: rotate(45deg);
    margin: 15px auto;
}

/* ============ Decorations ============ */
.petal {
    position: absolute;
    width: 15px;
    height: 18px;
    background: #f8c8c8;
    border-radius: 0 80% 0 80%;
    opacity: 0.6;
    pointer-events: none;
    animation: petal-fall var(--dur) linear infinite;
}

@keyframes petal-fall {
    0% { transform: translateY(-100px) rotate(0deg) translateX(0px); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(110vh) rotate(720deg) translateX(var(--drift)); opacity: 0; }
}

.sparkle-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--champagne);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle-float var(--dur) ease-out forwards;
}

@keyframes sparkle-float {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .story-title-main { font-size: 3.8rem; }
    .story-title-sub { font-size: 2rem; }
    .section-heading { font-size: 2.5rem; }
    .cursive-story { font-size: 1.3rem; }
    .cursive-story.large { font-size: 1.8rem; }
    
    .story-section { padding: 4rem 1.2rem; }
    .quote-box-premium { padding: 2.5rem 1.5rem; }
    
    .story-wish-card { flex-direction: column; text-align: center; gap: 1rem; }
    .blessing-grid { grid-template-columns: 1fr; }
    .magic-heart-btn { width: 100%; padding: 1.2rem; }
}

@media (max-width: 480px) {
    .story-title-main { font-size: 3rem; }
    .story-subtitle { font-size: 0.9rem; letter-spacing: 3px; }
    .paper-note { padding: 2rem 1.2rem; transform: none; }
    .cursive-story { font-size: 1.15rem; }
}

/* ============ Music Controller ============ */
.music-controller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 163, 163, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(212, 163, 163, 0.2);
    transition: all 0.4s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.6);
}

.music-icon {
    font-size: 1.5rem;
    color: var(--gold-rose);
    transition: transform 0.8s ease;
}

.music-btn.playing .music-icon {
    animation: rotate-music 4s linear infinite;
}

@keyframes rotate-music {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}