:root {
    --desktop-bg: #008080;
    --window-bg: #C0C0C0;
    --light-highlight: #FFFFFF;
    --dark-shadow: #808080;
    --deep-shadow: #000000;
    --title-bar-active: #000080;
    --title-bar-inactive: #808080;
    --text-color: #000000;
    --selection-blue: #000080;
    --status-green: #008000;
    --warning-yellow: #808000;
    --error-red: #800000;
    --taskbar-height: 36px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    color: var(--text-color);
}

/* Bevel Styles */
.outset-bevel {
    border-top: 2px solid var(--light-highlight);
    border-left: 2px solid var(--light-highlight);
    border-right: 2px solid var(--deep-shadow);
    border-bottom: 2px solid var(--deep-shadow);
    box-shadow: inset 1px 1px 0 var(--window-bg), 
                inset -1px -1px 0 var(--dark-shadow);
}

.inset-bevel {
    border-top: 2px solid var(--dark-shadow);
    border-left: 2px solid var(--dark-shadow);
    border-right: 2px solid var(--light-highlight);
    border-bottom: 2px solid var(--light-highlight);
    box-shadow: inset 1px 1px 0 var(--deep-shadow), 
                inset -1px -1px 0 var(--window-bg);
}

.button-bevel {
    border-top: 1px solid var(--light-highlight);
    border-left: 1px solid var(--light-highlight);
    border-right: 1px solid var(--deep-shadow);
    border-bottom: 1px solid var(--deep-shadow);
    background: var(--window-bg);
    padding: 2px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-bevel:active {
    border-top: 1px solid var(--deep-shadow);
    border-left: 1px solid var(--deep-shadow);
    border-right: 1px solid var(--light-highlight);
    border-bottom: 1px solid var(--light-highlight);
    padding: 3px 5px 1px 7px;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: #00FF00;
    font-family: "Courier New", monospace;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.boot-content pre {
    line-height: 1.5;
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* Desktop */
.desktop {
    background-color: var(--desktop-bg);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><rect width="1" height="1" fill="rgba(0,0,0,0.05)"/></svg>');
    height: calc(100% - var(--taskbar-height));
    width: 100%;
    position: relative;
    overflow: hidden;
}

.desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(auto-fill, 80px);
    grid-auto-flow: column;
    padding: 10px;
    height: 100%;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.icon:focus, .icon.selected {
    outline: none;
}

.icon:focus .icon-label, .icon.selected .icon-label {
    background-color: var(--selection-blue);
    color: white;
    outline: 1px dotted white;
}

.icon:focus .icon-image, .icon.selected .icon-image {
    filter: brightness(0.7) sepia(1) hue-rotate(200deg) saturate(2);
}

.icon-image {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-label {
    color: white;
    font-size: 11px;
    padding: 1px 3px;
    text-shadow: 1px 1px 1px black;
    word-break: break-word;
    max-width: 75px;
}

/* Icon Assets (CSS/SVG) */
.my-computer-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="4" y="4" width="24" height="18" fill="%23C0C0C0" stroke="black" stroke-width="1"/><rect x="6" y="6" width="20" height="14" fill="white" stroke="black" stroke-width="1"/><rect x="2" y="24" width="28" height="4" fill="%23808080" stroke="black" stroke-width="1"/></svg>'); }
.services-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="4" y="6" width="24" height="20" fill="%23C0C0C0" stroke="black" stroke-width="1"/><rect x="6" y="8" width="20" height="4" fill="%23808080"/><rect x="6" y="14" width="20" height="4" fill="%23808080"/><rect x="6" y="20" width="20" height="4" fill="%23808080"/></svg>'); }
.network-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="10" y="4" width="12" height="8" fill="%23C0C0C0" stroke="black" stroke-width="1"/><rect x="4" y="20" width="8" height="6" fill="%23C0C0C0" stroke="black" stroke-width="1"/><rect x="20" y="20" width="8" height="6" fill="%23C0C0C0" stroke="black" stroke-width="1"/><path d="M16 12 L16 18 M8 18 L24 18 M8 18 L8 20 M24 18 L24 20" stroke="black" stroke-width="1"/></svg>'); }
.readme-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M6 4 H20 L26 10 V28 H6 Z" fill="white" stroke="black" stroke-width="1"/><path d="M20 4 V10 H26" fill="none" stroke="black" stroke-width="1"/><rect x="10" y="14" width="12" height="1" fill="black"/><rect x="10" y="18" width="12" height="1" fill="black"/><rect x="10" y="22" width="12" height="1" fill="black"/></svg>'); }
.recycle-bin-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M8 8 H24 V28 H8 Z" fill="%23C0C0C0" stroke="black" stroke-width="1"/><path d="M6 6 H26 V8 H6 Z" fill="%23C0C0C0" stroke="black" stroke-width="1"/><path d="M12 4 H20 V6 H12 Z" fill="%23C0C0C0" stroke="black" stroke-width="1"/></svg>'); }

/* Windows */
.window {
    position: absolute;
    background: var(--window-bg);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.window-title-bar {
    background: var(--title-bar-inactive);
    color: #C0C0C0;
    padding: 3px 3px 3px 5px;
    display: flex;
    align-items: center;
    user-select: none;
}

.window.active .window-title-bar {
    background: var(--title-bar-active);
    color: white;
}

.window-title {
    flex-grow: 1;
    font-weight: bold;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.window-control {
    width: 16px;
    height: 14px;
    font-size: 9px;
    font-weight: bold;
}

.window-body {
    padding: 10px;
    flex-grow: 1;
    overflow: auto;
}

.window-status-bar {
    border-top: 1px solid var(--dark-shadow);
    padding: 2px 5px;
    font-size: 11px;
    background: var(--window-bg);
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--taskbar-height);
    background: var(--window-bg);
    border-top: 2px solid var(--light-highlight);
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 1000;
}

.start-button {
    height: 28px;
    padding: 2px 6px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 2px solid var(--light-highlight);
    border-left: 2px solid var(--light-highlight);
    border-right: 2px solid var(--deep-shadow);
    border-bottom: 2px solid var(--deep-shadow);
    background: var(--window-bg);
    cursor: pointer;
}

.start-button:active, .start-button.active {
    border-top: 2px solid var(--deep-shadow);
    border-left: 2px solid var(--deep-shadow);
    border-right: 2px solid var(--light-highlight);
    border-bottom: 2px solid var(--light-highlight);
    padding: 3px 5px 1px 7px;
}

.start-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect width="16" height="16" fill="%23C0C0C0"/><path d="M2 2 H7 V7 H2 Z" fill="%23FF0000"/><path d="M9 2 H14 V7 H9 Z" fill="%2300FF00"/><path d="M2 9 H7 V14 H2 Z" fill="%230000FF"/><path d="M9 9 H14 V14 H9 Z" fill="%23FFFF00"/></svg>');
}

.taskbar-apps {
    flex-grow: 1;
    display: flex;
    gap: 4px;
    margin: 0 10px;
    overflow-x: auto;
    height: 100%;
    align-items: center;
}

.taskbar-app {
    width: 150px;
    height: 28px;
    font-size: 11px;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-app.active {
    background: #e0e0e0;
    border-top: 2px solid var(--deep-shadow);
    border-left: 2px solid var(--deep-shadow);
    border-right: 2px solid var(--light-highlight);
    border-bottom: 2px solid var(--light-highlight);
    font-weight: bold;
}

.system-tray {
    border-top: 1px solid var(--dark-shadow);
    border-left: 1px solid var(--dark-shadow);
    border-right: 1px solid var(--light-highlight);
    border-bottom: 1px solid var(--light-highlight);
    display: flex;
    align-items: center;
    padding: 2px 6px;
    gap: 6px;
}

.tray-icon {
    width: 16px;
    height: 16px;
    background-size: contain;
}

.status-tray.online { background-color: var(--status-green); width: 8px; height: 8px; border-radius: 50%; }

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: var(--taskbar-height);
    left: 2px;
    width: 180px;
    background: var(--window-bg);
    border-top: 2px solid var(--light-highlight);
    border-left: 2px solid var(--light-highlight);
    border-right: 2px solid var(--deep-shadow);
    border-bottom: 2px solid var(--deep-shadow);
    display: flex;
    z-index: 1001;
}

.start-menu-sidebar {
    width: 25px;
    background: linear-gradient(to top, #000080, #1084d0);
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

.sidebar-text {
    color: #C0C0C0;
    font-weight: bold;
    transform: rotate(-90deg);
    transform-origin: bottom left;
    white-space: nowrap;
    margin-left: 20px;
    font-size: 14px;
}

.sidebar-text span { color: white; }

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

.start-menu-content .menu-item {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.start-menu-content .menu-item:hover {
    background: var(--selection-blue);
    color: white;
}

.menu-divider {
    height: 1px;
    background: var(--dark-shadow);
    border-bottom: 1px solid var(--light-highlight);
    margin: 4px 2px;
}

/* Context Menu */
.context-menu {
    position: absolute;
    width: 120px;
    background: var(--window-bg);
    border-top: 1px solid var(--light-highlight);
    border-left: 1px solid var(--light-highlight);
    border-right: 1px solid var(--deep-shadow);
    border-bottom: 1px solid var(--deep-shadow);
    z-index: 2000;
    padding: 2px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.context-menu .menu-item {
    padding: 4px 10px;
    cursor: pointer;
}

.context-menu .menu-item:hover:not(.disabled) {
    background: var(--selection-blue);
    color: white;
}

.context-menu .menu-item.disabled {
    color: var(--dark-shadow);
    cursor: default;
}

/* Content Styles */
.notepad-content {
    background: white;
    color: black;
    font-family: "Courier New", monospace;
    padding: 10px;
    height: 100%;
    border: 1px solid var(--dark-shadow);
    white-space: pre-wrap;
}

.service-list {
    width: 100%;
    border-collapse: collapse;
}

.service-list th {
    text-align: left;
    background: var(--window-bg);
    border: 1px solid var(--dark-shadow);
    padding: 4px;
    font-size: 11px;
}

.service-list td {
    padding: 6px 4px;
    border-bottom: 1px solid #e0e0e0;
}

.status-pill {
    font-size: 9px;
    padding: 1px 4px;
    border: 1px solid black;
    font-weight: bold;
}

.status-online { color: var(--status-green); }
.status-private { color: var(--warning-yellow); }
.status-offline { color: var(--error-red); }

.retro-table {
    width: 100%;
    background: white;
    border: 2px solid var(--dark-shadow);
}

/* Network Diagram */
.network-tree {
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 70px);
        grid-template-rows: repeat(auto-fill, 70px);
    }
    
    .window {
        width: 95% !important;
        height: 80% !important;
        left: 2.5% !important;
        top: 5% !important;
    }
    
    .taskbar-app {
        width: 40px;
    }
    
    .taskbar-app span {
        display: none;
    }
}
