/* Load a pixelated font (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* General Styles */
html, body {
    height: 100%;
    font-family: 'Press Start 2P', cursive, sans-serif;
    background: linear-gradient(135deg, #FFEFBA, #FFFFFF);
    color: #4E342E;
    margin: 0;
    padding: 20px;
    background-color: #f4e1b1;
    text-align: center;
}

h1, h2 {
    color: #6D4C41;
}

a {
    text-decoration: none;
    color: #4E342E;
}

/* Buttons */
button {
    font-family: 'Press Start 2P', cursive;
    padding: 10px 20px;
    margin: 10px auto;
    background-color: #D2691E;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: block;
}

button:hover {
    background-color: #A0522D;
}

/* Location Boxes on Main Page */
.location-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 30px auto;
}

.location-grid a {
    display: block;
    background-color: #fff3e0;
    border: 4px ridge #bc6c25;
    border-radius: 10px;
    padding: 25px 10px;
    text-align: center;
    box-shadow: 4px 4px 0 #bc6c25;
    transition: transform 0.2s ease-in-out;
}

.location-grid a:hover {
    transform: scale(1.05);
}

/* Form and Input Styling */
form {
    max-width: 690px;
    margin: 0 auto;
    background-color: #ffe5b4;
    padding: 20px;
    border-radius: 8px;
    border: 4px double #8B4513;
    box-shadow: 4px 4px 0 #8B4513;
    text-align: center;
}

input, select {
    width: calc(35% - 20px);
    padding: 10px;
    margin: 10px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Result Boxes */
ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}

ul li {
    flex: 1;
    justify-content: center;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    background-color: #fff8dc;
    box-shadow: 3px 3px 0 #A1887F;
    border-radius: 6px;
}

/* Colored Borders for Prediction Results */
ul li:nth-child(1) {
    border: 4px solid #FFD700;
}

ul li:nth-child(2) {
    border: 4px solid #FF4500;
}

ul li:nth-child(3) {
    border: 4px solid #A9A9A9;
}

.falling-leaf {
    position: fixed;
    top: -50px;
    font-size: 24px;
    animation: fall linear infinite;
    opacity: 0.8;
    z-index: 0;
}

/* Keyframes with horizontal wobble */
@keyframes fall {
    0% {
        transform: translateX(0) rotate(0deg);
        top: -50px;
    }
    25% {
        transform: translateX(-50px) rotate(90deg);
    }
    50% {
        transform: translateX(0px) rotate(180deg);
    }
    75% {
        transform: translateX(50px) rotate(270deg);
    }
    100% {
        transform: translateX(0px) rotate(360deg);
        top: 100vh;
    }
}

/* Slight variation for randomness */
.falling-leaf:nth-child(1) { left: 10%; animation-duration: 6s; }
.falling-leaf:nth-child(2) { left: 30%; animation-duration: 8s; }
.falling-leaf:nth-child(3) { left: 50%; animation-duration: 7s; }
.falling-leaf:nth-child(4) { left: 70%; animation-duration: 9s; }
.falling-leaf:nth-child(5) { left: 90%; animation-duration: 5s; }

.fall-title {
    font-size: 28px;
    animation: wave 2s infinite ease-in-out;
    display: inline-block;
    color: #D2691E;
    text-shadow: 2px 2px #fff3e0;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(2deg); }
    50% { transform: rotate(-2deg); }
    75% { transform: rotate(1deg); }
}