body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
    padding: 20px;
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.splash-screen.hidden {
    display: none;
}

.splash-content {
    text-align: center;
}

.splash-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.dark-mode {
    background-color: #333;
    color: #fff;
}

body.sunny-theme {
    background-color: #ffeb3b;
    color: #333;
}

body.rainy-theme {
    background-color: #007bff;
    color: #fff;
}

body.snowy-theme {
    background-color: #e0f7fa;
    color: #333;
}

#theme-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

#theme-switcher:hover {
    background-color: #555;
    transform: scale(1.05);
}

#weather-container {
    margin-top: 20px;
}

#weather-info {
    margin-top: 20px;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#weather-info.visible {
    opacity: 1;
    transform: translateY(0);
}

#forecast-container {
    margin-top: 20px;
    display: none;
}

#forecast-container.visible {
    display: block;
}

#forecast {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.forecast-day {
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 5px;
    margin: 10px;
    transition: transform 0.3s;
}

body.dark-mode .forecast-day {
    background-color: #444;
    color: #fff;
}

body.sunny-theme .forecast-day {
    background-color: #fff59d;
    color: #333;
}

body.rainy-theme .forecast-day {
    background-color: #bbdefb;
    color: #333;
}

body.snowy-theme .forecast-day {
    background-color: #e0f2f1;
    color: #333;
}

.forecast-day:hover {
    transform: scale(1.05);
}

#loading-spinner, #loading-suggestions-spinner {
    display: none;
    margin: 10px auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

input, button {
    padding: 10px;
    margin: 5px;
    border: 2px solid #333;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

button {
    background-color: #333;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background-color: #555;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

#weather-icon {
    width: 100px;
    height: 100px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

#error-message {
    color: red;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#error-message.visible {
    opacity: 1;
}

.tooltip {
    display: inline-block;
    position: relative;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    border-bottom: 1px dotted #333;
}

.tooltip:hover::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 0.8em;
    z-index: 10;
}

body.dark-mode .tooltip:hover::after {
    background-color: #fff;
    color: #333;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup.hidden {
    display: none;
}

#popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    text-align: center;
}

#popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2em;
    color: #333;
}

.temperature {
    display: inline-block;
    margin: 0 5px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive styles */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #weather-container, #forecast-container {
        margin-top: 10px;
    }

    .forecast-day {
        width: 100%;
        margin: 5px 0;
    }

    #weather-info, #forecast-container, #popup-content {
        padding: 10px;
    }
}

#confirmation-container {
    display: none;
    margin-top: 20px;
}

#confirmation-container.visible {
    display: block;
}

#geolocation-permission {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#geolocation-permission.hidden {
    display: none;
}

#geolocation-allow, #geolocation-deny {
    margin: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#geolocation-allow {
    background-color: #28a745;
    color: #fff;
}

#geolocation-allow:hover {
    background-color: #218838;
}

#geolocation-deny {
    background-color: #dc3545;
    color: #fff;
}

#geolocation-deny:hover {
    background-color: #c82333;
}
