/* Global settings */
body, html {
    margin: 0;
    padding: 0;
    font-family: monospace;
    user-select: none;
    height: 100%;
    display: flex;
    flex-direction: column;

    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;

    overflow: hidden;
}

/* JavaScript disabled screen */
#no-js-message {
    text-align: center;
    margin-top: 20%;
}
.social-links a {
    margin: 0 10px;
}
.hidden {
    display: none !important;
}
.hidden { display: none; }
@keyframes fadeOut {
    0%   { opacity: 1; }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Boot screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

/* Apps */
.app {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 1px dotted transparent;
}

.selected {
    border-color: #000;
}

/* Desktop */
#desktop {
    background-color: black;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#desktop-grid {
    /*flex-grow: 1;  Fills remaining space above taskbar */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    background-color: transparent;
}

/* Taskbar */
#taskbar {
    justify-content: space-between;
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Set height as needed */
    background-color: rgba(22, 95, 204, 0.8);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 999; /* Ensure it sits above other elements */
}
.taskbar-preview {
    display: flex;
    align-items: center;
    padding: 5px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    margin-right: 5px;
    height: 100%; /* Ensures it stays within the taskbar */
    max-width: 150px; /* Limit the width */
    overflow: hidden;
    cursor: pointer;
}
.taskbar-preview img {
    height: 24px;
    width: 24px;
    margin-right: 5px;
}
.taskbar-preview span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}



#start-menu {
    cursor: pointer;
}
#open-apps {
    display: flex;
    flex-grow: 1;
    padding-left: 10px;
}
.resizer {
    width: 10px; /* Resizer width */
    height: 10px; /* Resizer height */
    background: lime; /* Resizer color */
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize; /* Resize cursor */
}

#time-display {
    margin-left: auto;
    color: #fff;
    padding-right: 50px;
}

/* Window */
.app-window {
    background-color: #000;
    border: 1px solid #444;
    position: absolute;
    width: 400px;
    height: 300px;
    display: flex;
    flex-direction: column;
    top: 50px;
    left: 50px;
    z-index: 1;

    backdrop-filter: blur(10px); /* Apply blur effect */
    background-color: rgba(0,0,0, 0.6);
}
.app-window.active {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
.window-header {
    display: flex;
    justify-content: space-between;
    background-color: #333;
    color: white;
    padding: 5px;
    cursor: move;
}
.window-controls button {
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
}
.window-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.center {
    text-align: center;
}
