html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('bg2.jpg') center center / cover no-repeat;
    cursor: url("cursor.png"), auto;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
}



@keyframes bounce {

    0%,
    100% {
        transform: translate(-50%, 0%)
    }

    50% {
        transform: translate(-50%, -20px)
    }
}

@keyframes sway {

    0%,
    100% {
        transform: translate(-50%, 0%);
    }

    50% {
        transform: translate(-40%, 0%);
    }
}

.emerging-image {
    position: absolute;
    bottom: -2%;
    /* Lowered slightly to avoid bottom cutoff during rotation */
    width: 45%;
    left: -100%;
    /* Starts completely hidden off-screen */
    z-index: 5;
}

.animated {
    position: absolute;
    top: 1%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Charm', cursive;
    margin: 0;
    padding: 0;
    font-size: 6rem;
    background: url('stripes.jpg') no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: moveBg 90s linear infinite;
    -webkit-animation: moveBg 90s linear infinite;
    -webkit-text-stroke: 1px black;
}

/* Text Background Animation */
@keyframes moveBg {
    0% {
        background-position: 0% 30%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.icon-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    /* Space between icons */
}

.icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.icon:hover {
    transform: scale(1.2);
    /* Slightly enlarge on hover */
}

.ca {
    position: absolute;
    top: 32%;
    /* Place the link below the poem */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin-top: 0;
    font-size: 1.5rem;
}


/* Decorative line below the link */
.ca::before,
.ca::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 2px;
    background: linear-gradient(to right, #ff0000, #00ff00, #ff0000);
}

.ca::before {
    left: -40%;
}

.ca::after {
    right: -40%;
}

/* Christmas-themed link */
.christmas-link {
    color: #006400;
    /* Deep green */
    text-decoration: none;
    font-weight: bold;
    padding: 0 15px;
    position: relative;
}

.christmas-link:hover {
    color: #ff0000;
    /* Red on hover */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    /* Soft glow */
}

.christmas-link::after {
    content: "🎄";
    position: absolute;
    right: -20px;
    animation: wiggle 1s ease-in-out infinite;
}

/* Wiggling animation for the tree */
@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.poem {
    position: absolute;
    top: 18%;
    /* Place the poem below the h1 */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: 'Charm', cursive;
    /* Matches the h1 font */
    font-size: 1.2rem;
    color: #006400;
    /* Deep green */
    margin: 0;
    line-height: 1.5;
    /* Improve readability */
    animation: fadeIn 2s ease-in-out;
    /* Subtle fade-in effect */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animated {
        font-size: 4.5rem;
        /* Smaller for mobile */
        margin-top: 20px;
    }

    .poem {
        font-size: 1.4rem;
        line-height: 1.4;
        margin: 10px 0;
    }

    .ca {
        font-size: 1rem;
    }


    .emerging-image {
        width: 60%;
        /* Adjust image size for mobile */
        bottom: -10px;
    }

    .icon-container {
        gap: 10px;
        bottom: 10px;
    }

    .icon {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {

    body {
        background-position: calc(50% - 80px) center; /* Shift 40px to the left for very small screens */
    }


    .animated {
        position: relative; /* Change to relative for automatic flow */
        top: 0;
        left: 0;
        transform: none; /* Remove fixed transform */
        margin: 10px auto; /* Center using margins */
        text-align: center; /* Ensure text alignment */
        width:100%;
        font-size: 3rem;

        /* Even smaller font for very small screens */
    }

    .poem {
        font-weight: 500;
        top:10%;
        width: 70%;
        font-size: 1rem;
        /* Reduce poem text size */
        line-height: 1.5;
    }

    .ca {
        top:34%;
        font-size: 1.1rem;
    }

    .emerging-image {
        width: 100%;
        /* Adjust image width further */
    }

    .icon-container {
        gap: 8px;
        bottom: 5px;
    }

    .icon {
        width: 35px;
        height: 35px;
    }
}