body,
.window,
.window * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    margin: 0;
    background: #0084ff;
    font-family: "Segoe UI", sans-serif;
    overflow: hidden;
}

.window {
    position: absolute;
    background: #f0f0f0;
    border: 1px solid #a0a0a0;
    box-shadow: 0 0 12px #0007;
    border-radius: 4px;
    overflow: hidden;
}

.window-header {
    background: linear-gradient(#e2e2e2, #cdcdcd);
    height: 32px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid #b0b0b0;
    cursor: grab;
    user-select: none;
}

.window-header .title {
    font-weight: 600;
}

.window-buttons {
    display: flex;
}

.window-buttons button {
    border: none;
    width: 40px;
    height: 28px;
    margin-left: 3px;
    cursor: pointer;
    color: black;
    font-size: 14px;
    font-weight: bold;
}

.btn-min {
    background: #e5e5e5;
}

.btn-max {
    background: #e5e5e5;
}

.btn-close {
    background: #e81123;
    color: white;
}

.btn-min:hover,
.btn-max:hover {
    background: #dcdcdc;
}

.btn-close:hover {
    background: #c50f1f;
}

iframe {
    width: 100%;
    height: calc(100% - 32px);
    border: none;
}

iframe.bugged {
    opacity: 0.5;
    pointer-events: none;
}

.window.bugged {
    cursor: wait;
}

.window {
    position: absolute;
    background: #f0f0f0;
    border: 1px solid #a0a0a0;
    box-shadow: 0 0 12px #0007;
    border-radius: 4px;
    overflow: hidden;
}

.window.resizable {
    resize: both;
    overflow: hidden;
}

.window.resizable {
    box-sizing: border-box;
}

.window.resizable {
    border: 1px solid #aaa;
}

.window.resizable:hover {
    border-color: #777;
}

.desktop {
    width: 100vw;
    height: calc(100vh - 40px);
    background-image: url("/images/FENETRE_wallpaper.png");
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 10px;
    box-sizing: border-box;
}

/* --- Icons --- */
.icon {
    width: 80px;
    height: 90px;
    margin: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: default;
    transition: background-color 0.1s;
}

.icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* State for when icon is clicked once */
.icon.selected {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.icon-img {
    font-size: 40px;
    margin-bottom: 5px;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.3));
}

.icon-label {
    color: white;
    font-size: 12px;
    text-align: center;
    text-shadow: 1px 1px 2px black;
    padding: 2px 4px;
}

/* --- Taskbar --- */
.taskbar {
    height: 40px;
    width: 100vw;
    background-color: #1c1c1c;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    bottom: 0;
    z-index: 100;
}

.items-container {
    display: flex;
}

.start-btn {
    background: #0078d7;
    color: white;
    height: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    font-weight: bold;
    transition: background 0.2s;
}

.start-btn:hover {
    background: #008bf0;
}

.start-icon {
    margin-right: 8px;
    font-size: 18px;
}

.tray {
    color: white;
    padding-right: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.taskbar-item {
    background: #3a3a3a;
    color: white;
    padding: 8px 12px;
    align-content: center;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 2px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.taskbar-item:hover {
    background: #4a4a4a;
}

.taskbar-item.active {
    background: #505050;
    border-bottom-color: #0078d7;
}

.marquee-selection {
    position: absolute;
    background: rgba(0, 120, 215, 0.3);
    border: 1px solid rgba(0, 120, 215, 0.7);
    pointer-events: none;
    z-index: 9999;
}

.icon.selected {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}


.icon.linux {
    display: none;
}