/* Font setup */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.font-geist-mono {
    font-family: 'Press Start 2P', monospace;
}

/* Global styles */
html, body {
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Crystal ball */
#crystal-dome {
    perspective: 1000px;
    transform-style: preserve-3d;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.1);
}

#scene {
    transform-style: preserve-3d;
}

/* Pixel art base */
#ball-base {
    transform: translateY(-10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.light {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
    animation: blink 2s infinite alternate;
}

.light:nth-child(2) {
    animation-delay: 0.5s;
}

.light:nth-child(3) {
    animation-delay: 1s;
}

.light:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes blink {
    0%, 80% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Snow particles */
.snowflake {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
}

/* Christmas Tree - Pixel Art Style */
.pixel-art {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.tree {
    width: 48px;
    height: 72px;
    position: relative;
    z-index: 2;
}

.tree-top {
    width: 24px;
    height: 16px;
    background: #2D882D;
    position: absolute;
    top: 0;
    left: 12px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    box-shadow: -2px 2px 0 #1A541A;
}

.tree-middle {
    width: 32px;
    height: 20px;
    background: #2D882D;
    position: absolute;
    top: 14px;
    left: 8px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    box-shadow: -2px 2px 0 #1A541A;
}

.tree-bottom {
    width: 40px;
    height: 24px;
    background: #2D882D;
    position: absolute;
    top: 32px;
    left: 4px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    box-shadow: -2px 2px 0 #1A541A;
}

.tree-trunk {
    width: 10px;
    height: 12px;
    background: #8B4513;
    position: absolute;
    bottom: 0;
    left: 19px;
    box-shadow: -2px 2px 0 #5D2906;
}

/* Snowman - Pixel Art Style */
.snowman {
    width: 30px;
    height: 40px;
    position: relative;
    z-index: 1;
}

.snowman-head {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 7px;
    box-shadow: -2px 2px 0 #E0E0E0;
}

.snowman-head::after {
    content: '';
    width: 2px;
    height: 6px;
    background: #FF6B00;
    position: absolute;
    top: 8px;
    left: 7px;
}

.snowman-head::before {
    content: '';
    width: 2px;
    height: 2px;
    background: #333;
    position: absolute;
    top: 5px;
    left: 4px;
    box-shadow: 6px 0 0 #333;
}

.snowman-body {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 3px;
    box-shadow: -2px 2px 0 #E0E0E0;
}

/* Gift boxes */
.gift {
    width: 16px;
    height: 16px;
    position: absolute;
    bottom: 0;
}

.gift-red {
    background: #D32F2F;
    box-shadow: -2px 2px 0 #8A1C1C;
    left: 0;
}

.gift-green {
    background: #388E3C;
    box-shadow: -2px 2px 0 #1B5E20;
    left: 20px;
    bottom: 8px;
}

.gift::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #FFD700;
    position: absolute;
    left: 6px;
    top: 0;
}

.gift::after {
    content: '';
    width: 16px;
    height: 4px;
    background: #FFD700;
    position: absolute;
    left: 0;
    top: 6px;
}

/* Holly decoration */
.holly {
    width: 20px;
    height: 16px;
}

.holly-leaf {
    width: 8px;
    height: 12px;
    background: #2D882D;
    border-radius: 50% 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-30deg);
}

.holly-leaf:last-of-type {
    left: 6px;
    transform: rotate(30deg) scaleX(-1);
}

.holly-berry {
    width: 6px;
    height: 6px;
    background: #D32F2F;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 7px;
}

/* Animation for shake effect */
@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-5px, -5px) rotate(-2deg); }
    20% { transform: translate(5px, -5px) rotate(2deg); }
    30% { transform: translate(-5px, 5px) rotate(-2deg); }
    40% { transform: translate(5px, 5px) rotate(2deg); }
    50% { transform: translate(-5px, -5px) rotate(-2deg); }
    60% { transform: translate(5px, -5px) rotate(2deg); }
    70% { transform: translate(-5px, 5px) rotate(-2deg); }
    80% { transform: translate(5px, 5px) rotate(2deg); }
    90% { transform: translate(-5px, -5px) rotate(-2deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.shake {
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-image: url('sparkle.svg');
    background-size: contain;
    pointer-events: none;
    opacity: 0;
    animation: sparkle-fade 1s ease-out forwards;
}

@keyframes sparkle-fade {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #crystal-dome {
        width: 250px;
        height: 250px;
    }
    
    #ball-base {
        width: 200px;
    }
}
