:root {
    --bg-color: #0d0216;
    --win-bg: #240046;
    --win-header-start: #10002b;
    --win-header-end: #5a189a;
    --text-color: #e0aaff;
    --border-light: #9d4edd;
    --border-dark: #10002b;
    --gray-face: #3c096c;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-color);
    user-select: none; 
}
#bg-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2; 
    opacity: 0.5;
    pointer-events: none;
}

#cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    opacity: 0.95;
    z-index: -1; 
    pointer-events: none;
}

#desktop {
    width: 100%;
    height: calc(100% - 40px);
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px dotted transparent;
}

.desktop-icon:hover {
    border: 1px dotted var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-img {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e0aaff, #7b2cbf);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); /* Simple square default */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.icon-folder { 
    background: #9d4edd; 
    clip-path: polygon(0 0, 40% 0, 50% 15%, 100% 15%, 100% 100%, 0 100%); 
}
.icon-text { 
    background: #fff; 
    clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 100%, 0 100%, 0 0); 
}

.icon-label {
    font-size: 12px;
    text-shadow: 1px 1px #000;
    background-color: rgba(0,0,0,0.3);
    padding: 2px 4px;
    border-radius: 2px;
}

.window {
    position: absolute;
    background-color: var(--win-bg);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    min-width: 200px;
    min-height: 150px;
}

.window-header {
    background: linear-gradient(90deg, var(--win-header-start), var(--win-header-end));
    padding: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default; 
    border-bottom: 2px solid var(--border-dark);
}

.window-title {
    font-weight: bold;
    color: white;
    font-size: 14px;
    margin-left: 5px;
    pointer-events: none;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 16px;
    height: 16px;
    background-color: var(--gray-face);
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.win-btn:active {
    border-top: 1px solid var(--border-dark);
    border-left: 1px solid var(--border-dark);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.window-body {
    flex: 1;
    padding: 10px;
    overflow: auto;
    position: relative; 
}

.window.minimized {
    display: none;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 40px) !important;
}

#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: var(--gray-face);
    border-top: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 5px;
    gap: 5px;
    z-index: 9999;
}

#taskbar-list {
    display: flex;
    gap: 5px;
}

.start-btn {
    height: 28px;
    padding: 0 10px;
    background-color: var(--win-bg);
    color: #fff;
    font-weight: bold;
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
    box-shadow: inset 1px 1px 0 #fff;
    cursor: pointer;
}

.taskbar-item {
    height: 28px;
    padding: 0 10px;
    min-width: 100px;
    max-width: 150px;
    background-color: var(--win-bg);
    color: #ccc;
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    display: flex;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-item.active {
    background-color: #4b1d75;
    border-top: 2px solid var(--border-dark);
    border-left: 2px solid var(--border-dark);
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    color: #fff;
}

#start-menu {
    display: none;
    position: absolute;
    bottom: 42px;
    left: 2px;
    width: 200px;
    background-color: var(--win-bg);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
    z-index: 10000;
    flex-direction: row;
}

#start-menu.show {
    display: flex;
}

.sidebar-strip {
    width: 25px;
    background: linear-gradient(180deg, #10002b 0%, #7b2cbf 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
}

.sidebar-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: white;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
}

.menu-items {
    flex: 1;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.start-item {
    padding: 8px 10px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.start-item:hover {
    background-color: #5a189a;
    color: #fff;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-dark);
    border-bottom: 1px solid var(--border-light);
    margin: 4px 2px;
}

.taskbar-tray {
    margin-left: auto;
    border-top: 2px solid var(--border-dark);
    border-left: 2px solid var(--border-dark);
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    background-color: #190028;
    padding: 2px 10px;
    display: flex;
    align-items: center;
    height: 24px;
    margin-right: 2px;
}

#clock-display {
    font-size: 12px;
    color: #e0aaff;
}

.start-btn.active {
    border-top: 2px solid var(--border-dark);
    border-left: 2px solid var(--border-dark);
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    padding: 2px 8px 0 12px;
    background-color: #4b1d75;
}

#window-templates {
    display: none !important;
}