@import "variable.css";
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

* {padding: 0;margin: 0; box-sizing: border-box;font-size: 1.125rem;font-family: "JetBrains Mono", monospace;}
body {
    color: var(--foreground);
    background-image: url('./img/planet.jpg');
    background-size: cover;
    background-repeat: no-repeat;

    height: 100vh;
}
h1 {
    font-size: 1.7rem;
    max-height: 250px;
    overflow-y: scroll;

    overflow-wrap: break-word;
    word-break: break-word;
}

a{text-decoration: none;color: var(--foreground);}

header {
    background-color: var(--color-primary);
    opacity: .5;
    display: inline-block;
    padding: 1vw;
    margin: 1vw;
    border-radius: 10px;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;


    .search {

        margin-bottom: 50px;
        margin-top: 50px;
        input {
            width: clamp(200px, 5vw, 800px);
            height: clamp(50px, 1vw, 200px);

            border-radius: 20px;
            background-color: var(--color-primary);
            opacity: .7;
            color: #fff;

            border: none;
            outline: none;  
            box-shadow: none;
            -webkit-appearance: none;
            appearance: none;

            padding: 10px;


            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        input:focus {
            transform: scale(1.02);
            background-color: rgba(0, 0, 0, 0.5); 
            box-shadow: 
                0 0 0 2px rgba(255, 255, 255, 0.2),
                0 15px 35px rgba(0, 0, 0, 0.4);
            input::placeholder {
                color: rgba(255, 255, 255, 0.5);
                transition: color 0.3s ease;
            }
            input:focus::placeholder {
                color: rgba(255, 255, 255, 0.8);
            }
        }  
        
        button {
            width: clamp(80px, 1vw, 800px);
            height: clamp(50px, 1vw, 200px);

            border-radius: 20px;
            background-color: var(--color-primary);
            opacity: .7;
            color: var(--foreground);

            border: none;
            outline: none;  
            box-shadow: none;
            -webkit-appearance: none;
            appearance: none;
        }
    }
    
    
    .weather {
        background-color: var(--color-primary);
        opacity: .7;
        display: inline-flex;
        gap: 1vw;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: clamp(300px, 5vw, 800px);
        min-height: clamp(200px, 5vw, 1000px);
        padding: 1vw;
        border-radius: 20px;


        #cords {
            font-size: 0.75rem;
        }
        .loading-circle {
            min-width: 8rem;
            min-height: 8rem;
            border-radius: 50%;
            border: .5rem dashed var(--color-loading);
            animation-name: spin;
            animation-duration: 2s;
            animation-iteration-count: infinite;
            animation-timing-function: linear;
            flex-shrink: 0;
        }
    }
    
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}