* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Courier New", Courier, monospace;
}

body {
    background-color: #008080;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

#desktop {
    flex: 1;
    position: relative;
    padding: 16px;
}

.desktop-icons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 80px;
}

.icon {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.icon-box {
    font-size: 32px;
}

.icon-label {
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
}

.window {
    position: absolute;
    top: 60px;
    left: 140px;
    width: 360px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    display: none;
}

.window-header {
    background-color: #000080;
    color: white;
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 13px;
    cursor: grab;
}

#window-terminal {
    top: 100px;
    left: 200px;
}

.btn-close {
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    width: 20px;
    height: 20px;
    font-weight: bold;
    cursor: pointer;
}

.window-body {
    padding: 8px;
}

.window-body textarea {
    width: 100%;
    height: 180px;
    resize: none;
    padding: 6px;
}

#taskbar {
    height: 36px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

#clock {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 3px 10px;
    font-size: 13px;
}

#titlebar {
    background-color: #000080;
    color: white;
    padding: 4px 12px;
    border-bottom: 2px solid white;
    display: flex;
    align-items: center;
}

#titlebar h1 {
    font-size: 14px;
    letter-spacing: 1px;
}

.window.active {
    display: block;
}

/* canvas */

#paint-canvas {
    background-color: white;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    cursor: crosshair;
    display: block;
    margin-bottom: 8px;
}

.paint-tools {
    display: flex;
    gap: 6px;
}

.paint-tools button {
    padding: 2px 8px;
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    cursor: pointer;
}

/* calc */
#calc-display {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    background-color: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.calc-grid button {
    padding: 8px;
    font-weight: bold;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    cursor: pointer;
}

.calc-grid button:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/*terminal*/
#terminal-output {
    background-color: black;
    color: #00ff00;
    height: 160px;
    padding: 8px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
}

#calc-display {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    background-color: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.calc-grid button {
    padding: 8px;
    font-weight: bold;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    cursor: pointer;
}

.calc-grid button:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

#terminal-input {
    width: 100%;
    background-color: black;
    color: #00ff00;
    border: none;
    border-top: 1px solid #333333;
    padding: 6px 8px;
    font-size: 12px;
    outline: none;
}

/*notepad*/
#notepad-status {
    margin-top: 6px;
    padding: 3px 6px;
    font-size: 11px;
    background-color: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    color: #202020;
}

/* settings */
#window-settings input[type="text"] {
    padding: 4px;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

#save-settings {
    padding: 4px 10px;
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    cursor: pointer;
}

/* about */
#window-about {
    text-align: center;
    line-height: 1.5;
}

/* file explorer */
.explorer-tools {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.explorer-tools button {
    padding: 2px 8px;
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    cursor: pointer;
    font-size: 12px;
}

#explorer-path {
    background-color: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 3px 6px;
    font-size: 12px;
    margin-bottom: 6px;
}

#explorer-list {
    background-color: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    height: 150px;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

#explorer-list button {
    background: none;
    border: 1px solid transparent;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 12px;
}

#explorer-list button:hover {
    background-color: #000080;
    color: white;
}

/* start menu */
#start-btn {
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    padding: 3px 12px;
    font-weight: bold;
    cursor: pointer;
}

#start-menu {
    position: absolute;
    bottom: 36px;
    left: 8px;
    width: 180px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    display: none;
    flex-direction: column;
    z-index: 9999;
}

#start-menu.active {
    display: flex;
}

.start-header {
    background-color: #000080;
    color: white;
    padding: 6px 8px;
    font-weight: bold;
    font-size: 12px;
}

.start-item {
    background: none;
    border: none;
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}

.start-item:hover {
    background-color: #000080;
    color: white;
}