html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;

    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

@font-face {
    font-family: "Windows-xp-pixel-font";
    src: url("font/w95f.woff2") format("woff2");
}

.bg {
    width: 100vw;
    height: 100dvh;

    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;

    display: flex;
    justify-content: center;
    align-items: center;
}

.bg #background {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg #taskbar {
    width: 100%;
    position: absolute;
    bottom: -2px;
    z-index: 3;
}

.bg #time {
    position: absolute;
    bottom: 0px;
    right: 10px;
    z-index: 4;
    font-family: "Windows-xp-pixel-font";
    color: #000000;
    font-size: 2vw;
}

.grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    gap: 8px;
    padding: 16px;
    box-sizing: border-box;
    height: 96dvh;
}

.grid-cell {
    min-width: 0;
    min-height: 0;
    background-color: transparent;
    border: 1px solid transparent;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-family: "Windows-xp-pixel-font";
    font-size: 18px;
    text-align: center;
}

.grid-cell.drag-over {
    border-color: rgba(255, 255, 255, 0.75);
    background-color: rgba(255, 255, 255, 0.12);
}

.grid button:hover {
    background-color: #fbfbfb1f;
    border-color: initial;
    cursor: pointer;
}

.grid-cell #bin,
.grid-cell .bin-icon {
    width: min(80px, 55%);
    height: min(80px, 55%);
    object-fit: cover;
}


.grid-cell,
.grid button {
    width: 100%;
    height: 100%;
    padding: 8px;
    box-sizing: border-box;
    background: transparent;
    border-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
    touch-action: none;
    cursor: grab;

    font-family: "Windows-xp-pixel-font";
    color: #ffffff;
    font-size: 24px;
    text-shadow: 1px 1px 2px black;
}

.grid button img {
    width: min(80px, 55%);
    height: min(80px, 55%);
    object-fit: contain;
    pointer-events: none;
}

.grid button.dragging {
    opacity: 0.35;
}

img#note {
    width: min(80px, 55%);
    height: min(80px, 55%);
    object-fit: contain;
    pointer-events: none;
    scale: 2;
}

.drag-ghost {
    position: fixed;
    z-index: 100;
    width: 150px;
    height: 150px;
    pointer-events: none;
    opacity: 0.85;
    transform: translate(-50%, -50%);
}

.music-popup {
    position: fixed;
    z-index: 20;
    overflow: hidden;
}

.music-popup img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    pointer-events: none;
}

.music-popup-label {
    position: absolute;
    left: 19%;
    top: 43%;
    max-width: 72%;
    overflow: hidden;
    color: #111111;
    font-family: "Windows-xp-pixel-font";
    font-size: clamp(14px, 2vw, 28px);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.music-popup-close {
    position: absolute;
    top: 7%;
    right: 2.1%;
    width: 6.5%;
    height: 13%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mode-switch {
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #000000;
    font-family: "Windows-xp-pixel-font";
    font-size: 16px;
    cursor: pointer;
}

.mode-switch:active {
    border: 2px solid #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.mode-switch-icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}


.loading {
    width: 30vw;
    position: fixed;
    z-index: 10000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 350ms ease, visibility 350ms ease;
}


.loading.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loading #popup-loading {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10000;
}

.loading #loading-blocks {
    position: absolute;
    top: 52%;
    left: 4%;
    width: 90%;
    height: 15%;
    overflow: hidden;
    display: flex;
    gap: 2px;
    align-items: stretch;
}

.loading #loading-blocks img {
    height: 100%;
    min-width: 0;
    flex: 1 1 0;
    object-fit: fill;
    opacity: 0;
}


.loading #loading-blocks img.is-loaded {
    opacity: 1;
}

.gta-button {
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #000000;
    font-family: "Windows-xp-pixel-font";
    font-size: 18px;
    cursor: pointer;
}

.gta-button:active {
    border: 2px solid #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.gta-button img {
    width: min(80px, 55%);
    height: min(80px, 55%);
    object-fit: contain;
}

.windows-defender {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.windows-defender.is-visible {
    display: flex;
}

.windows-defender-popup {
    max-width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.windows-defender-popup img {
    width: 100%;
    max-height: calc(100dvh - 32px);
    display: block;
    object-fit: contain;
}



/* phone */
@media (max-width: 768px) {
    .grid-cell #bin,
    .grid-cell .bin-icon,
    .grid-cell button img,
    .grid-cell img{
        width: 60px;
        height: 60px;
        object-fit: contain;
        /* background-color: red; */
    }

    .grid-cell,
    .grid-cell button {
        font-size: 18px;
    }


    /* hover desactivé -> passage en active */
}
