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

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    /* Festive Christmas background instead of dark blue */
    background: linear-gradient(135deg, #8B0000 0%, #2D0A0A 50%, #8B0000 100%);
    overflow-x: hidden;
}

/* Blurred backdrop that will eventually show the artwork */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bbypic.jpg');
    /* Make it cover to fill entire screen - no blue sides */
    background-size: cover;
    /* Move up slightly to eliminate top blue */
    background-position: center 5%;
    background-repeat: no-repeat;
    /* LESS BLUR - reduced to 12px for more detail */
    filter: blur(12px);
    opacity: 0;
    z-index: 0;
    transition: opacity 1s ease-out;
    /* Backdrop appears when mini presents load */
    animation: showBackdrop 1s ease-out 2s forwards;
    /* Add soft rounded edges for organic holiday feel */
    border-radius: 80px;
    /* Soften the edges even more with a subtle vignette */
    box-shadow: inset 0 0 120px 60px rgba(26, 26, 46, 0.3);
}

@keyframes showBackdrop {
    to {
        opacity: 0.5;
    }
}

/* Falling snow animation */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #fff;
    z-index: 9999;
    user-select: none;
    cursor: default;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

/* Main stage */
.stage {
    position: relative;
    width: min(900px, 95vw);
    height: min(850px, calc(100vh - 60px));
    margin: 0 auto;
    overflow: visible;
    border-radius: 20px;
}

/* ===== STOCKING - FADES AWAY ===== */
.stocking {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crop the black bars but zoom out a bit more - split the difference */
    object-position: center center;
    transform: scale(1.15);
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
    opacity: 1;
    /* Stocking fades away professionally after mini presents appear */
    animation: fadeAwayStocking 1.5s ease-out 4s forwards;
}

@keyframes fadeAwayStocking {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
        visibility: hidden;
    }
}

/* ===== GIANT PRESENT - APPEARS ON TOP OF STOCKING ===== */
.giant-present {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: min(600px, 85vw);
    height: min(600px, 85vw);
    z-index: 2;
    opacity: 0;
    /* Giant present appears immediately on load */
    animation: giantPresentAppear 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

@keyframes giantPresentAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* Giant present wrapped state */
.giant-present-wrap {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 1;
    /* Wrap stays until mini presents unravel, then it disappears */
    animation: giantWrapDisappear 1s ease-out 6.5s forwards;
}

.giant-gift-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 30px 80px rgba(0, 0, 0, 0.7));
}

@keyframes giantWrapDisappear {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.2) rotate(5deg);
        visibility: hidden;
    }
}

/* Giant artwork - revealed after wrap disappears */
.giant-artwork {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    transform: scale(0.9);
    /* Artwork reveals after wrap disappears */
    animation: giantArtReveal 1.2s ease-out 7.5s forwards;
}

.giant-art-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Move the image down to show the white top part */
    object-position: center 60%;
    border-radius: 24px;
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

@keyframes giantArtReveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MINI PRESENTS - POP IN VISIBLY ===== */
.mini-present {
    position: absolute;
    width: min(220px, 65vw);
    opacity: 0;
    z-index: 10;
    /* All mini presents appear after giant present loads */
    animation: miniPresentPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes miniPresentPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Special animation for centered music player */
@keyframes miniPresentPopCentered {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0) rotate(-10deg);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
}

/* Spread presents around the stage - REMOVED TOP LEFT ALBUM ART */
/* Mini present 1 is now hidden/removed from layout */
.mini-present-1 { 
    display: none !important;
}

/* Music player - bottom center - UNWRAPS LAST */
.mini-present-2 { 
    animation-delay: 2.3s; 
    top: 85%; 
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: min(240px, 65vw);
    animation-name: miniPresentPopCentered;
}

/* Licensing - TOP center - unwraps 4th */
.mini-present-3 { 
    animation-delay: 2.6s; 
    top: 8%; 
    left: 50%;
    transform: translateX(-50%) scale(0);
    animation-name: miniPresentPopCentered;
    width: min(220px, 65vw);
}

/* Credits - right side - unwraps 2nd */
.mini-present-4 { 
    animation-delay: 2.9s; 
    top: 62%; 
    right: 5%;
    left: auto;
    width: min(210px, 58vw);
}

/* Legal - left side - unwraps 3rd */
.mini-present-5 { 
    animation-delay: 3.2s; 
    top: 62%; 
    left: 5%;
    width: min(210px, 58vw);
}

