@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
    font-family: "Google Sans Code", monospace;
    color: #ffffff;
}

body {
    font-weight: normal;
    font-size: 24px;
    background-color: #0f172b;
    overflow: hidden;
}

.background {
    width: 100vw;
    height: 100vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flow-root;

    position: fixed;
    top: 0;
    left: 0;

    filter: blur(20px);
    opacity: 0;
    transition: opacity 2s ease-in-out, filter 2.5s ease-in-out;
}

.background.loaded {
    filter: blur(0px);
    opacity: 1;
}

.background.preloaded {
    transition: opacity ease-in-out, filter 0.4s ease-in-out;
    filter: blur(0px);
    opacity: 1;
}

.grid {
    display: grid;
    position: absolute;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    z-index: 1;

    background-color: #4e5b6384;
    backdrop-filter: blur(5px);
    
    grid-gap: 8px;

    grid-template-columns: 3fr 1fr 5fr 1fr 3fr;
    grid-template-rows: 
    auto 
    auto
    1fr
    auto;
    grid-template-areas: 
    ". . T . ."
    ". Q Q Q ."
    ". B B B ."
    "F F F F F";
}

.time-weather-container {
    grid-area: T;

    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

.time {
    font-weight: 500;
    font-size: 6em;
}

.weather {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0px;
    text-align: center;
    align-items: center;
    font-size: 2em;
    justify-content: center;
    margin-top: -0.5em;

    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.weather.show {
    opacity: 1;
}

.temperature {
    margin-left: 0.25em;
    display: flex;
    flex-direction: row;
    gap: 0.25em;
}

.high-low {
    font-size: 0.5em;
    display: flex;
    flex-direction: column;
}

.high-low-divider {
    border: 1px solid #ffffff;
    transform: scaleY(1.75);
}

.footer {
    grid-area: F;
    background-color: #0f172b88;

    width: 100%;
    padding: 12px 0px;

    display: flex; 
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}

.footer-stats {
    font-size: 1.5em;
    display: flex; 
    flex-direction: row;
    align-items: start;
    justify-content: space-around;
    gap: 15px;
}

.footer-data {
    gap: 8px;

    margin-left: -15px;

    opacity: 0;
    max-width: 0px;
    height: 0px;

    display: flex;
    flex-direction: row;
    align-items: center;

    transition: opacity 0.5s ease-in-out, max-width 0.5s linear 0.5s, height 0s linear 0.5s;
}

.footer-data.show {
    transition: opacity 0.5s ease-in-out 3.5s, max-width 0.5s linear 3s, height 0.5s linear 3s;
    opacity: 1;
    max-width: 400px;
    height: 36px;
}

.footer-data.preshow {
    transition: none;
    opacity: 1;
    max-width: 400px;
    height: 36px;
}

.username {
    overflow: hidden;

    opacity: 0;
    max-width: 0px;
    height: 0px;

    display: flex;
    flex-direction: row;
    align-items: center;
    transition: opacity 0.5s ease-in-out, max-width 0.5s linear 0.5s, height 0s linear 0.5s;
}

.username.show {
    transition: opacity 0.5s ease-in-out 3.5s, max-width 0.5s linear 3s, height 0s linear 3s;
    opacity: 1;
    max-width: 400px;
    height: 36px;
}

.username.preshow {
    transition: none;
    opacity: 1;
    max-width: 400px;
    height: 36px;
}

.username-input {
    height: 32px;
    margin: 2px 0px;
    padding: 0px 5px;
    border-radius: 10px;
    outline: none;
    border: 2px solid #0f172b;
    background-color: #0f172b;
    transition: border 0.2s ease-in-out;
}

.username-input:focus {
    border: 2px solid #196c2e;
}

.username-button {
    height: 24px;
    width: 24px;
    margin: 8px 4px;
    border-radius: 50%;
    outline: none;
    border: none;
    background-color: #2ea043;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    font-size: 16px;
    text-align: center;
}

.username-button:focus {
    background-color: #56d364;
}

.logo-link {
    width: 36px;
    height: 36px;
}

.logo {
    width: 36px;
    color: #ffffff;
}

.last-commits {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    width: 136px;
}

.commit-box {
    width: 16px;
    height: 16px;
    
    border-radius: 4px;
    background-color: #151b23;
    position: relative;
}

.level-1 {
    background-color: #033a16;
}

.level-2 {
    background-color: #196c2e;
}

.level-3 {
    background-color: #2ea043;
}

.level-4 {
    background-color: #56d364;
}

.chess-data {
    font-size: 24px;
    align-items: center;
}

.chess-win-draw-loss-record {
    position: relative;

    width: 200px;
    height: 14px;

    padding: 3px;
    border-radius: 50px;

    display: flex;
    flex-direction: row;
    gap: 3px;

    background-color: #0f172b;
}

.win {
    background-color: #56d364;
    border-radius: 9px 0px 0px 9px;
    transition: filter 0.4s ease-in-out;
    position: relative;
}

.draw {
    background-color: #b1b1b1;
    transition: filter 0.4s ease-in-out;
    position: relative;
}

.loss {
    background-color: #d35656;
    border-radius: 0px 9px 9px 0px;
    transition: filter 0.4s ease-in-out;
    position: relative;
}

.win:hover, .draw:hover, .loss:hover {
    filter: brightness(1.2);
}

.commit-box::after, .win::after, .draw::after, .loss::after {
    z-index: 10;
    
    content: attr(data-tooltip);

    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);

    background-color: #0f172ba0;
    backdrop-filter: blur(10px);
    
    border-radius: 2px;

    font-size: 12px;
    padding: 4px 6px;

    white-space: nowrap;

    pointer-events: none;

    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.commit-box:hover::after, .win:hover::after, .draw:hover::after, .loss:hover::after {
    opacity: 1;
}

.search {
    grid-area: B;
    width: 100%;
    height: 100%;
    margin-top: 10%;
}

#searchForm {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 3px;
    height: 45px;
}

#searchBar {
    flex: 1;
    padding: 0px 16px;
    font-size: 18px;
    border-radius: 50px 0px 0px 50px;
    outline: none;
    border: none;
    background-color: #0f172b88;
    color: #ffffff;

    backdrop-filter: blur(10px);

    transition: background-color 0.3s ease-in-out;
}

#submitButton {
    border-radius: 0px 50px 50px 0px;
    padding: 0px 16px;
    display: grid;
    place-items: center;
    outline: none;
    border: none;
    background-color: #0f172b88;
    cursor: pointer;

    backdrop-filter: blur(10px);

    transition: background-color 0.3s ease-in-out;
}

#searchBar:focus, #submitButton:hover, #submitButton:focus {
    background-color: #0f172b44;
}

.quote {
    grid-area: Q;
    display: grid;
    place-items: center;
    overflow: hidden;
    max-height: 0px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out 0.5s, max-height 1s ease-in-out;
    text-align: center;
}

.quote.show {
    opacity: 1;
    max-height: 500px;
}

.quote.preshow {
    transition: none;
    opacity: 1;
    max-height: 500px;
}

.reset-button, .edit-username-button {
    position: absolute;
    z-index: 20;
    bottom: 14px;
    font-size: 12px;
    background-color: transparent;
    border: none;
    outline: none;
    color: #717785;
    cursor: pointer;
    right: 1vw;
    transition: color 0.3s ease-in-out;
}

.edit-username-button {
    bottom: 30px;
}

.reset-button:hover, .edit-username-button:hover {
    color: #a4acbd;
}