/* Windows UI Styles */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed, but windows need pointer-events auto */
    z-index: 10;
}

.window {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    /* Slight transparency */
    border: 1px solid #000;
    font-family: 'Courier New', Courier, monospace;
    min-width: 200px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    /* Re-enable clicks */
    display: flex;
    flex-direction: column;
}

.window-header {
    background-color: #fff;
    border-bottom: 1px solid #000;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.window-title {
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.control-btn:hover {
    background-color: #000;
    color: #fff;
}

.window-content {
    padding: 10px;
    font-size: 12px;
    overflow-y: auto;
    max-height: 300px;
}

/* Scrollbar styling for a retro look */
.window-content::-webkit-scrollbar {
    width: 8px;
}

.window-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-left: 1px solid #000;
}

.window-content::-webkit-scrollbar-thumb {
    background: #000;
}