:root {
    --bg-color: #008080; /* Classic Win95 Teal */
    --taskbar-bg: #c0c0c0;
    --window-bg: #c0c0c0;
    --titlebar-bg: #000080;
    --titlebar-text: #ffffff;
    --accent-color: #808080;
    --text-color: #000000;
    --shadow-out: 2px 2px 0px #ffffff inset, -2px -2px 0px #808080 inset;
    --shadow-in: 2px 2px 0px #808080 inset, -2px -2px 0px #ffffff inset;
    --border-width: 2px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
    background-color: var(--bg-color);
}

#desktop {
    width: 100vw;
    height: calc(100vh - 30px);
    position: relative;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(auto-fill, 100px);
    grid-auto-flow: column;
    gap: 10px;
}

#taskbar {
    height: 45px;
    width: 100%;
    background: var(--taskbar-bg);
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 2px;
    position: fixed;
    bottom: 0;
    z-index: 1000;
}

#start-button {
    background: var(--taskbar-bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: black;
    padding: 4px 10px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 35px;
}

#start-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 5px 9px 3px 11px;
}

#taskbar-items {
    flex-grow: 1;
    display: flex;
    gap: 2px;
    height: 35px;
}

.taskbar-item {
    background: var(--taskbar-bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: black;
    padding: 2px 10px;
    cursor: pointer;
    max-width: 150px;
    font-size: 0.8rem;
    height: 100%;
}

.taskbar-item.active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #e0e0e0;
    font-weight: bold;
}

#system-tray {
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 2px 10px;
    font-size: 0.75rem;
    background: var(--taskbar-bg);
    min-width: 150px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

/* Desktop Icons */
.desktop-icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    text-shadow: 1px 1px 1px black;
    text-align: center;
    font-size: 0.8rem;
    padding: 5px;
}

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

.desktop-icon img, .desktop-icon .icon-placeholder {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

.icon-placeholder {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

/* Window Styles */
.window {
    position: absolute;
    background: var(--window-bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 1px 1px 0px #000000;
    display: flex;
    flex-direction: column;
    z-index: 10;
    min-width: 200px;
    min-height: 150px;
}

.window.minimized {
    display: none !important;
}

.title-bar {
    background: var(--titlebar-bg);
    color: var(--titlebar-text);
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-weight: bold;
    font-size: 0.9rem;
}

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

.window-btn {
    width: 16px;
    height: 14px;
    background: var(--taskbar-bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.window-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.btn-close::after { content: '×'; }
.btn-min::after { content: '_'; }
.btn-max::after { content: '□'; }

.window-content {
    flex-grow: 1;
    padding: 10px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 2px;
    background: white;
    overflow: auto;
}

/* Start Menu */
#start-menu {
    position: absolute;
    bottom: 32px;
    left: 2px;
    width: 200px;
    background: var(--window-bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    z-index: 1001;
    display: flex;
}

.start-menu-sidebar {
    width: 25px;
    background: linear-gradient(to bottom, #808080, #000080);
    color: white;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 10px 5px;
    font-weight: bold;
    font-size: 1.2rem;
}

.start-menu-content {
    flex-grow: 1;
    padding: 2px;
}

.start-menu-items button {
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
}

.start-menu-items button:hover {
    background: #000080;
    color: white;
}

.hidden { display: none !important; }