body {
    margin: 0;
    font-family: Arial, sans-serif;
    /* The background is now set by script.js */
    color: #fff;
    transition: background 0.5s ease; /* Smooth transition for background changes */
}

header {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent overlay */
}

header h1 {
    margin: 0;
}

.search-bar {
    margin-top: 10px;
}

.search-bar input {
    padding: 8px;
    border-radius: 5px;
    border: none;
    width: 200px;
}

.search-bar button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    margin-left: 5px;
    cursor: pointer;
    background-color: orange;
    color: #fff;
    font-weight: bold;
}

main {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px;
}

.card {
    background-color: rgba(0, 0, 0, 0.25); /* Semi-transparent overlay for cards */
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    flex: 1 1 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.card h3 {
    margin-top: 0;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2); /* Matching semi-transparent overlay */
}

/* --- Weather Effects --- */
#weather-effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicks to go through to the content below */
    z-index: 999; /* Ensures effects are on top */
    overflow: hidden;
}

.sun {
    position: absolute;
    top: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 223, 109, 0.5) 0%, rgba(255, 223, 109, 0) 60%);
}

.rain-drop {
    position: absolute;
    bottom: 100%;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4));
    animation: fall 0.7s linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

.lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation-name: flash;
    animation-duration: 4s; /* Default duration, can be overridden by JS */
    animation-iteration-count: infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0; }
    2%, 8% { opacity: 1; }
    4%, 6% { opacity: 0; }
    5% { opacity: 0.5; }
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    animation-name: move-clouds;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

.cloud::before {
    width: 120px; height: 120px;
    top: -60px; left: 50px;
}

.cloud::after {
    width: 150px; height: 150px;
    top: -90px; right: 40px;
}

@keyframes move-clouds {
    from { transform: translateX(-250px); } /* Start off-screen left */
    to { transform: translateX(100vw); }   /* End off-screen right */
}
