/* ===== WINDOWS 98 DESKTOP ===== */
#windows-98-desktop {
    width: 100%;
    background-color: #008080; 
    font-family: "Tahoma", "Geneva", sans-serif;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
}

#windows-98-desktop.visible-and-fixed { 
    display: block !important; 
    opacity: 1;
    visibility: visible;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: opacity 0.8s ease-in;
}

#windows-98-desktop .window-content {
    user-select: text;
    -webkit-user-select: text;
}

/* ===== TASKBAR ===== */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: #C0C0C0;
    border-top: 2px solid #FFFFFF;
    box-shadow: inset 0 1px 0 #DFDFDF, 0 -1px 0 #808080;
    display: flex;
    align-items: center;
    padding: 0 3px;
    z-index: 1000;
}

.start-button {
    background: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    padding: 3px 12px;
    display: flex;
    align-items: center;
    cursor: default;
    font-weight: bold;
    font-size: 12px;
    color: #000000;
    margin-right: 5px;
    user-select: none;
    flex-shrink: 0;
    height: 32px;
    min-width: 70px;
    gap: 4px;
}

.start-button:active {
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    padding: 4px 11px 2px 13px;
}

.start-button img {
    width: 20px;
    height: 20px;
}

.start-button span {
    font-size: 13px;
    letter-spacing: 0.5px;
}

#taskbar-programs {
    display: flex;
    height: 100%;
    align-items: center;
    overflow-x: auto;
    flex-grow: 1;
    padding: 2px 0;
    gap: 2px;
}

.taskbar-program-button {
    background: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    padding: 2px 8px;
    font-size: 11px;
    min-width: 80px;
    max-width: 160px;
    height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    user-select: none;
    display: flex;
    align-items: center;
    color: #000;
}

.taskbar-program-button.active {
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    background: #A0A0A0;
    padding: 3px 7px 1px 9px;
}

.taskbar-clock-area {
    margin-left: auto;
    padding: 2px 8px;
    border: 2px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
}

#taskbar-clock-time {
    font-size: 11px;
    color: #000000;
    min-width: 60px;
    text-align: center;
    font-family: "Tahoma", "Geneva", sans-serif;
}

/* ===== DESKTOP ICONS ===== */
.desktop-icon {
    position: absolute;
    width: 75px;
    text-align: center;
    padding: 4px 2px;
    cursor: default;
    color: #FFFFFF;
    user-select: none;
}

.desktop-icon:hover {
    background-color: rgba(0, 0, 128, 0.25);
    outline: 1px dotted #FFFFFF;
    outline-offset: -1px;
}

.desktop-icon.selected {
    background-color: rgba(0, 0, 128, 0.4);
    outline: 1px dotted #FFFFFF;
    outline-offset: -1px;
}

.desktop-icon.selected:hover {
    background-color: rgba(0, 0, 128, 0.5);
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    margin: 0 auto 3px;
    display: block;
    pointer-events: none;
}

.desktop-icon span {
    font-size: 11px;
    display: block;
    word-wrap: break-word;
    text-shadow: 1px 1px 2px #000000;
    pointer-events: none;
    line-height: 1.2;
}

/* ===== DESKTOP CONTEXT MENU ===== */
#desktop-context-menu {
    position: fixed;
    width: 190px;
    background: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #404040 #404040 #FFFFFF;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    z-index: 10000;
    padding: 3px;
    display: none;
    font-family: "Tahoma", "Geneva", sans-serif;
    font-size: 11px;
}

#desktop-context-menu .ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    cursor: default;
    color: #000;
    position: relative;
}

#desktop-context-menu .ctx-item:hover {
    background: #000080;
    color: #FFF;
}

#desktop-context-menu .ctx-item.disabled {
    color: #808080;
}

#desktop-context-menu .ctx-item.disabled:hover {
    background: transparent;
    color: #808080;
}

#desktop-context-menu .ctx-arrow {
    font-size: 9px;
    margin-left: auto;
    color: inherit;
}

#desktop-context-menu .ctx-separator {
    height: 1px;
    background: #808080;
    margin: 3px 6px;
    border-bottom: 1px solid #FFF;
}

/* ===== STARFIELD SCREENSAVER ===== */
#starfield-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: none;
    cursor: none;
}

#starfield-overlay.active {
    display: block;
}

#starfield-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== START MENU ===== */
#start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 190px;
    background: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #404040 #404040 #FFFFFF;
    box-shadow: 2px -2px 0 rgba(0,0,0,0.4);
    z-index: 1001;
    padding: 3px;
    display: none;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    cursor: default;
    font-size: 12px;
    color: #000000;
    font-family: "Tahoma", "Geneva", sans-serif;
}

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

.start-menu-item img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.start-menu-separator {
    height: 1px;
    background: #808080;
    margin: 4px 6px;
    border-bottom: 1px solid #FFFFFF;
}
