body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: "DotGothic16", sans-serif;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    color: rgb(68, 233, 216);
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea {
    user-select: text;
    -webkit-user-select: text;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;

    margin: 14px 16px;
    padding: 0 16px;
    height: 50px;
    flex-shrink: 0;

    font-size: 22px;
    background: rgba(12, 24, 28, 0.685);
    backdrop-filter: blur(15px);
    border-radius: 16px;
}

.desktop {
    flex: 1;
    margin: 0 5px;
    
    /* height: calc(100vh - 50px - 70px); */
    position: relative;
    overflow: hidden;

    user-select: none;
}

.desktop-icon {
    width: 92px;
    height: 92px;
    margin: 5px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    
    border: none;
    background: transparent;
    cursor: pointer;

    border-radius: 8px;
}

.desktop-icon:hover {
    background-color: rgba(68, 233, 216, 0.1);
}

.desktop-icon:focus {
    
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    outline: none;
    box-shadow: 0 0 0 2px rgb(68, 233, 216);
}

.desktop-icon img {
    width: 64px;
    height: 64px;

    /* image-rendering: pixelated; */
    pointer-events: none;
}

.desktop-icon span {
    font: inherit;
    font-size: 12px;
    text-align: center;
    /* text-shadow: 1px 1px 2px black; */
    
    pointer-events: none;
}

.dock {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 67676767676767;

    display: flex;
    align-items: flex-end;
    gap: 6px;

    padding: 8px 12px;

    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 22px;
}

.dock-icon {
    width: 64px;
    height: 64px;

    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    
    background: none;
    border: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    transition: transform .15s ease;
}

.dock-icon img {
    width: 64px;
    height: 64px;

    /* image-rendering: pixelated; */
    pointer-events: none;
}

.dock-icon:hover {
    transform: translateY(-8px) scale(1.5);
}

.dock-icon:has(+ .dock-icon:hover),
.dock-icon:hover + .dock-icon {
    transform: scale(1.1) translateY(-5px);
}

.controls {
    display: flex;
    gap: 8px;
}

.window {
    position: fixed;
    
    z-index: 1000;

    top: 120px;
    left: 200px;

    width: 600px;
    height: 400px;    
    
    /* display: none; hidden by default */
    display: flex;
    flex-direction: column;

    background: rgba(12, 24, 28, 0.685);
    border: 1px solid rgba(68,233,216,.4);
    border-radius: 16px;

    backdrop-filter: blur(15px);
    overflow: hidden;

    box-shadow: 0 15px 40px rgba(0,0,0,.4);

    opacity: 0;
    transform: scale(0.92) translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.window-titlebar {
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;

    padding: 0 14px;

    background: rgba(0,0,0,.25);
    cursor: move;

    font-weight: bold;
}

.window-content {
    flex: 1;
    padding: 16px;
    overflow: auto;
}

.window-content h1, .window-content h2 {
    margin-top: 0;
}

.window.open {
    /* display: flex; */
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
    pointer-events: auto;

    animation: windowOpen .22s cubic-bezier(.2, .8, .2, 1);
}

@keyframes windowOpen{
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to{
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.window.closing {
    animation: windowClose .22s cubic-bezier(.4, 0, .2, 1);
}

@keyframes windowClose{
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to{
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

.window-controls {
    display: flex;
    gap: 6px;
}

.window-controls button {
    width: 28px;
    height: 28px;
}

#browser-window {
    width: 800px;
    height: 600px;
}

.browser-toolbar {
    display:flex;
    align-items: center;
    gap: 8px;

    padding: 10px 12px;

    background: rgba(0,0,0,.18);
    border-bottom: 1px solid rgba(68,233,216,.2);
}

.browser-toolbar button {
    width: 34px;
    height: 34px;

    border: none;
    border-radius: 8px;

    background: rgba(255,255,255,.08);
    color: rgb(68, 233, 216);
    cursor: pointer;

    transition: background .15s;
}

.browser-toolbar button:hover {
    background: rgba(255,255,255,.15);
}

.browser-toolbar input {
    flex: 1;

    padding: 8px 12px;

    border: none;
    border-radius: 10px;

    background: rgba(255,255,255,.08);
    color: rgb(68, 233, 216);

    font: inherit;
    outline: none;
}

.browser-toolbar input::placeholder {
    color: rgba(68, 233, 216, .5);
}

.browser-content {
    flex: 1;
    background: white;
}

.browser-content iframe {
    width: 100%;
    height: 100%;

    border: none;
}

#message-window {
    width: 400px;
    height: auto;
}

#message-ok {
    min-width: 80px;
    height: 34px;

    padding: 0 16px;

    font-family: "DotGothic16", sans-serif;
    font-size: 16px;
    color: rgb(68, 233, 216);
    background: rgba(68, 233, 216, .4);

    border: 1px solid rgba(68, 233, 216, .4);
    border-radius: 10px;

    cursor: pointer;

    transition:
        background .15s ease;
        /* transform .15s ease, */
        /* box-shadow .15s ease; */
}

#message-ok:hover {
    background: rgba(68, 233, 216, .25);
    
    /* box-shadow: 0 0 12px rgba(68, 233, 216, .35); */
    
    /* transform: translateY(-2px); */
}

#message-ok:active {
    transform: translateY(0);

    background: rgba(68, 233, 216, .35);
}

.desktop-widgets {
    position: fixed;
    top: 90px;
    right: 17px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    z-index: 500;
}

.widget {
    width: 220px;

    padding: 16px;

    background: rgba(12, 24, 28, 0.6);
    backdrop-filter: blur(15px);

    border: 1px solid rgba(68,233,216,.35);
    border-radius: 16px;
}

.widget h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.widget p {
    margin: 6px 0;
}

#widget-time {
    font-size: 24px;
    text-align: center;
}