* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, sans-serif;
}

/* Desktop */
#desktop {
    width: 100vw;
    height: 100vh;
    background: teal;
    position: relative;
    overflow: hidden;
}

/* Windows */
.window {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid #000;
    box-shadow: inset -2px -2px #fff, inset 2px 2px #808080;

    min-width: 240px;
    min-height: 140px;
    width: 320px;  /* default width */
    height: 240px; /* default height */
    display: none;

    overflow: auto;
}

.title-bar {
    background: linear-gradient(to right, navy, royalblue);
    color: white;
    padding: 4px;
    cursor: move;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.control-btn {
    width: 16px;
    height: 16px;
    background: #c0c0c0;
    border: 1px solid black;
    text-align: center;
    line-height: 14px;
    font-size: 12px;
    cursor: pointer;
}

.window-content {
    padding: 10px;
    flex: 1;              /* fill the available height */
    overflow-y: auto;     /* add scrollbars if content is too big */
    overflow-x: hidden;   /* prevent horizontal scroll */
}

/* Predefined positions */
#about-window { top: 60px; left: 80px; }
#projects-window { top: 120px; left: 420px; }

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
}

.start-button {
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 4px 10px;
    margin: 2px;
    font-weight: bold;
    cursor: pointer;
}

.taskbar-windows {
    display: flex;
    gap: 4px;
    margin-left: 10px;
}

.taskbar-btn {
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
}

/* Start menu */
.start-menu {
    position: fixed;
    bottom: 34px;
    left: 2px;
    width: 200px;
    background: #c0c0c0;
    border: 2px solid #000;
    display: none;
    }

.start-menu ul {
    list-style: none;
    margin: 0;
    padding: 4px;
}

.start-menu li {
    padding: 6px;
    cursor: pointer;
}

.start-menu li:hover {
    background: navy;
    color: white;
}

/* Mobile layout */
#mobile-layout {
    display: none;
}

@media (max-width: 768px) {
#desktop, .taskbar {
    display: none;
}

#mobile-layout {
    display: block;
    padding: 20px;
    background: #111;
    color: white;
    min-height: 100vh;
}
}
.desktop-icon {
    position: absolute;
    width: 64px;
    text-align: center;
    color: white;
    cursor: default;
    font-size: 12px;
    margin: 10px;
    margin-top: 10px;
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto 4px;
}

/* Label background like old Windows */
.desktop-icon span {
    background: transparent;
    padding: 2px 4px;
}

/* Click highlight */
.desktop-icon:active span {
    background: navy;
}

#about-window {
    top: 60px;
    left: 80px;
    width: 600px;
    height: 600px;
    min-width: 260px;
    min-height: 160px;  
}

#projects-window {
    top: 120px;
    left: 420px;
    width: 420px;
    min-width: 300px;
    min-height: 200px;
}

#server-window {
    top: 120px;
    left: 420px;
    width: 420px;
    min-width: 600px;
    min-height: 630px;
}

.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    background: #808080;
}
