/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Rubik+Moonrocks&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: "Rubik Moonrocks", cursive;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
                url('./assets/background.jpg')
                no-repeat center center fixed;
    background-size: cover;
    overflow: hidden;
    position: relative;
    color: white;
    border: 10px solid;
    border-image: linear-gradient(45deg, red, green, gold, blue, red) 1;
    animation: borderFlash 5s infinite;
}



canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    height: 100vh;
}

.message {
    text-align: center;
    max-width: 50%;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    padding: 20px;
    border-radius: 10px;
    z-index: 5; /* Higher than other elements */
    position: relative; /* Ensure it respects the z-index */

}

.message h1 {
    font-size: 3em;
    margin: 0;
    text-shadow: 0 0 15px red, 0 0 25px green;
    animation: festiveGlow 2s infinite alternate;
}

.message p {
    font-size: 1.5em;
    margin: 20px 0;
}

/* Village Scene */
.village {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 20px;
}
.house {
    position: absolute; /* For precise placement */
    width: 150px;
    height: 150px;
    z-index: 2; /* Above canvas, below trees */
    background: peachpuff; /* Debugging visibility */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5); /* Add some depth */
}

.roof {
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 50px solid crimson;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3; /* Ensure roof is above walls */
}

.walls {
    width: 150px;
    height: 100px;
    background: peachpuff;
    position: absolute;
    bottom: 0;
    left: 0;
    border: 2px solid #8b4513;
}

.window {
    width: 40px;
    height: 40px;
    background: lightyellow;
    position: absolute;
    top: 30px;
    left: 55px;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
    border: 2px solid #ffd700;
}

.chimney {
    width: 20px;
    height: 50px;
    background: sienna;
    position: absolute;
    top: -40px;
    left: 20px;
    z-index: 4; /* Above walls and roof */
}

.smoke {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    position: absolute;
    top: -20px;
    left: 0;
    animation: smokeUp 3s infinite;
}

@keyframes smokeUp {
    0% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 0.5; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}

#puss-in-boots {
    position: relative;
    top: 400px;
    left: 5px;
    width: 30%; /* Adjust size as needed */
    height: auto;
    opacity: 0.9; /* Set opacity to 80% */
    z-index: 7;
}

.tree {
    width: 100px;
    height: 150px;
    background: linear-gradient(to bottom, green, darkgreen);
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
    position: absolute; /* For random placement */
    margin: 0;
}
.tree.decorated::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 15px,
        gold 15px,
        gold 17px
    );
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.tree::after {
    content: '';
    width: 20px;
    height: 40px;
    background: brown;
    position: absolute;
    bottom: -40px;
    left: 40px;
}

.decorated::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 15px,
        gold 15px,
        gold 17px
    );
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Animations */
@keyframes festiveGlow {
    0%, 100% { text-shadow: 0 0 15px red, 0 0 25px green, 0 0 35px gold; }
    50% { text-shadow: 0 0 25px gold, 0 0 35px red, 0 0 45px green; }
}

.video-container {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

#video-button {
    font-size: 1.5em;
    font-family:"Rubik Moonrocks";
    background: linear-gradient(45deg, #ff0000, #ff6600);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
}

#video-button:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    font-family:"Rubik Moonrocks";
}

#video-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    display: none; /* Hidden by default */
    z-index: 3; /* Ensure it appears above everything */
}

#video-popup iframe {
    width: 560px;
    height: 315px;
}

#close-video {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}


/* Add these to your existing style.css */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 1;
    transition: opacity 1s ease;
}

.background-a {
    background-image: url('./assets/background.jpg');
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

#change-background-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #ff0000, #ff6600);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: "Rubik Moonrocks", cursive;
    transition: transform 0.3s ease;
}

#change-background-btn:hover {
    transform: scale(1.1);
}
