* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-x: hidden;
}

body {
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 80%, #7EC850 80%, #7EC850 100%);
    position: relative;
}

.title {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Barrio', system-ui;
    font-size: 5rem;
    color: #ffffff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 1;
    margin: 0;
    white-space: nowrap;
}

.title a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

#sun {
    position: absolute;
    top: 5%;
    right: 8%;
    width: 180px;
    z-index: 5;
}

#sun img {
    width: 100%;
    height: auto;
    display: block;
}

.cloud {
    position: absolute;
    z-index: 2;
    opacity: 0.9;
    animation: cloud-drift linear infinite;
}

.cloud img {
    width: 100%;
    height: auto;
    display: block;
}

/* Cloud animations - slow movement left to right */
@keyframes cloud-drift {
    from {
        left: -400px;
    }
    to {
        left: calc(100vw + 400px);
    }
}

#jazz-player {
    position: absolute;
    bottom: 5%;
    right: 5%;
    height: 30vh;
    cursor: pointer;
    z-index: 20;
    transform-origin: bottom center;
}

#jazz-player img {
    height: 100%;
    width: auto;
    display: block;
}

#cow-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cow {
    position: absolute;
    bottom: 5%;
    height: 30vh;
    transform-origin: bottom center;
    transition: left 15s linear, transform 0.5s ease, opacity 2s ease;
    z-index: 20;
}

.cow img {
    height: 100%;
    width: auto;
    display: block;
}

#grass-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

#grass-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}

/* Cow dancing animation - rotate left and right */
@keyframes cow-dance {
    0%, 100% {
        rotate: -2deg;
    }
    50% {
        rotate: 2deg;
    }
}

.cow.dancing {
    animation: cow-dance 1s ease-in-out infinite;
}

/* Jazz player tilting animation */
@keyframes jazz-tilt {
    0%, 100% {
        transform: scaleX(-1) rotate(-3deg);
    }
    50% {
        transform: scaleX(-1) rotate(3deg);
    }
}

#jazz-player {
    transform: scaleX(-1);
}

#jazz-player.playing {
    animation: jazz-tilt 1.2s ease-in-out infinite;
}

/* Cow leaving animation */
.cow.leaving {
    transition: left 5s linear, transform 0.5s ease;
}

/* Cow fading away */
.cow.fading {
    opacity: 0;
}

@media (max-width: 768px) {
    .title {
        font-size: calc(5vw + 1rem);
        top: 15px;
        white-space: nowrap;
    }
    
    #sun {
        width: 100px;
        top: 20px;
        right: 20px;
    }
    
    #jazz-player {
        height: 13vh;
        bottom: 12vh;
        right: 2%;
    }
    
    .cow {
        height: 13vh;
        bottom: 12vh;
    }
    
    #grass-overlay {
        height: 12vh;
    }
    
    #grass-overlay img {
        object-fit: cover;
    }
}

