body {
    font-family: Arial, sans-serif;
    background: #292929;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #FFFFFF;
}

.non-selectable {
    scrollbar-width: none; /* Firefox */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

.weather_result_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #444;
    padding: 20px;
}

.weather-container {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 95%;
    width: 1100px;
    margin: 100px 10px 10px;

}

.weather-container h1 {
    margin: 0;
    font-size: 24px;
}

.weather-container p {
    margin: 5px 0;
}

.weather-icon {
    width: 100px;
    height: 100px;
}

.temp {
    font-size: 48px;
    font-weight: bold;
}

.forecast {
    margin-top: 40px;
}

.forecast-carousel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 -4px;
}

.forecast-carousel.has-overflow::before,
.forecast-carousel.has-overflow::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    width: 36px;
    z-index: 1;
    pointer-events: none;
    border-radius: 8px;
}

.forecast-carousel.has-overflow::before {
    left: 40px;
    background: linear-gradient(to right, #333 30%, transparent);
}

.forecast-carousel.has-overflow::after {
    right: 40px;
    background: linear-gradient(to left, #333 30%, transparent);
}

.carousel-btn {
    flex: 0 0 40px;
    align-self: center;
    z-index: 2;
    height: 44px;
    margin: 0 2px;
    border: 1px solid rgba(197, 253, 57, 0.45);
    border-radius: 10px;
    background: rgba(68, 68, 68, 0.95);
    color: #c5fd39;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.carousel-btn:hover:not(:disabled) {
    background: rgba(197, 253, 57, 0.2);
    border-color: #c5fd39;
}

.carousel-btn:focus-visible {
    outline: 2px solid #c5fd39;
    outline-offset: 2px;
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.forecast-carousel:not(.has-overflow) .carousel-btn {
    display: none;
}

.horizontal-forecast {
    flex: 1;
    min-width: 0;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 4px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 253, 57, 0.5) rgba(255, 255, 255, 0.06);
}

.horizontal-forecast:focus-visible {
    outline: 2px solid #c5fd39;
    outline-offset: 2px;
}

.horizontal-forecast::-webkit-scrollbar {
    height: 6px;
}

.horizontal-forecast::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

.horizontal-forecast::-webkit-scrollbar-thumb {
    background: rgba(197, 253, 57, 0.45);
    border-radius: 3px;
}

.horizontal-forecast::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 253, 57, 0.65);
}

.forecast-day, .forecast-hour {
    min-width: 250px; /* Increased width */
    background: #444;
    padding: 20px; /* Increased padding */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column; /* Added for vertical alignment */
    justify-content: center; /* Centering content vertically */
    align-items: center; /* Centering content horizontally */
    text-align: center; /* Centering text */
    cursor: grab; /* Add cursor style for draggable elements */
    scroll-snap-align: center;
    scroll-snap-stop: normal;
}

.forecast-day:active, .forecast-hour:active {
    cursor: grabbing; /* Change cursor when active */
}

.forecast-day img, .forecast-hour img {
    width: 50px; /* Increased size */
    height: 50px; /* Increased size */
}

.weather_buttons_container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.search_container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.city_input {
    width: 50%;
    padding: 10px;
    margin: 0;
    border: 1px solid #666;
    border-radius: 4px;
    background: #444;
    color: #FFFFFF;
    font-size: 16px;
}

.city_submit_input {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #c5fd39;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    min-width: fit-content;

}

/*Darker animate*/
.city_submit_input:hover {
    background: #a3e62b;
    transition: 0.3s;
}

/*------------------------*/

.switch_container {
    width: fit-content;
    display: flex;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 170px;
    height: 40px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-transition: .4s;
    transition: .4s;
    border: 1px rgb(197, 253, 57) solid;
    border-radius: 30px;

}

input:checked + .slider {
    background-color: rgb(197, 253, 57);
}

.slider:before {
    position: absolute;
    content: "";
    top: 2px;
    right: initial;
    bottom: 2px;
    left: 2px;
    width: 72px;
    background-color: rgb(197, 253, 57);
    -webkit-transition: .4s;
    border-radius: 30px;
}

input:checked + .slider:before {
    background-color: rgba(42, 42, 42, 0.25);
    backdrop-filter: blur(5px);
    transform: translateX(72px);
    width: 93px;
}

#p__celsius, #p__farhenheit {
    font-size: 16px;
    position: absolute;
    top: 10px;
    margin: 0;
    cursor: pointer;
}

#p__celsius {
    left: 12px;
    color: #000;
}

#p__farhenheit {
    right: 12px;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .horizontal-forecast {
        scroll-behavior: auto;
    }

    .carousel-btn {
        transition: none;
    }
}

@media (max-width: 600px) {
    .forecast-carousel {
        margin: 0 -2px;
    }

    .forecast-carousel.has-overflow::before,
    .forecast-carousel.has-overflow::after {
        width: 24px;
    }

    .forecast-carousel.has-overflow::before {
        left: 36px;
    }

    .forecast-carousel.has-overflow::after {
        right: 36px;
    }

    .carousel-btn {
        flex-basis: 34px;
        height: 40px;
        font-size: 22px;
    }

    .weather-container {
        width: 100%;
        padding: 10px;
    }

    .weather-icon {
        width: 80px;
        height: 80px;
    }

    .temp {
        font-size: 36px;
    }

    .forecast-day, .forecast-hour {
        min-width: 200px; /* Adjusted width for smaller screens */
    }

    .forecast-day img, .forecast-hour img {
        width: 40px; /* Adjusted size for smaller screens */
        height: 40px; /* Adjusted size for smaller screens */
    }

    .search_container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}