@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');


* {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


:root {
    --font-thin: 100;
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;
}


body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}


#container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;

    padding: 20px;
    border-radius: 10px;

    background-color: rgba(235, 235, 235, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);

    transition: 0.3s ease;
    animation: fadeIn 0.5s ease;
}


#search {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 20px;
    border-radius: 10px;

    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);

    transition: 0.25s ease;
}

#search:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.25);
}

#search input {
    width: 100%;
    padding: 10px;

    border: none;
    border-radius: 5px;

    font-size: 16px;
    color: white;

    background-color: transparent;
}

#search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search input:focus-visible {
    outline: none;
}

#search button {
    padding: 10px 20px;

    border: none;
    border-radius: 5px;

    background-color: transparent;
    color: white;

    font-size: 16px;
    cursor: pointer;

    transition: all 0.25s ease;
}

#search button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

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


#weather {
    display: none;
    margin-top: 10px;
    color: white;
}

#weather.show {
    display: block;
}

#weather #title {
    text-align: center;
    margin: 10px 0px;

    font-size: 30px;
    font-weight: var(--font-semibold);
}

#infos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#temp {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 20px;
    border-radius: 12px;

    background: linear-gradient(135deg, #5f7cff, #6a5acd);
    color: white;
}

#temp img {
    width: 100px;
}

#temp_value {
    font-size: 55px;
    font-weight: var(--font-bold);
}

#description {
    font-size: 14px;
    opacity: 0.9;
}


#other_infos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.2);

    backdrop-filter: blur(5px);
}

.info i {
    font-size: 18px;
}

.info h2 {
    font-size: 12px;
    font-weight: var(--font-medium);
    opacity: 0.8;
}

.info p {
    font-size: 14px;
    font-weight: var(--font-semibold);
    opacity: 0.85;
}

#temp_max_icon {
    color: #7f1d1d;
}

#temp_min_icon {
    color: #1e40af;
}

#wind_icon {
    color: #5d2899;
}

#humidity_icon {
    color: #0a628b;
}


#alert {
    display: none;
}


#alert:not(:empty) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    
    margin-top: 20px;
    padding: 20px;
    width: 100%; 
    
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    color: white;
}


#alert img {
    width: 100%;        
    max-width: 150px;   
    height: auto;       
    margin-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}