/* Windows 98 Design System */

/* Windows 98 Color Palette */
:root {
    --win98-gray: #c0c0c0;
    --win98-dark-gray: #808080;
    --win98-light-gray: #dfdfdf;
    --win98-white: #ffffff;
    --win98-black: #000000;
    --win98-blue: #000080;
    --win98-dark-blue: #000040;
    --win98-light-blue: #0080ff;
    --win98-red: #ff0000;
    --win98-green: #008000;
    --win98-yellow: #ffff00;
    --win98-highlight: #d4d0c8;
    --win98-shadow: #808080;
}

/* Windows 98 Button Styles */
.win98-btn {
    background: var(--win98-gray);
    border: none;
    border-radius: 0;
    padding: 4px 12px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    font-weight: normal;
    color: var(--win98-black);
    cursor: pointer;
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.win98-btn:hover {
    background: var(--win98-highlight);
}

.win98-btn:active {
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white),
        inset 2px 2px 0 var(--win98-dark-gray),
        inset -2px -2px 0 var(--win98-light-gray);
    transform: translate(1px, 1px);
}

.win98-btn:focus {
    outline: 1px dotted var(--win98-black);
    outline-offset: -4px;
}

/* Windows 98 Input Fields */
.win98-input {
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    padding: 4px 6px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.win98-input:focus {
    background: var(--win98-white);
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
}

.win98-input::placeholder {
    color: var(--win98-dark-gray);
}

/* Windows 98 Window */
.win98-window {
    background: var(--win98-gray);
    border: 2px solid var(--win98-black);
    border-radius: 0;
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.win98-window-header {
    background: var(--win98-blue);
    color: var(--win98-white);
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 18px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.win98-window-title {
    flex: 1;
    padding-left: 2px;
}

.win98-window-controls {
    display: flex;
    gap: 2px;
    align-items: center;
}

.win98-window-btn {
    width: 16px;
    height: 14px;
    background: var(--win98-gray);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    cursor: pointer;
    padding: 0;
    margin: 0;
    box-shadow: 
        inset -1px -1px 0 var(--win98-black),
        inset 1px 1px 0 var(--win98-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 9px;
    font-weight: bold;
    color: var(--win98-black);
    line-height: 1;
}

.win98-window-btn:hover {
    background: var(--win98-highlight);
}

.win98-window-btn:active {
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
}

.win98-window-body {
    background: var(--win98-gray);
    padding: 8px;
    flex: 1;
}

/* Windows 98 Checkbox */
.win98-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 13px;
    height: 13px;
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    cursor: pointer;
    position: relative;
    margin: 0;
    padding: 0;
}

.win98-checkbox:checked {
    background: var(--win98-white);
}

.win98-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    font-size: 12px;
    color: var(--win98-black);
    font-weight: bold;
    line-height: 1;
}

.win98-checkbox:focus {
    outline: 1px dotted var(--win98-black);
    outline-offset: 1px;
}

/* Windows 98 Radio Button */
.win98-radio {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 50%;
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    cursor: pointer;
    position: relative;
    margin: 0;
    padding: 0;
}

.win98-radio:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: var(--win98-black);
    border-radius: 50%;
}

.win98-radio:focus {
    outline: 1px dotted var(--win98-black);
    outline-offset: 1px;
}

/* Windows 98 Select/Dropdown */
.win98-select {
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    padding: 2px 20px 2px 4px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
}

.win98-select:focus {
    background-color: var(--win98-white);
}

/* Windows 98 Textarea */
.win98-textarea {
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    padding: 4px 6px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    outline: none;
    resize: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.win98-textarea:focus {
    background: var(--win98-white);
}

/* Windows 98 Panel/Group Box */
.win98-panel {
    background: var(--win98-gray);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    padding: 8px;
    box-shadow: 
        inset 1px 1px 0 var(--win98-white),
        inset -1px -1px 0 var(--win98-black);
}

.win98-panel-title {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: var(--win98-black);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--win98-dark-gray);
}

/* Windows 98 Status Bar */
.win98-statusbar {
    background: var(--win98-gray);
    border-top: 1px solid var(--win98-dark-gray);
    padding: 2px 4px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
    box-shadow: 
        inset 0 1px 0 var(--win98-white);
}

/* Windows 98 Toolbar */
.win98-toolbar {
    background: var(--win98-gray);
    border-bottom: 1px solid var(--win98-dark-gray);
    padding: 2px;
    display: flex;
    gap: 2px;
    align-items: center;
    box-shadow: 
        inset 0 -1px 0 var(--win98-black);
}

.win98-toolbar-btn {
    width: 22px;
    height: 22px;
    background: var(--win98-gray);
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win98-toolbar-btn:hover {
    background: var(--win98-highlight);
    border: 1px solid var(--win98-dark-gray);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black);
}

.win98-toolbar-btn:active {
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
}

/* Windows 98 Menu Bar */
.win98-menubar {
    background: var(--win98-gray);
    border-bottom: 1px solid var(--win98-dark-gray);
    padding: 2px 0;
    display: flex;
    align-items: center;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    box-shadow: 
        inset 0 -1px 0 var(--win98-black);
}

.win98-menubar-item {
    padding: 4px 8px;
    color: var(--win98-black);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.win98-menubar-item:hover {
    background: var(--win98-blue);
    color: var(--win98-white);
}

/* Windows 98 Scrollbar */
.win98-scrollbar {
    width: 16px;
    background: var(--win98-gray);
    border-left: 1px solid var(--win98-dark-gray);
    box-shadow: 
        inset 1px 0 0 var(--win98-white);
}

.win98-scrollbar-thumb {
    background: var(--win98-gray);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black);
    cursor: pointer;
}

.win98-scrollbar-thumb:hover {
    background: var(--win98-highlight);
}

.win98-scrollbar-thumb:active {
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
}

/* Windows 98 Tab */
.win98-tab {
    background: var(--win98-gray);
    border: 1px solid var(--win98-dark-gray);
    border-bottom: none;
    border-radius: 0;
    padding: 4px 12px;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
    cursor: pointer;
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.win98-tab:hover {
    background: var(--win98-highlight);
}

.win98-tab.active {
    background: var(--win98-gray);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        inset 0 -2px 0 var(--win98-gray);
    z-index: 1;
    position: relative;
}

/* Windows 98 Progress Bar */
.win98-progress {
    width: 100%;
    height: 20px;
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    overflow: hidden;
    position: relative;
}

.win98-progress-bar {
    height: 100%;
    background: var(--win98-blue);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
}

/* Windows 98 List Box */
.win98-listbox {
    background: var(--win98-white);
    border: 1px solid var(--win98-dark-gray);
    border-radius: 0;
    box-shadow: 
        inset 1px 1px 0 var(--win98-black),
        inset -1px -1px 0 var(--win98-white);
    overflow-y: auto;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
}

.win98-listbox-item {
    padding: 2px 4px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.win98-listbox-item:hover {
    background: var(--win98-blue);
    color: var(--win98-white);
}

.win98-listbox-item.selected {
    background: var(--win98-blue);
    color: var(--win98-white);
}

/* Windows 98 Separator */
.win98-separator {
    height: 1px;
    background: var(--win98-dark-gray);
    border: none;
    margin: 4px 0;
    box-shadow: 0 1px 0 var(--win98-white);
}

/* Windows 98 Icon */
.win98-icon {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Windows 98 Label */
.win98-label {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
    color: var(--win98-black);
}

/* Windows 98 Disabled State */
.win98-btn:disabled,
.win98-input:disabled,
.win98-select:disabled {
    background: var(--win98-gray);
    color: var(--win98-dark-gray);
    cursor: not-allowed;
    box-shadow: 
        inset 1px 1px 0 var(--win98-white),
        inset -1px -1px 0 var(--win98-dark-gray);
}

/* Windows 98 Error/Alert Styles */
.win98-error {
    background: var(--win98-red);
    color: var(--win98-white);
    padding: 8px;
    border: 2px solid var(--win98-black);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
}

/* Windows 98 Info/Message Styles */
.win98-info {
    background: var(--win98-blue);
    color: var(--win98-white);
    padding: 8px;
    border: 2px solid var(--win98-black);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
}

/* Windows 98 Success Styles */
.win98-success {
    background: var(--win98-green);
    color: var(--win98-white);
    padding: 8px;
    border: 2px solid var(--win98-black);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
}

/* Windows 98 Warning Styles */
.win98-warning {
    background: var(--win98-yellow);
    color: var(--win98-black);
    padding: 8px;
    border: 2px solid var(--win98-black);
    box-shadow: 
        -1px -1px 0 var(--win98-white),
        1px 1px 0 var(--win98-black),
        -2px -2px 0 var(--win98-light-gray),
        2px 2px 0 var(--win98-dark-gray);
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
    font-size: 11px;
}
