* { /* tells every element that width includes padding */
    box-sizing: border-box;
}
body {
    margin: 0; /* browsers auto add margins, no thx */
    font-family: "input-mono", monospace;
    font-weight: 300;
    font-style: normal;
    font-size: 10px;
    color: #222721;
}
.desktop {
    min-height: 100vh; /* vh = viewport height, 100vh means 'make this as tall as the screen' */
    background-image: linear-gradient(to top, #a3dcfa, #fff);
    padding: 24px;
    position: relative;
}
.icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 20px;
}
.icon img {
    width: 48px;
}
.icon p {
    margin: 0;
    text-align: center;
    text-transform: lowercase;
    letter-spacing: 2px;
}
.window {
    display: none;
    width: min(400px, calc(100vw - 48px));
    position: absolute;
    top: 100px;
    left: 100px;
    background: #fff;
    border: 1px solid #222721;
    box-shadow: 4px 4px 10px rgba(0,0,0,.3);
    z-index: 1; /* controls which element sits on top; higher # = closer to front */
}
.title-bar {
    background-image: linear-gradient(to top, #fcc6ec, #fff);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    font-weight: bold;
    cursor: move;
}
.title-bar button {
    width: 24px;
    height: 24px;
    font-weight: bold;
    border: 2px outset #fff;
    background: #fcc6ec;
    cursor: pointer;
}
.window-content {
    padding: 16px;
}
#statuscafe {
    padding: .5em;
    background-color: #fff;
    border: 1px solid #222721;
}
#statuscafe-username {
    margin-bottom: .5em;
}
#statuscafe-content {
    margin: 0 1em 0.5em 1em;
}
.status-window {
    display: block;
    width: min(225px, calc(100vw - 48px));
    top: 24px;
    right: 24px;
    left: auto;
}
.chat-window {
    display: block;
    width: min(350px, calc(100vw - 48px));
    top: 280px;
    right: 24px;
    left: auto;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 4px 6px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}
.chat-live {
    font-size: 9px;
    letter-spacing: 0;
}
.chat-content {
    padding-top: 4px;
    background-image: url("https://babyguy.neocities.org/images/backgrounds/bears.jpeg");
}
#chattable {
    display: block;
    width: 100%;
    height: 300px;
    border: 1px solid #222721;
}
.litepurp-title-bar {
    background-image: linear-gradient(to top, #d1d0f3, #fff);
}
.litepurp-title-bar button {
    background: #d1d0f3;
}
.purple-title-bar {
    background-image: linear-gradient(to top, #949cee, #fff);
}
.purple-title-bar button {
    background: #949cee;
}
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-4px);
    }
}
.stays-open.shake {
    animation: shake 0.3s;
}
.glitch-window {
    display: block;
    width: min(300px, calc(100vw - 48px));
    top: 300px;
    right: 50px;
    left: auto;
    z-index: 0;
    cursor: pointer;
}
.glitch-title-bar {
    background: #222721;
    color: #fcc6ec;
}
.glitch-content {
    padding: 0;
}
.image-fill img {
    width: 100%;
    display: block;
}
.image-center img {
    display: block;
    margin: auto;
}
.glitch-window.glitching {
    animation:
        window-glitch 0.35s steps(2, end) infinite,
        window-flicker 0.08s steps(2, end) infinite;
}

.glitch-window.glitching::before,
.glitch-window.glitching::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.glitch-window.glitching::before {
    background: #ff00aa;
    mix-blend-mode: screen;
    opacity: 0.25;
    animation: glitch-layer-one 0.18s steps(2, end) infinite;
}

.glitch-window.glitching::after {
    background: #00ffff;
    mix-blend-mode: screen;
    opacity: 0.2;
    animation: glitch-layer-two 0.12s steps(2, end) infinite reverse;
}

@keyframes window-glitch {
    0% {
        transform: translate(0, 0) skew(0);
        clip-path: inset(0);
    }

    5% {
        transform: translate(-12px, 3px) skew(-5deg);
        clip-path: inset(15% 0 60% 0);
    }

    10% {
        transform: translate(15px, -5px) skew(7deg);
        clip-path: inset(70% 0 5% 0);
    }

    15% {
        transform: translate(-5px, 8px) scaleX(1.08);
        clip-path: inset(30% 0 40% 0);
    }

    20% {
        transform: translate(18px, 0) skew(-8deg);
        clip-path: inset(5% 0 80% 0);
    }

    30% {
        transform: translate(-20px, -4px) scaleX(0.94);
        clip-path: inset(50% 0 20% 0);
    }

    40% {
        transform: translate(7px, 6px) skew(10deg);
        clip-path: inset(80% 0 3% 0);
    }

    50% {
        transform: translate(-15px, -2px);
        clip-path: inset(20% 0 55% 0);
    }

    60% {
        transform: translate(22px, 4px) skew(-6deg);
        clip-path: inset(65% 0 10% 0);
    }

    70% {
        transform: translate(-8px, -7px) scaleX(1.06);
        clip-path: inset(10% 0 70% 0);
    }

    80% {
        transform: translate(13px, 2px) skew(8deg);
        clip-path: inset(40% 0 35% 0);
    }

    90% {
        transform: translate(-18px, -3px);
        clip-path: inset(75% 0 5% 0);
    }

    100% {
        transform: translate(0);
        clip-path: inset(0);
    }
}

@keyframes window-flicker {
    0%, 100% {
        opacity: 1;
    }

    20% {
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }

    60% {
        opacity: 0.35;
    }

    80% {
        opacity: 0.9;
    }
}

@keyframes glitch-layer-one {
    0% {
        transform: translate(-20px, 0);
        clip-path: inset(10% 0 70% 0);
    }

    25% {
        transform: translate(25px, 0);
        clip-path: inset(60% 0 20% 0);
    }

    50% {
        transform: translate(-30px, 0);
        clip-path: inset(35% 0 45% 0);
    }

    75% {
        transform: translate(15px, 0);
        clip-path: inset(80% 0 5% 0);
    }

    100% {
        transform: translate(0);
        clip-path: inset(0);
    }
}

@keyframes glitch-layer-two {
    0% {
        transform: translate(25px, 0);
        clip-path: inset(70% 0 10% 0);
    }

    25% {
        transform: translate(-15px, 0);
        clip-path: inset(20% 0 60% 0);
    }

    50% {
        transform: translate(30px, 0);
        clip-path: inset(45% 0 30% 0);
    }

    75% {
        transform: translate(-20px, 0);
        clip-path: inset(5% 0 80% 0);
    }

    100% {
        transform: translate(0);
        clip-path: inset(0);
    }
}

.glitch-window.glitching img {
    animation: image-corruption 0.16s steps(2, end) infinite;
}

@keyframes image-corruption {
    0% {
        transform: translate(0);
        filter: none;
    }

    20% {
        transform: translate(-14px, 2px) scaleX(1.08);
        filter: contrast(2) saturate(2);
    }

    40% {
        transform: translate(18px, -3px) scaleX(0.92);
        filter: hue-rotate(90deg) contrast(2);
    }

    60% {
        transform: translate(-8px, 4px);
        filter: invert(0.2) contrast(3);
    }

    80% {
        transform: translate(20px, -1px);
        filter: saturate(4) hue-rotate(-60deg);
    }

    100% {
        transform: translate(0);
        filter: none;
    }
}