body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* Dynamic background that transitions from night mountains to white snow */
    background: linear-gradient(
        180deg,
        #0a1929 0%,
        #1e3a5f 25%,
        #4a7ba7 50%,
        #87b5d9 75%,
        #f0f4f8 90%,
        #ffffff 100%
    );
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* WebGL snow canvas is now handled by snow.js - no CSS snow needed */

header {
    background: linear-gradient(135deg, #0a1929 0%, #1e3a5f 50%, #4a7ba7 100%);
    color: white;
    text-align: center;
    padding: 1.5em 1em;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
    justify-content: center;
}

.unwrap-all-btn {
    margin-top: 0.8em;
    padding: 0.5em 1em;
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    color: white;
    border: 2px solid #FFD700;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: normal;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.85;
}

.unwrap-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.5);
    background: linear-gradient(135deg, #E63946 0%, #A52A2A 100%);
    opacity: 1;
}

.unwrap-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(196, 30, 58, 0.4);
}

main {
    padding: 2em 1em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2em;
    position: relative;
    z-index: 10;
}

.wish-item {
    background: linear-gradient(135deg, #fffefa 0%, #fefdfb 100%);
    margin: 0;
    padding: 1.2em;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(11, 26, 44, 0.15);
    flex: 1 1 calc(100% - 2em);
    max-width: 320px;
    position: relative;
    border-left: 5px solid #b71c1c;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wish-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(11, 26, 44, 0.25);
}

.wish-item h2 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #1a3552;
}

.wish-item p {
    margin: 0.5em 0 0 0;
    color: #2d5675;
    line-height: 1.5;
}

.wish-item details {
    margin-top: 0.7em;
}

.wish-item details summary {
    cursor: pointer;
    color: #1565c0;
    font-weight: 600;
}

.wish-item a {
    color: #b71c1c;
    text-decoration: none;
    font-weight: 500;
}

.wish-item a:hover {
    text-decoration: underline;
}

.wish-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Gift box styling - Interactive present wrapping */
.wish-item.unopened {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.gift-wrapper {
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.gift-box {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--paper-color, #165B33);
    border-radius: 8px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.wish-item.unopened:hover .gift-box {
    transform: translateY(-8px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.gift-box-front {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Ribbon styling */
.ribbon {
    position: absolute;
    background: var(--ribbon-color, #C41E3A);
    box-shadow: 
        inset 0 2px 6px rgba(255, 255, 255, 0.3),
        inset 0 -2px 6px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.ribbon-vertical {
    width: 25%;
    height: 100%;
    left: 37.5%;
    top: 0;
}

.ribbon-horizontal {
    width: 100%;
    height: 25%;
    left: 0;
    top: 37.5%;
}

/* Beautiful bow on top */
.bow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.bow-left,
.bow-right {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--ribbon-color, #C41E3A);
    border-radius: 50% 50% 0 50%;
    box-shadow: inset -2px -2px 6px rgba(0, 0, 0, 0.3);
}

.bow-left {
    transform: rotate(-45deg) translateX(-20px);
}

.bow-right {
    transform: rotate(135deg) translateX(20px);
}

.bow-center {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--ribbon-color, #C41E3A);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    box-shadow: 
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Gift number indicator */
.gift-number {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ribbon-color, #C41E3A);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 4;
}

/* Unwrap animation */
@keyframes unwrap {
    0% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotateY(20deg);
    }
    100% {
        transform: scale(0.8) rotateY(180deg);
        opacity: 0;
    }
}

/* Content reveal animation */
.gift-content {
    animation: revealContent 0.6s ease-out forwards;
}

@keyframes revealContent {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Confetti animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--confetti-color, #FFD700);
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: confettiFall 1s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(var(--random-x, 50px) * (1 - 2 * var(--direction, 0))),
            100px
        ) rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* Opened state - restore normal card styling */
.wish-item.opened {
    background: linear-gradient(135deg, #fffefa 0%, #fefdfb 100%);
    padding: 1.2em;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(11, 26, 44, 0.15);
    border-left: 5px solid #b71c1c;
}

.wish-item.opened:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(11, 26, 44, 0.25);
}

.wish-item::before {
    content: "";
}

@media (min-width: 600px) {
    .wish-item {
        flex: 1 1 calc(50% - 2em);
    }
}

@media (min-width: 1000px) {
    .wish-item {
        flex: 1 1 calc(33.33% - 2em);
    }
}

/* Hide snow when printing */
@media print {
    body::before, 
    body::after { 
        display: none; 
    }
    body {
        background: white;
    }
}

