:root {
    --wallpaper: #071329;
    --wallpaper-image: url("../images/wallpapers/wallpaper.png");
    --taskbar-height: 48px;
    --accent-color: #60a5fa;
    --window-radius: 8px;
    --glass-opacity: 0.72;
    --icon-size: 46px;
    --font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --taskbar-bg: rgba(22, 34, 52, var(--glass-opacity));
    --window-bg: rgba(243, 247, 253, 0.96);
    --window-border: rgba(255, 255, 255, 0.72);
    --text-dark: #1f2937;
    --shadow-window: 0 26px 80px rgba(0, 0, 0, 0.42), 0 2px 10px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    font-family: var(--font-family);
    background: var(--wallpaper);
    color: #fff;
}

body.is-window-interacting {
    -webkit-user-select: none;
    user-select: none;
}

body.is-window-resizing iframe {
    pointer-events: none;
}

button {
    font: inherit;
}

button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.desktop-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 320px;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--wallpaper);
    background-image: var(--wallpaper-image);
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

.desktop-shell::before,
.desktop-shell::after {
    display: none;
    content: none;
}

.desktop-shell::after {
    display: none;
}

.desktop-area {
    position: absolute;
    inset: 0 0 var(--taskbar-height) 0;
    display: grid;
    grid-template-columns: 76px;
    grid-auto-rows: 84px;
    align-content: start;
    justify-content: start;
    gap: 7px;
    padding: 15px 0 0 13px;
    overflow: hidden;
}

.desktop-icon {
    display: grid;
    grid-template-rows: var(--icon-size) auto;
    align-items: start;
    justify-items: center;
    width: 74px;
    min-height: 78px;
    padding: 5px 3px 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #fff;
    cursor: default;
    user-select: none;
}

.desktop-icon:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.desktop-icon.is-selected {
    border-color: rgba(139, 197, 255, 0.72);
    background: rgba(78, 154, 239, 0.28);
}

.desktop-icon:active {
    background: rgba(78, 154, 239, 0.34);
}

.desktop-icon__art {
    display: grid;
    place-items: center;
    width: var(--icon-size);
    height: var(--icon-size);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.26));
}

.desktop-icon__art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.desktop-icon__label {
    max-width: 70px;
    margin-top: 4px;
    color: #fff;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 1px 3px #000, 0 1px 7px rgba(0, 0, 0, 0.62);
    overflow-wrap: anywhere;
}

.window {
    position: absolute;
    z-index: 10;
    display: grid;
    grid-template-rows: 32px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--window-border);
    border-radius: var(--window-radius);
    background: var(--window-bg);
    box-shadow: var(--shadow-window);
    color: var(--text-dark);
}

.window.is-hidden {
    display: none;
}

.window.is-minimized {
    display: none;
}

.window--presentation {
    top: 0;
    left: 0;
    width: 1500px;
    height: 880px;
    min-width: 520px;
    min-height: 360px;
    transform: none;
}

.window--presentation.is-maximized {
    border-radius: 0;
}

.window--resume {
    grid-template-rows: minmax(0, 1fr);
    top: 0;
    left: 0;
    width: 1040px;
    height: min(880px, calc(100vh - var(--taskbar-height) - 92px));
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    transform: none;
}

.window--resume.is-maximized {
    border-radius: 0;
    transform: none;
}

.window-resize-handle {
    position: absolute;
    z-index: 4;
    background: transparent;
    touch-action: none;
}

.window-resize-handle--n {
    top: 0;
    right: 12px;
    left: 12px;
    height: 8px;
    cursor: n-resize;
}

.window-resize-handle--e {
    top: 12px;
    right: 0;
    bottom: 12px;
    width: 8px;
    cursor: e-resize;
}

.window-resize-handle--s {
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 8px;
    cursor: s-resize;
}

.window-resize-handle--w {
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 8px;
    cursor: w-resize;
}

.window-resize-handle--ne,
.window-resize-handle--nw,
.window-resize-handle--se,
.window-resize-handle--sw {
    width: 14px;
    height: 14px;
}

.window-resize-handle--ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.window-resize-handle--nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.window-resize-handle--se {
    right: 0;
    bottom: 0;
    cursor: se-resize;
}

.window-resize-handle--sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.window.is-maximized .window-resize-handle {
    display: none;
}

.window--app-placeholder {
    top: max(118px, 22vh);
    left: 50%;
    width: min(440px, calc(100vw - 42px));
    height: 210px;
    min-width: 300px;
    transform: translateX(-50%);
}

.window--app-placeholder.is-maximized {
    inset: 0 0 var(--taskbar-height) 0;
    width: auto;
    height: auto;
    border-radius: 0;
    transform: none;
}

.window__titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    height: 32px;
    background: rgba(249, 251, 255, 0.86);
    border-bottom: 1px solid rgba(205, 214, 226, 0.68);
    -webkit-user-select: none;
    user-select: none;
}

.window__identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    padding-left: 12px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 400;
}

.window__titlebar--presentation {
    background:
        linear-gradient(90deg, rgba(94, 38, 31, 0.96), rgba(151, 67, 39, 0.96)),
        #7a3328;
    border-bottom-color: rgba(255, 209, 176, 0.18);
}

.window__identity--presentation {
    gap: 9px;
    color: #fff7ef;
    font-weight: 500;
}

.window__icon--presentation {
    width: 20px;
    height: 20px;
}

.window__icon--presentation svg {
    width: 20px;
    height: 20px;
}

