/* GLOBAL STYLES */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle, #63786f 0%, #24302c 100%);
    position: relative;
}

.main-container {
    display: flex;
    flex-direction: row;
}

/* RIGHT CONTAINER */
.right-container {
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgb(38, 49, 50);
    border-radius: 0 40px 40px 0;
    min-width: 450px;
    min-height: 500px;
    animation: fadeInRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.15s;
    opacity: 0;
    padding: 30px;
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 200px rgba(0, 0, 0, 0.3);
    height: 100%;
}

.location-box {
    margin-top: 10px;
}

.weather-box,
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-group {
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.search-bar {
    display: flex;
    gap: 5px;
    width: 100%;
    justify-content: center;
}

#getWeatherBtn {
    border: none;
    padding: 13px 20px;
    background: #ffffff;
    color: black;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    box-shadow: inset 0 -10px 10px rgba(0, 0, 0, 0);
    font-weight: bold;
}

#getWeatherBtn:hover {
    box-shadow: inset 0 -10px 10px rgba(0, 0, 0, 0.2);
}

#cityInput, #getWeatherBtn {
    border-radius: 10px;
}

#cityInput {
    padding: 12px 20px;
    border: 1px solid #ffffff;
    background: none;
    transition: border 0.3s ease;
    box-shadow: 0 0 5px rgba(238, 238, 238, 0);
    color: white;
    user-select: text;
}

#cityInput::placeholder {
    color: #8c8c8c;
}

#cityInput[type="text"] {
    border: 2px solid #8c8c8c;
    border-radius: 10px;
    outline: none;
}

#cityInput[type="text"]:focus {
    border: 2px solid #ffffff;
}

.weather-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.weather-elements {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.weather-elements > span:first-child {
    color: #959595;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-elements span[id] {
    padding-left: 40px;
    color: #ffffff;
    font-weight: bold;
}

.input-group h2 {
    color: #ccc;
    text-align: center;
}

.input-group h2:after {
    content: "";
    animation: blink 1s infinite steps(1);
    transition: none;
}

#weatherResult {
    font-size: 15px;
    letter-spacing: 1px;
}

#weatherResult.loading::after {
    content: "";
    display: inline-block;
    width: 15px;
    text-align: left;
    animation: dots 1s infinite steps(4);
}

.jump-animation {
    animation: bounce 0.3s ease;
}

/* LEFT CONTAINER */
.left-container {
    display: flex;
    padding-left: 50px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-around;
    background-size: cover;
    background-position: center;
    border-radius: 40px 0 0 40px;
    min-width: 450px;
    min-height: 500px;
    animation: fadeInLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
}

.data-container {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    padding: 20px 40px;
    min-width: 250px;
    max-width: 350px;
    min-height: 150px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#day-of-week {
    font-size: 35px;
    letter-spacing: 1px;
}

.weather-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: white;
}

#weather-icon {
    font-size: 50px;
}

#temperature {
    font-size: 50px;
    font-weight: bold;
}

#weather-text {
    letter-spacing: 1px;
    font-size: 20px;
    text-transform: uppercase;
}

/* KEYFRAMES */
@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-5%);
    }
    to {
        opacity: 1;
        transform: translateX(0%);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(5%);
    }
    to {
        opacity: 1;
        transform: translateX(0%);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        content: "│";
        color: white;
    }
    50% {
        opacity: 0;
    }
}

/* MEDIA QUERIES */
@media (max-width: 768px) {

    @media (max-width: 768px) and (pointer: coarse) {
        html, body {
            overflow-y: hidden !important;
            height: 100%;
        }
    }

    @media (max-width: 768px) and (pointer: fine) {
        html, body {
            overflow-y: auto !important;
        }
    }

/* GENERAL MOBILE STYLES */
    body {
        align-items: flex-start !important;
        padding-top: 40px;
    }

    .main-container {
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px;
    }

    .right-container, .left-container {
        max-width: 360px;
        width: 100%;
        height: auto;
        max-height: none;
        min-width: 0;
        min-height: auto;
    }

    .left-container {
        align-items: center;
        border-radius: 30px 30px 0 0;
        padding: 20px 20px 10px 20px;
    }

    .right-container {
        border-radius: 0 0 30px 30px;
    }

    .weather-status {
        padding: 20px 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .weather-left-block {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }

    #weather-icon {
        font-size: 42px;
    }

    #temperature {
        font-size: 36px;
    }

    #weather-text {
        font-size: 22px;
        font-weight: bold;
    }

    .data-container {
        text-align: center;
        border: none;
        border-bottom: 1px solid rgba(140, 140, 140, 0.5);
        padding: 20px;
    }

    .weather-elements {
        font-size: 1.1rem;
    }

    .input-group {
        margin-top: 30px;
    }
}