/* Game Container Styles */
.game-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
    z-index: 2;
}

#game {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

#score {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2em;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

#highScore {
    position: absolute;
    top: 80px;
    right: 30px;
    font-size: 1.2em;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 20;
    transition: all 0.3s ease;
}

#introduction {
    width: 200px;
    height: 150px;
    position: absolute;
    font-weight: 600;
    font-size: 0.8em;
    text-align: center;
    transition: opacity 2s;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

#perfect {
    position: absolute;
    opacity: 0;
    transition: opacity 2s;
    color: #FFD700;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

#restart {
    width: 120px;
    height: 120px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    border: none;
    font-weight: 700;
    font-size: 1.2em;
    opacity: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#restart:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Landing Page Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.game-container {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 640px) {
    .game-container {
        min-height: 300px;
    }
    
    #score {
        font-size: 1.5em;
        top: 20px;
        right: 20px;
    }
    
    #highScore {
        font-size: 1em;
        top: 60px;
        right: 20px;
    }
    
    #introduction {
        font-size: 0.7em;
    }
    
    #restart {
        width: 100px;
        height: 100px;
        font-size: 1em;
    }
}

/* Hide YouTube elements as they're integrated in the footer */
#youtube,
#youtube-card {
    display: none;
}

/* Snow container */
.snow-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

/* Snow particles */
.snow {
    position: fixed;
    top: -10vh;
    pointer-events: none;
    z-index: 1;
}

/* Generate multiple snowflakes with different sizes and animations */
@keyframes fall {
    from {
        transform: translateY(-10vh) translateX(0);
    }
    to {
        transform: translateY(100vh) translateX(20px);
    }
}

/* Create multiple snow particles with different properties */
.snow:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: -2s; }
.snow:nth-child(2) { left: 20%; animation-duration: 8s; animation-delay: -1s; }
.snow:nth-child(3) { left: 30%; animation-duration: 12s; animation-delay: -4s; }
.snow:nth-child(4) { left: 40%; animation-duration: 9s; animation-delay: -3s; }
.snow:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: -5s; }
.snow:nth-child(6) { left: 60%; animation-duration: 7s; animation-delay: -2.5s; }
.snow:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: -1.5s; }
.snow:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: -3.5s; }
.snow:nth-child(9) { left: 90%; animation-duration: 8s; animation-delay: -4.5s; }
.snow:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: -2.5s; }

/* Adjust snow particle sizes */
.snow:nth-child(2n) { width: 8px; height: 8px; }
.snow:nth-child(3n) { width: 6px; height: 6px; }
.snow:nth-child(4n) { width: 12px; height: 12px; }

/* Platform adjustments for winter theme */
canvas {
    position: relative;
    z-index: 2;
}

/* Theme-specific effects */
[data-theme="volcano"] .snow,
[data-theme="desert"] .snow,
[data-theme="sea"] .snow {
    pointer-events: none;
    z-index: 1;
}

/* Volcano particles rising animation */
@keyframes rise {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(50vh) translateX(-20px) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(-40px) scale(0.8);
        opacity: 0;
    }
}

/* Desert sandstorm animation */
@keyframes sandstorm {
    0% {
        transform: translateX(-10vw) translateY(0) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translateX(50vw) translateY(10vh) rotate(180deg);
        opacity: 0.6;
    }
    100% {
        transform: translateX(110vw) translateY(20vh) rotate(360deg);
        opacity: 0.4;
    }
}

/* Sea bubbles animation */
@keyframes bubble {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) translateX(10px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) translateX(0) scale(0.8);
        opacity: 0;
    }
}

/* Theme-specific particle speeds and variations */
[data-theme="volcano"] .snow:nth-child(1) { animation-duration: 3s; width: 12px; height: 12px; }
[data-theme="volcano"] .snow:nth-child(2) { animation-duration: 4s; width: 8px; height: 8px; }
[data-theme="volcano"] .snow:nth-child(3) { animation-duration: 3.5s; width: 10px; height: 10px; }
[data-theme="volcano"] .snow:nth-child(4) { animation-duration: 4.5s; width: 6px; height: 6px; }
[data-theme="volcano"] .snow:nth-child(5) { animation-duration: 3.2s; width: 14px; height: 14px; }

[data-theme="desert"] .snow:nth-child(1) { animation-duration: 12s; }
[data-theme="desert"] .snow:nth-child(2) { animation-duration: 10s; }
[data-theme="desert"] .snow:nth-child(3) { animation-duration: 14s; }
[data-theme="desert"] .snow:nth-child(4) { animation-duration: 11s; }
[data-theme="desert"] .snow:nth-child(5) { animation-duration: 13s; }

[data-theme="sea"] .snow:nth-child(1) { animation-duration: 6s; width: 15px; height: 15px; }
[data-theme="sea"] .snow:nth-child(2) { animation-duration: 8s; width: 12px; height: 12px; }
[data-theme="sea"] .snow:nth-child(3) { animation-duration: 7s; width: 10px; height: 10px; }
[data-theme="sea"] .snow:nth-child(4) { animation-duration: 9s; width: 8px; height: 8px; }
[data-theme="sea"] .snow:nth-child(5) { animation-duration: 7.5s; width: 13px; height: 13px; }

/* Theme-specific particle sizes */
[data-theme="volcano"] .snow { width: 6px; height: 6px; }
[data-theme="desert"] .snow { width: 3px; height: 3px; }
[data-theme="sea"] .snow { width: 8px; height: 8px; border-radius: 50%; }

/* Map Selector Responsive Styles */
@media (max-width: 768px) {
    /* Move map selector to bottom on mobile */
    div[data-map-button] {
        transform: none !important;
        right: 0 !important;
        bottom: 20px !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        width: auto !important;
        max-width: 90% !important;
        z-index: 20;
    }
}

/* Map Preview Hover Effects */
div[data-map-button] > div:first-child {
    position: relative;
    overflow: hidden;
}

div[data-map-button] > div:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

div[data-map-button]:hover > div:first-child::after {
    opacity: 1;
}

/* Active Map Style */
div[data-map-button].active {
    background: rgba(255, 215, 0, 0.2) !important;
}

div[data-map-button].active > div:first-child {
    border-color: #ffd700 !important;
}

div[data-map-button].active span {
    color: #ffd700 !important;
}

@keyframes highScoreUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: #FFA500;
    }
    100% {
        transform: scale(1);
        color: #FFD700;
    }
}

.new-high-score {
    animation: highScoreUpdate 1s ease;
} 