/* Windows 95 CSS Framework */

/* Fonts */
@font-face {
    font-family: 'MS Sans Serif';
    src: local('MS Sans Serif'), local('Segoe UI'), local('Tahoma');
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    background-color: #008080; /* Classic teal desktop */
    overflow: hidden;
    cursor: default;
    user-select: none;
}

/* Desktop */
#desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 28px; /* Leave room for taskbar */
    overflow: hidden;
}

/* Windows */
.window {
    position: absolute;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.window.minimized {
    display: none;
}

/* Title Bar */
.title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    padding: 2px 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.title-bar .title {
    color: white;
    font-weight: bold;
    font-size: 11px;
    padding-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
}

.title-bar-btn {
    width: 16px;
    height: 14px;
    background-color: #c0c0c0;
    border: 1px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    font-size: 9px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-bar-btn:active {
    border-color: #000 #dfdfdf #dfdfdf #000;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
}

.close-btn {
    font-family: 'Courier New', monospace;
}

/* Window Body */
.window-body {
    padding: 8px;
    flex-grow: 1;
    overflow: auto;
}

/* Buttons */
.win-btn {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    min-width: 75px;
}

.win-btn:hover {
    background-color: #d4d4d4;
}

.win-btn:active {
    border-color: #000 #dfdfdf #dfdfdf #000;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
    padding: 5px 11px 3px 13px;
}

.win-btn:disabled {
    color: #808080;
    text-shadow: 1px 1px 0 #fff;
    cursor: not-allowed;
}

.win-btn.primary {
    border: 2px solid #000;
}

/* Progress Bar */
.progress-bar {
    height: 16px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #dfdfdf;
    padding: 2px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        90deg,
        #000080 0px,
        #000080 8px,
        transparent 8px,
        transparent 10px
    );
    transition: width 0.1s linear;
}

.progress-bar-fill.complete {
    background: #000080;
}

/* Inset Panel (for grouping) */
.inset-panel {
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #dfdfdf;
    padding: 8px;
    background-color: #c0c0c0;
}

/* Divider */
.win-divider {
    border: none;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #fff;
    margin: 8px 0;
}

/* Fieldset/Group Box */
.win-fieldset {
    border: 1px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 8px;
    margin: 8px 0;
}

.win-fieldset legend {
    background-color: #c0c0c0;
    padding: 0 4px;
}

/* Text Input */
.win-input {
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    box-shadow: inset 1px 1px 0 #000;
    padding: 2px 4px;
    font-family: inherit;
    font-size: 11px;
    background-color: #fff;
}

/* Labels and Text */
.win-label {
    display: block;
    margin-bottom: 4px;
}

/* Checkbox */
.win-checkbox {
    appearance: none;
    width: 13px;
    height: 13px;
    background-color: #fff;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    box-shadow: inset 1px 1px 0 #000;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 4px;
}

.win-checkbox:checked::after {
    content: '\2713';
    display: block;
    font-size: 11px;
    font-weight: bold;
    line-height: 9px;
    text-align: center;
}

/* Taskbar */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background-color: #c0c0c0;
    border-top: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 0 1px 0 #fff;
    display: flex;
    align-items: center;
    padding: 2px 2px;
    z-index: 9999;
}

.start-button {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
}

.start-button:active {
    border-color: #000 #dfdfdf #dfdfdf #000;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
}

.start-button img {
    display: block;
    width: 45px;
    height: 14px;
    image-rendering: pixelated;
}

.taskbar-divider {
    width: 2px;
    height: 20px;
    background: linear-gradient(90deg, #808080 0%, #808080 50%, #fff 50%);
    margin: 0 4px;
}

#taskbar-windows {
    flex-grow: 1;
    display: flex;
    gap: 2px;
    overflow: hidden;
}

.taskbar-item {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 22px;
    display: flex;
    align-items: center;
}

.taskbar-item.active {
    border-color: #000 #dfdfdf #dfdfdf #000;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
    background: repeating-linear-gradient(
        45deg,
        #c0c0c0 0px,
        #c0c0c0 2px,
        #fff 2px,
        #fff 4px
    );
}

.taskbar-tray {
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 2px 8px;
    height: 22px;
    display: flex;
    align-items: center;
    font-size: 11px;
}

#clock {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: repeating-linear-gradient(
        45deg,
        #c0c0c0 0px,
        #c0c0c0 2px,
        #fff 2px,
        #fff 4px
    );
}

::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}

::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
    width: 16px;
    height: 16px;
}