/* Mini present wrapping */
.mini-wrap {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background-image: url('gift-box.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    /* Mini wraps unravel after stocking fades */
    animation: miniUnwrap 1s ease-out forwards;
}

/* Stagger unwrapping - PROPER ORDER */
/* 1. Giant present unwraps first (after stocking fades at 4s) */
/* 2. Side boxes unwrap (credits, then legal) */
/* 3. Top licensing unwraps */
/* 4. Music player unwraps LAST */

.mini-present-4 .mini-wrap,
.mini-present-4 .mini-inner { animation-delay: 8.0s; }  /* Credits - 2nd */

.mini-present-5 .mini-wrap,
.mini-present-5 .mini-inner { animation-delay: 8.8s; }  /* Legal - 3rd */

.mini-present-3 .mini-wrap,
.mini-present-3 .mini-inner { animation-delay: 9.6s; }  /* Licensing - 4th */

.mini-present-2 .mini-wrap,
.mini-present-2 .mini-inner { animation-delay: 10.4s; }  /* Music - LAST (5th) */

@keyframes miniUnwrap {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
        visibility: hidden;
    }
}

/* Mini present content */
.mini-inner {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.95);
    /* Elegant white/cream with gold accents - like fancy Christmas cards */
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.96) 0%, rgba(245, 235, 220, 0.98) 100%);
    border: 3px solid rgba(218, 165, 32, 0.8);
    border-radius: 16px;
    padding: 12px 14px;
    color: #2C1810;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(218, 165, 32, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(218, 165, 32, 0.2);
    backdrop-filter: blur(10px);
    animation: miniContentReveal 0.8s ease-out forwards;
    /* Add a subtle shimmer effect with gold */
    background-image: 
        linear-gradient(135deg, rgba(255, 250, 240, 0.96) 0%, rgba(245, 235, 220, 0.98) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(218, 165, 32, 0.1) 10px, rgba(218, 165, 32, 0.1) 20px);
}

/* Add gold corner accents */
.mini-inner::before {
    content: '✦';
    position: absolute;
    top: 8px;
    left: 8px;
    color: rgba(218, 165, 32, 0.6);
    font-size: 14px;
}

.mini-inner::after {
    content: '✦';
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: rgba(218, 165, 32, 0.6);
    font-size: 14px;
}

@keyframes miniContentReveal {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.mini-text {
    text-align: center;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.mini-text p {
    margin: 6px 0;
    line-height: 1.3;
    font-size: 13px;
    color: #2C1810;
}

/* Make the labels (strong tags) gold for accent */
.mini-text strong {
    color: #B8860B;
    font-weight: 900;
}

/* BUT make labels in credits box BLACK */
.mini-present-4 .mini-text strong {
    color: #2C1810;
}

.mini-text a {
    color: #B8860B;
    text-decoration: underline;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mini-text .copyright {
    font-size: 11px;
    margin-top: 8px;
    /* Copyright in GOLD */
    color: #B8860B;
    font-weight: 700;
}

/* Specific styling for credits box - names in gold */
.artist-name {
    color: #B8860B;
    font-weight: 900;
}

/* Email link in black */
.email-link {
    color: #2C1810 !important;
}

/* Licensing box - labels black, links gold */
.label-black {
    color: #2C1810 !important;
}

.email-gold {
    color: #B8860B !important;
}

.itunes-gold {
    color: #B8860B !important;
}

/* "All rights reserved" in gold */
.rights-text {
    color: #B8860B !important;
    font-weight: 700;
}

/* First mini present - album art */
.mini-present-1 .mini-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.mini-album-art {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Audio player styling */
.mini-present-2 .mini-inner {
    padding: 8px 14px;
    border-radius: 999px;
    /* Slightly darker cream for the player */
    background: linear-gradient(135deg, rgba(245, 235, 220, 0.98) 0%, rgba(230, 220, 200, 0.98) 100%);
}

.mini-present-2 audio {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stage {
        width: 96vw;
        height: min(800px, calc(100vh - 40px));
    }
    
    .giant-present {
        width: 90vw;
        height: 90vw;
    }
    
    .mini-present {
        width: 75vw !important;
    }
    
    .mini-text p {
        font-size: 12px;
    }
    
    /* Adjust positions for smaller screens */
    .mini-present-1 { 
        display: none !important;
    }
    
    .mini-present-2 { 
        top: 88%; 
    }
    
    .mini-present-3 { 
        top: 8%;
        left: 50%;
    }
    
    .mini-present-4 { 
        top: 58%; 
        right: 3%;
    }
    
    .mini-present-5 { 
        top: 58%; 
        left: 3%;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px 12px;
    }
    
    .mini-present {
        width: 85vw;
    }
    
    .mini-text p {
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px 12px;
    }
    
    .mini-present {
        width: 85vw;
    }
    
    .mini-text p {
        font-size: 11px;
    }
}
