@import url("https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* variables */
:root {
    --border: 4px black solid;
    --shadow: rgba(0, 0, 0, 0.2) 0px 20px 30px;
    --active-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

* {
    box-sizing: border-box;
    font-family: "Anonymous Pro", "Courier New", Courier, monospace;
}

/* prevent scrollbars from  window overflow */
body {
    overflow: hidden;
    background-image: url("images/brainsoup/BrainSoup087.png");
}

/* splash and end screen */
.splash {
    opacity: 0;
    visibility: hidden;

    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 100;

    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
    align-items: center;

    font-size: 3em;
    backdrop-filter: blur(5px);
    background-color: white;

    transition: opacity 5s, visibility 5s;
    transition-delay: 2s;
}

#windows {
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
}

/* window content */
.root {
    /* positioning */
    position: absolute;
    display: flex;
    flex-direction: column;

    border: var(--border);
    min-width: 300px;
    min-height: 300px;

    touch-action: none;
    box-shadow: var(--shadow);

    /* fade out animation */
    transition: opacity 200ms, visibility 201ms;

    /* disable text selection */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

.active {
    box-shadow: var(--active-shadow);
}

/* window title bar */
.bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    font-size: 2em;
    font-weight: bold;
    padding: 0.25em;
    border-bottom: var(--border);
}

/* window title */
.title {
    width: 100%;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* button */
div.bar button {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    height: 1.3em;
    width: 1.3em;
}

/* window content */
.content {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    font-size: 1.75em;
    padding: 0.5em;
    height: auto;
    line-height: 1.1em;

    overflow-y: auto;
}

/* ===== Scrollbar CSS ===== */
/* Firefox */
* {
    scrollbar-width: auto;
    scrollbar-color: #000000 #ffffff;
}

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 16px;
}

*::-webkit-scrollbar-track {
    background: #ffffff;
}

*::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 0px;
    border: 3px solid #ffffff;
}

/* credit */
.credit {
    list-style: none;
    font-size: 0.5em;
    margin-left: 0;
    padding-left: 0;
    line-height: 1.5em;
}

/* links */
.content a,
#taskbar a {
    color: inherit;
    text-decoration: underline dotted;
    transition-duration: 250ms;
}
.content a:hover,
#taskbar a:hover {
    color: black;
    background-color: rgba(255, 255, 255, 0.6);
}

/* window button */
.bar button {
    display: flex;
    border: none;
    /*background-color: rgba(0, 0, 0, 0%);*/
    background-color: lightgray;
    width: 40px;
    justify-content: center;
    align-items: center;

    transition-duration: 250ms;
}
.bar button:hover {
    background-color: pink;
}
.bar button:active {
    color: white;
    background-color: red;
}

#mobile-credit {
    display: none;
}

/* description */
#about {
    background-color: lightgray;
}

/* TODO: implement class for light/dark window text/highlight */
/* other windows */
#flash {
    background-color: #9b2226;
}
#flash > .content {
    color: white;
}
#geocities {
    background-color: #8daccc;
}
#tumblr {
    background-color: #35465c;
}
#tumblr > .content {
    color: white;
}
#copyright {
    background-color: #e9c46a;
}
#detritus {
    background-color: darkslategrey;
}
#detritus > .content {
    color: white;
}

/* desktop icons */
#desktop {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 0;
}
#desktop * {
    text-decoration: none;
    color: inherit;
    user-select: none;
}
.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 3em;

    width: 100%;
    height: auto;
}
.icon-label {
    backdrop-filter: blur(5px);
    background-color: rgba(192, 192, 192, 0.8);
    font-size: 0.35em;
    padding-inline: 0.5em;
    margin-bottom: 1em;
}

/* taskbar */
#taskbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    position: absolute;
    z-index: 99;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5em;
    padding-inline: 1em;

    backdrop-filter: blur(5px);
    background-color: rgba(255, 255, 255, 0.9);

    font-weight: bold;
}

/* inner taskbar elements */
#taskbar > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}

/* mobile/responsive features */
@media only screen and (orientation: portrait), screen and (max-width: 812px) {
    body {
        overflow-y: auto;
    }
    #windows {
        display: flex;
        flex-direction: column;
        justify-content: start;
        align-items: flex-start;
        gap: 0.5em;
    }
    .root {
        position: inherit;
        box-shadow: var(--shadow);
        touch-action: auto;
        width: 80%;
    }
    .active {
        box-shadow: var(--shadow);
    }
    .content {
        /* scrollable window fade effect */
        mask-image: none;
        -webkit-mask-image: none;
    }
    div.bar button {
        display: none;
    }
    .buffer {
        display: none;
    }
    #desktop {
        display: none;
    }
    #taskbar {
        display: none;
    }
    #mobile-credit {
        display: block;
        background-color: black;
        color: white;
        font-size: 1.25em;
        width: 100%;
        padding: 0;
        margin: 0;
    }
}