.presentation-titlebar__file {
    min-width: 0;
    max-width: min(46vw, 420px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presentation-titlebar__app {
    flex: 0 0 auto;
    color: rgba(255, 235, 218, 0.72);
    font-size: 11px;
    font-weight: 400;
}

.window--presentation .window__control {
    color: #fff7ef;
}

.window--presentation .window__control:hover {
    background: rgba(255, 255, 255, 0.14);
}

.window--presentation .window__control--close:hover {
    background: #c42b1c;
    color: #fff;
}

.window__icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.window__icon svg,
.window__icon > svg {
    width: 18px;
    height: 18px;
    display: block;
}

.window__controls {
    display: flex;
    align-self: stretch;
}

.window__control {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 31px;
    border: 0;
    background: transparent;
    color: #1f2937;
    cursor: default;
}

.window__control:hover {
    background: rgba(0, 0, 0, 0.07);
}

.window__control--close:hover {
    background: #c42b1c;
    color: #fff;
}

.window__control[data-window-action="minimize"] span {
    width: 10px;
    height: 1px;
    background: currentColor;
}

.window__control[data-window-action="maximize"] span {
    width: 10px;
    height: 10px;
    border: 1.5px solid currentColor;
    border-radius: 1px;
}

.window.is-maximized .window__control[data-window-action="maximize"] span {
    width: 11px;
    height: 10px;
    border: 0;
}

.window.is-maximized .window__control[data-window-action="maximize"] span::before,
.window.is-maximized .window__control[data-window-action="maximize"] span::after {
    position: absolute;
    width: 9px;
    height: 8px;
    content: "";
    border: 1.5px solid currentColor;
    border-radius: 1px;
}

.window.is-maximized .window__control[data-window-action="maximize"] span::before {
    transform: translate(3px, -3px);
}

.window.is-maximized .window__control[data-window-action="maximize"] span::after {
    transform: translate(-1px, 1px);
    background: rgba(249, 251, 255, 0.86);
}

.window__control--close span::before,
.window__control--close span::after {
    position: absolute;
    top: 15px;
    left: 18px;
    width: 11px;
    height: 1px;
    content: "";
    background: currentColor;
}

.window__control--close span::before {
    transform: rotate(45deg);
}

.window__control--close span::after {
    transform: rotate(-45deg);
}

.window__content {
    min-width: 0;
    min-height: 0;
}

.window__content--iframe {
    background: #000;
}

.window--resume .window__content--iframe {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    background: transparent;
}

.presentation-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.resume-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
}

.window--resume.is-maximized .window__content--iframe,
.window--resume.is-maximized .resume-frame {
    border-radius: 0;
}

.window__content--app-placeholder {
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(255, 255, 255, 0.88);
}

.window__content--app-placeholder p {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
}

.taskbar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--taskbar-height);
    padding: 4px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    background: var(--taskbar-bg);
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12), 0 -12px 38px rgba(1, 7, 18, 0.22);
    backdrop-filter: blur(28px) saturate(1.35);
}

.taskbar__center {
    position: absolute;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 4px;
    transform: translateX(-50%);
}

.taskbar__pinned,
.taskbar__running {
    display: flex;
    align-items: center;
    gap: 4px;
}

.taskbar__button {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    cursor: default;
}

.taskbar__button:hover {
    background: rgba(255, 255, 255, 0.13);
}

.taskbar__button svg {
    display: block;
    width: 22px;
    height: 22px;
}

.taskbar__button--start svg {
    fill: #e8f4ff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.taskbar__app.is-active::after,
.taskbar__app.is-minimized::after {
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 16px;
    height: 3px;
    content: "";
    border-radius: 999px;
    background: #8ec8ff;
    transform: translateX(-50%);
}

.taskbar__app.is-minimized::after {
    width: 7px;
    background: rgba(230, 240, 255, 0.86);
}

.taskbar__divider {
    width: 1px;
    height: 24px;
    margin: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
}

.taskbar__app.is-hidden {
    display: none;
}

.taskbar__tray {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    color: rgba(255, 255, 255, 0.94);
}

.tray-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 30px;
}

.tray-icon svg {
    width: 18px;
    height: 18px;
}

.taskbar__clock {
    display: grid;
    align-content: center;
    min-width: 72px;
    height: 40px;
    padding: 0 4px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    cursor: default;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
}

.taskbar__clock:hover {
    background: rgba(255, 255, 255, 0.12);
}

.taskbar__clock time,
.taskbar__clock span {
    display: block;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px), (pointer: coarse) {
    :root {
        --taskbar-height: 50px;
        --icon-size: 44px;
    }

    .desktop-area {
        grid-template-columns: repeat(2, 76px);
        grid-auto-rows: 82px;
        padding-top: 12px;
        gap: 6px;
    }

    .window--presentation,
    .window--presentation.is-maximized,
    .window--resume.is-maximized {
        inset: 0 0 var(--taskbar-height) 0;
        width: auto;
        height: auto;
        min-width: 0;
        min-height: 0;
        border-radius: 0;
        transform: none;
    }

    .window--resume {
        min-width: 0;
        min-height: 0;
    }

    .window-resize-handle {
        display: none;
    }

    .window--app-placeholder {
        top: 96px;
        width: calc(100vw - 28px);
        min-width: 0;
    }

    .taskbar {
        padding: 4px 8px;
    }

    .taskbar__center {
        gap: 2px;
    }

    .taskbar__button {
        width: 38px;
        height: 38px;
    }

    .taskbar__divider {
        margin: 0 2px;
    }

    .taskbar__tray {
        right: 6px;
        gap: 1px;
    }

    .tray-icon {
        display: none;
    }

    .taskbar__clock {
        min-width: 58px;
        font-size: 11px;
    }
}
