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

body {
    font-family: 'Dancing Script', cursive;
    background: linear-gradient(135deg, #B0E0E6 0%, #87CEEB 50%, #ADD8E6 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Christmas Lights Animation */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.light {
    position: absolute;
    width: 16px;
    height: 20px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: currentColor;
    box-shadow: 
        0 0 15px currentColor,
        0 0 30px currentColor,
        0 0 45px currentColor,
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    animation: twinkle 2s ease-in-out infinite;
    transform-origin: center bottom;
}

.light::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 6px;
    background: #2C2C2C;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.light::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.light-1 { top: 5%; left: 5%; color: #DC143C; animation-delay: 0s; }
.light-2 { top: 5%; left: 15%; color: #228B22; animation-delay: 0.2s; }
.light-3 { top: 5%; left: 25%; color: #FFD700; animation-delay: 0.4s; }
.light-4 { top: 5%; left: 35%; color: #DC143C; animation-delay: 0.6s; }
.light-5 { top: 5%; left: 45%; color: #228B22; animation-delay: 0.8s; }
.light-6 { top: 5%; left: 55%; color: #FFD700; animation-delay: 1s; }
.light-7 { top: 5%; left: 65%; color: #DC143C; animation-delay: 1.2s; }
.light-8 { top: 5%; left: 75%; color: #228B22; animation-delay: 1.4s; }
.light-9 { top: 5%; left: 85%; color: #FFD700; animation-delay: 1.6s; }
.light-10 { top: 5%; left: 95%; color: #DC143C; animation-delay: 1.8s; }

.light-11 { bottom: 5%; left: 5%; color: #228B22; animation-delay: 0.1s; }
.light-12 { bottom: 5%; left: 15%; color: #FFD700; animation-delay: 0.3s; }
.light-13 { bottom: 5%; left: 25%; color: #DC143C; animation-delay: 0.5s; }
.light-14 { bottom: 5%; left: 35%; color: #228B22; animation-delay: 0.7s; }
.light-15 { bottom: 5%; left: 45%; color: #FFD700; animation-delay: 0.9s; }
.light-16 { bottom: 5%; left: 55%; color: #DC143C; animation-delay: 1.1s; }
.light-17 { bottom: 5%; left: 65%; color: #228B22; animation-delay: 1.3s; }
.light-18 { bottom: 5%; left: 75%; color: #FFD700; animation-delay: 1.5s; }
.light-19 { bottom: 5%; left: 85%; color: #DC143C; animation-delay: 1.7s; }
.light-20 { bottom: 5%; left: 95%; color: #228B22; animation-delay: 1.9s; }

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.4; 
        transform: scale(1);
        filter: brightness(0.7);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.15);
        filter: brightness(1.3);
    }
}

/* Floating Emojis */
.floating-emoji {
    position: fixed;
    font-size: 3rem;
    pointer-events: none;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease, scale 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.floating-emoji:hover {
    transform: scale(1.5) !important;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.emoji-1 { top: 10%; left: 10%; animation-delay: 0s; }
.emoji-2 { top: 20%; right: 15%; animation-delay: 1s; }
.emoji-3 { top: 50%; left: 8%; animation-delay: 2s; }
.emoji-4 { bottom: 20%; right: 12%; animation-delay: 3s; }
.emoji-5 { top: 30%; right: 8%; animation-delay: 4s; }
.emoji-6 { bottom: 15%; left: 15%; animation-delay: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-25px) rotate(3deg); }
}

/* Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Notebook Paper */
.notebook-paper {
    width: 600px;
    max-width: 90vw;
    min-height: 500px;
    background: #FEF9E7;
    background-image: 
        repeating-linear-gradient(
            #FEF9E7 0px,
            #FEF9E7 24px,
            #4169E1 24px,
            #4169E1 25px
        );
    padding: 40px 50px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.05);
    transform: rotate(-1deg);
    animation: paperEntrance 1s ease-out;
    border-radius: 2px;
}

.notebook-paper::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #DC143C;
    opacity: 0.6;
}

.notebook-paper::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

@keyframes paperEntrance {
    0% {
        opacity: 0;
        transform: rotate(-5deg) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: rotate(-1deg) scale(1);
    }
}

.paper-content {
    position: relative;
    z-index: 1;
}

.letter-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    line-height: 2.2rem;
    color: #2C3E50;
    text-align: left;
    margin-top: 10px;
    padding-left: 20px;
    position: relative;
    animation: fadeInText 1.5s ease-out 0.5s both;
}

.letter-text::first-letter {
    font-size: 2.5rem;
    color: #DC143C;
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pages-container {
        width: 95vw;
        min-height: 400px;
    }
    
    .notebook-paper {
        width: 95vw;
        padding: 30px 40px;
        min-height: 400px;
    }

    .letter-text {
        font-size: 1.5rem;
        line-height: 2rem;
        padding-left: 15px;
    }

    .floating-emoji {
        font-size: 2rem;
    }

    .light {
        width: 12px;
        height: 15px;
    }
    
    .light::before {
        width: 6px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .notebook-paper {
        padding: 25px 30px;
        min-height: 350px;
    }

    .letter-text {
        font-size: 1.3rem;
        line-height: 1.8rem;
    }

    .floating-emoji {
        font-size: 1.5rem;
    }
}

/* Additional decorative elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 20, 60, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 139, 34, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Multiple Pages Support */
.pages-container {
    position: relative;
    width: 600px;
    max-width: 90vw;
    min-height: 500px;
    transition: opacity 0.5s ease;
}

.pages-container.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.notebook-paper {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.notebook-paper.hidden {
    opacity: 0;
    transform: rotate(-3deg) translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.notebook-paper.visible {
    opacity: 1;
    transform: rotate(-1deg) translateY(0);
    visibility: visible;
}

/* Next Letter Button */
.next-letter-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #DC143C 0%, #C1121F 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 
        0 5px 15px rgba(220, 20, 60, 0.4),
        0 0 20px rgba(220, 20, 60, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 1px;
}

.next-letter-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(220, 20, 60, 0.5),
        0 0 30px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #E91E63 0%, #DC143C 100%);
}

.next-letter-btn:active {
    transform: translateX(-50%) translateY(-1px);
}

@media (max-width: 768px) {
    .next-letter-btn {
        bottom: 20px;
        padding: 12px 28px;
        font-size: 1rem;
    }
}

/* Gift Box Surprise */
#gift-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 20;
}

#gift-box {
    width: 260px;
    height: 220px;
    position: relative;
    transform: none;
}

#gift-lid,
#gift-body {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 20px;
    background: linear-gradient(135deg, #DC143C 0%, #C1121F 100%);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 -10px 20px rgba(0, 0, 0, 0.2);
}

#gift-body {
    bottom: 0;
    height: 160px;
    width: 240px;
}

#gift-lid {
    top: 0;
    height: 80px;
    width: 260px;
    background: linear-gradient(135deg, #E91E63 0%, #DC143C 100%);
    transform-origin: center bottom;
    box-shadow: 
        0 -5px 15px rgba(0, 0, 0, 0.2),
        inset 0 -5px 10px rgba(0, 0, 0, 0.1);
}

.gift-bow {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 45px;
    z-index: 10;
}

.bow-knot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.bow-loop {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 35px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-50%);
}

.bow-loop-left {
    left: 8px;
    transform: translateY(-50%) rotate(-25deg);
}

.bow-loop-right {
    right: 8px;
    transform: translateY(-50%) rotate(25deg);
}

#gift-video-wrapper {
    display: none;
    width: 70vw;
    max-width: 900px;
}

#gift-video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#back-to-start {
    display: none;
    margin-top: 8px;
}

/* Gift Animations */
.gift-bounce {
    animation: gift-bounce 1s ease-out 0s 2;
}

@keyframes gift-bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-20px); }
    60% { transform: translateY(10px); }
}

.gift-lid-open {
    animation: lid-open 0.6s ease-out forwards;
}

@keyframes lid-open {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-45deg) translateY(-30px); }
}

/* Gift Glitter Effect */
.gift-glitter {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
}

.gift-glitter.active {
    opacity: 1;
}

.gift-glitter .snowflake {
    position: absolute;
    font-size: 16px;
    color: #FFFFFF;
    opacity: 0;
    pointer-events: none;
}

.gift-glitter.active .snowflake {
    animation: glitter-float 1s ease-out forwards;
}

@keyframes glitter-float {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--glitter-x), var(--glitter-y)) scale(0.3);
    }
}

@media (max-width: 768px) {
    #gift-stage {
        gap: 20px;
        padding: 15px;
    }
    
    #gift-box {
        width: 200px;
        height: 170px;
    }
    
    #gift-body {
        width: 185px;
        height: 125px;
    }
    
    #gift-lid {
        width: 200px;
        height: 60px;
    }
    
    #gift-video-wrapper {
        width: 95vw;
    }
}

