/* Core OS Elements: Desktop, Taskbar, Start Menu, Context Menus, and Base Classes */

body {
    font-family: Tahoma, 'Trebuchet MS', 'MS Sans Serif', sans-serif;
    background-color: #3A6EA5; 
    background-image: url('../Windows XP Icons/bliss_bg.png'); /* Corrected Default OS Path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #000;
    margin: 0;
    height: 100vh;
    width: 100vw;
    user-select: none;
    overflow: hidden; 
    -webkit-font-smoothing: none; 
}

/* --- POWER SCREENS (Z-INDEX 99999) --- */
#black-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: black; color: #FFAAAA; font-family: Tahoma;
    display: none; align-items: center; justify-content: center;
    text-align: center; flex-direction: column; font-size: 24px; z-index: 999999;
}

#bios-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: black; color: white; font-family: 'Courier New', monospace;
    display: none; padding: 20px; box-sizing: border-box; font-size: 16px; z-index: 999998;
}

#login-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 30% 30%, #6A93EE 0%, #355BC1 100%);
    display: none; flex-direction: column; z-index: 999997;
    font-family: 'Tahoma', Arial, sans-serif;
}
.login-header { 
    height: 90px; 
    background: linear-gradient(to bottom, #0033A0 0%, #001B6B 100%); 
    position: relative;
}
.login-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(to right, transparent 0%, #FFA800 20%, #FFA800 80%, transparent 100%);
}
.login-middle { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 10%; gap: 60px; }
.login-left-panel { color: white; text-align: right; text-shadow: 1px 1px 3px rgba(0,0,0,0.7); }
.login-divider { width: 2px; height: 350px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.7), transparent); }
.login-right-panel { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 50px; overflow-y: hidden; padding-bottom: 50px; }
.login-user { 
    display: flex; align-items: center; gap: 15px; cursor: pointer; padding: 12px; border-radius: 5px; 
    background: transparent;
    border: 1px solid transparent;
    width: 320px;
    box-shadow: none;
    transition: all 0.2s;
}
.login-user:hover { 
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3); 
    transform: scale(1.02);
}
.login-footer { 
    height: 80px; 
    background: linear-gradient(to top, #0033A0 0%, #001B6B 100%); 
    position: relative;
    display: flex; align-items: center; padding: 0 40px; 
}
.login-footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(to right, transparent 0%, #FFA800 20%, #FFA800 80%, transparent 100%);
}

/* --- THEME OVERRIDES --- */
/* Default (Blue) */
body.theme-blue .title-bar { background: linear-gradient(to bottom, #0058EE 0%, #3593FF 4%, #288EFF 6%, #127DFF 8%, #036BFF 10%, #0262EE 14%, #0054E3 20%, #0055E5 24%, #005FEF 56%, #0045B8 66%, #0054E3 76%, #0055E5 86%, #0045B8 92%, #0054E3 94%, #0055E5 100%); }
body.theme-blue .taskbar { background: linear-gradient(to bottom, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #1941a5 100%); }
body.theme-blue .window { border: 3px solid #0055E5; }

/* Silver Theme */
body.theme-silver .title-bar { background: linear-gradient(to bottom, #A8B1CB 0%, #C8CFE5 10%, #909CC3 90%, #7683AC 100%); color: #000; text-shadow: none; }
body.theme-silver .title-bar.inactive { background: linear-gradient(to bottom, #D2D5E0 0%, #E3E6EE 10%, #C1C6D6 90%, #B0B5C6 100%); }
body.theme-silver .taskbar { background: linear-gradient(to bottom, #96A3C6 0%, #B7C3E1 10%, #7B8CB6 90%, #6878A4 100%); }
body.theme-silver .start-menu-header { background: linear-gradient(to bottom, #A8B1CB, #7683AC); }
body.theme-silver .task-item { background: linear-gradient(to bottom, #C4CCDF 0%, #94A2C6 100%); border-color: #7B8CB6; color: #000; }
body.theme-silver .task-item.active { background: linear-gradient(to bottom, #8C9CC2 0%, #6E82AE 100%); color: white; }
body.theme-silver .window { border: 3px solid #7683AC; }

/* Olive Green Theme */
body.theme-olive .title-bar { background: linear-gradient(to bottom, #A9B26D 0%, #B9C485 10%, #A0A865 90%, #878E4B 100%); }
body.theme-olive .title-bar.inactive { background: linear-gradient(to bottom, #C2C6A3 0%, #D4D8BA 10%, #B7BC98 90%, #A7AD84 100%); }
body.theme-olive .taskbar { background: linear-gradient(to bottom, #9EAA63 0%, #B4C274 10%, #869251 90%, #758045 100%); }
body.theme-olive .start-menu-header { background: linear-gradient(to bottom, #A9B26D, #878E4B); }
body.theme-olive .task-item { background: linear-gradient(to bottom, #C3C9A0 0%, #9FA871 100%); border-color: #869251; color: #000; }
body.theme-olive .task-item.active { background: linear-gradient(to bottom, #8F995D 0%, #717C43 100%); color: white; }
body.theme-olive .window { border: 3px solid #878E4B; }

/* Classic Theme (Windows 2000 / Retro Gray) */
body.theme-classic .title-bar { background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%); color: #fff; text-shadow: none; font-family: 'Tahoma', sans-serif; font-weight: bold; }
body.theme-classic .title-bar.inactive { background: linear-gradient(90deg, #808080 0%, #c0c0c0 100%); color: #d4d0c8; }
body.theme-classic .taskbar { background: #d4d0c8; border-top: 2px solid #fff; box-shadow: inset 0 1px 0 #fff; }
body.theme-classic .start-button { background: #d4d0c8; color: #000; font-weight: bold; border: 2px solid; border-color: #fff #404040 #404040 #fff; border-radius: 0; box-shadow: inset 1px 1px 0 #fff; }
body.theme-classic .start-menu-header { background: #808080; }
body.theme-classic .task-item { background: #d4d0c8; border: 2px solid; border-color: #fff #404040 #404040 #fff; border-radius: 0; color: #000; box-shadow: inset 1px 1px 0 #fff; }
body.theme-classic .task-item.active { background: #c0c0c0; border-color: #404040 #fff #fff #404040; box-shadow: inset -1px -1px 0 #fff; }
body.theme-classic .window { border: 3px solid #d4d0c8; border-radius: 0; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #404040, 1px 1px 0 #000; }
body.theme-classic button { background: #d4d0c8; border: 2px solid; border-color: #fff #404040 #404040 #fff; border-radius: 0; color: #000; }
body.theme-classic button:active { border-color: #404040 #fff #fff #404040; }
/* ----------------------- */

#desktop {
    width: 100%;
    height: calc(100% - 30px);
    position: relative;
    padding: 10px;
    box-sizing: border-box;
    display: block; 
}

.desktop-icon {
    width: 75px;
    height: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: default;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-size: 11px;
    text-align: center;
    padding: 5px;
    border-radius: 0px;
    border: 1px solid transparent;
    position: absolute; 
    box-sizing: border-box;
}

.desktop-icon:hover { background-color: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 0; }
.desktop-icon.selected { background-color: rgba(49, 106, 197, 0.6); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 0; }
.desktop-icon img { width: 32px; height: 32px; margin-bottom: 5px; pointer-events: none; image-rendering: pixelated; }
.desktop-icon svg { margin-bottom: 5px; pointer-events: none; }
.sys-icon-small { width: 16px; height: 16px; display: inline-block; image-rendering: pixelated;}

/* Screensaver */
#screensaver-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 200000; background: black; display: none; cursor: none;
}

/* Custom Dialog Modal */
#xp-dialog-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: transparent; z-index: 150000; display: none;
    align-items: center; justify-content: center;
}

/* Taskbar & Z-Indexes Base */
.taskbar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 30px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100000; border-top: 1px solid #000;
}

.start-button {
    height: 100%; width: 110px;
    background: linear-gradient(to bottom, #3E9A4B 0%, #4CB856 10%, #3E9A4B 20%, #358B40 90%, #2A6E33 100%);
    border-radius: 0 10px 15px 0; display: flex; align-items: center; justify-content: center;
    color: white; font-style: italic; font-weight: bold; font-size: 18px; cursor: pointer;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5); text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    border-right: 1px solid rgba(255,255,255,0.3);
}

.start-button:active { background: linear-gradient(to bottom, #2A6E33 0%, #358B40 10%, #3E9A4B 90%, #4CB856 100%); }
.taskbar-tasks { flex: 1; display: flex; padding-left: 10px; gap: 5px; align-items: center; }

.task-item {
    background: linear-gradient(to bottom, #3C81F3 0%, #2562D9 100%);
    border: 1px solid #1E4AA8; border-radius: 3px; color: white; padding: 4px 10px;
    font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 5px;
    min-width: 100px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-item:hover { background: linear-gradient(to bottom, #4E8FF5 0%, #3273E6 100%); }
.task-item.active { background: linear-gradient(to bottom, #1E52C5 0%, #153A90 100%); border: 1px solid #0f2b93; box-shadow: inset 0 0 3px rgba(0,0,0,0.5); }

.system-tray {
    height: 100%; background: linear-gradient(to bottom, #0E83D6 0%, #1197F4 10%, #0E83D6 20%, #0B64A4 90%, #084978 100%);
    border-left: 1px solid #1941a5; display: flex; align-items: center; padding: 0 15px; color: white;
    font-size: 11px; box-shadow: inset 1px 0 2px rgba(255,255,255,0.3);
}

/* Start Menu */
#start-menu {
    position: fixed; bottom: 30px; left: 0; width: 380px; background-color: #fff; border: 1px solid #003B91;
    border-radius: 5px 5px 0 0; box-shadow: 2px -2px 6px rgba(0,0,0,0.5); display: none; flex-direction: column; z-index: 100001;
}
.start-menu-header {
    background: linear-gradient(to bottom, #1263D7 0%, #0640A0 100%);
    color: white; padding: 6px 10px; font-weight: bold; font-size: 14px;
    display: flex; align-items: center; border-radius: 4px 4px 0 0;
    box-shadow: inset 0px 1px 1px rgba(255,255,255,0.4);
}
.start-menu-header img {
    border: 2px solid white; border-radius: 3px; width: 42px; height: 42px; margin-right: 10px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.start-menu-body {
    display: flex; border-top: 2px solid #F06A15; border-left: 1px solid #003B91; border-right: 1px solid #003B91;
    background: #fff; min-height: 380px;
}
.start-menu-left {
    width: 200px; display: flex; flex-direction: column; background: #fff; padding-bottom: 2px;
}
.start-menu-right {
    width: 180px; padding: 5px 0; display: flex; flex-direction: column; background: #D3E5FA; border-left: 1px solid #95B4E8;
}
.start-menu-item {
    padding: 6px 8px; cursor: pointer; font-size: 11px; color: #000; display: flex; align-items: center;
}
.start-menu-item:hover {
    background-color: #316AC5; color: white;
}
.start-menu-item:hover span {
    color: white !important;
}
.start-menu-right .start-menu-item span {
    color: #00136B; font-weight: bold;
}
.start-menu-divider {
    height: 1px; background: linear-gradient(to right, transparent, #D3D3D3 10%, #D3D3D3 90%, transparent); margin: 4px 8px;
}
.start-menu-divider.right-divider {
    background: linear-gradient(to right, transparent, #95B4E8 10%, #95B4E8 90%, transparent); margin: 4px 10px;
}
.all-programs-btn {
    border-top: 1px solid #ECE9D8; background: #fff; font-size: 12px; margin-top: auto;
}
.all-programs-btn:hover {
    background: #fff; color: #000;
}
.all-programs-btn:hover span {
    color: #000 !important;
}
.start-menu-footer {
    background: linear-gradient(to bottom, #1263D7 0%, #0640A0 100%);
    padding: 6px; display: flex; justify-content: flex-end; align-items: center; gap: 15px;
    border-top: 1px solid #fff; border-radius: 0 0 2px 2px;
}
.start-menu-footer button {
    display: flex; align-items: center; background: transparent; border: none; color: white;
    cursor:pointer; font-size: 11px; text-shadow: 1px 1px 1px rgba(0,0,0,0.5); font-family: Tahoma;
}
.start-menu-footer button:hover {
    text-decoration: underline;
}
.start-menu-footer img {
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3); border-radius: 3px;
}
/* Context Menus & Submenus */
#context-menu {
    position: absolute; background: #fff; border: 1px solid #ACA899; box-shadow: 3px 3px 0px rgba(0,0,0,0.3);
    display: none; flex-direction: column; z-index: 100002; padding: 2px; min-width: 150px;
}
.context-item { padding: 5px 15px; font-size: 11px; cursor: pointer; display: flex; justify-content: space-between; color: black; align-items:center;}
.context-item:hover { background-color: #316AC5; color: white; }
.context-item.disabled { color: #ACA899; cursor: default; }
.context-item.disabled:hover { background-color: transparent; color: #ACA899; }
.context-divider { height: 1px; background-color: #ACA899; margin: 2px 0; }

.has-submenu { position: relative; }
.context-submenu {
    display: none; position: absolute; left: 100%; top: -3px;
    background: #fff; border: 1px solid #ACA899; box-shadow: 3px 3px 0px rgba(0,0,0,0.3);
    flex-direction: column; min-width: 150px; z-index: 100003; padding: 2px;
}
.has-submenu:hover .context-submenu { display: flex; }
.has-submenu:hover { background-color: #316AC5; color: white; }
.menu-check { display: inline-block; width: 14px; margin-right: 5px; font-weight: 900; color: #000000 !important; font-size: 12px; font-family: sans-serif; }
.context-item:hover .menu-check { color: #FFFFFF !important; }

/* Balloons */
#xp-balloon {
    position: fixed; bottom: 40px; right: 15px; background: #FFFFE1; border: 1px solid #000; border-radius: 7px;
    padding: 10px 15px; box-shadow: 2px 2px 5px rgba(0,0,0,0.4); z-index: 9999999; display: none; font-family: Tahoma; max-width: 250px;
}
#xp-balloon::after { content: ''; position: absolute; bottom: -10px; right: 20px; border-width: 10px 10px 0 0; border-style: solid; border-color: #FFFFE1 transparent transparent transparent; }
#xp-balloon::before { content: ''; position: absolute; bottom: -12px; right: 19px; border-width: 11px 11px 0 0; border-style: solid; border-color: #000 transparent transparent transparent; }
#balloon-title { font-weight: bold; font-size: 12px; margin-bottom: 5px; color: #000; }
#balloon-text { font-size: 11px; color: #333; }
.close-btn { position: absolute; top: 2px; right: 5px; cursor: pointer; font-weight: bold; font-size: 10px; color: black; }

/* Classic Scrollbars */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #ECE9D8; border-left: 1px solid #ACA899; border-top: 1px solid #ACA899; }
::-webkit-scrollbar-thumb { background: #C0C0C0; border-top: 2px solid #FFF; border-left: 2px solid #FFF; border-bottom: 2px solid #716F64; border-right: 2px solid #716F64; }
::-webkit-scrollbar-thumb:active { border-top: 2px solid #716F64; border-left: 2px solid #716F64; border-bottom: 2px solid #FFF; border-right: 2px solid #FFF; }

/* XP Tooltip (yellow info box) */
#xp-tooltip {
    position: absolute;
    display: none;
    background: #FFFFE1;
    border: 1px solid #000;
    padding: 3px 6px;
    font-family: Tahoma, sans-serif;
    font-size: 11px;
    color: #000;
    z-index: 200001;
    max-width: 250px;
    pointer-events: none;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    white-space: normal;
}

/* Window Minimize / Restore Animations */
.window.minimizing {
    animation: minimizeAnim 200ms ease-in forwards;
}
.window.restoring {
    animation: restoreAnim 200ms ease-out;
}

@keyframes minimizeAnim {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.1) translateY(100vh); opacity: 0; }
}
@keyframes restoreAnim {
    0% { transform: scale(0.1) translateY(100vh); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* File Properties Window */
.prop-row {
    display: flex;
    padding: 4px 0;
    font-family: Tahoma, sans-serif;
    font-size: 11px;
    border-bottom: 1px solid #ECE9D8;
}
.prop-label {
    width: 90px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}
.prop-value {
    flex: 1;
    color: #000;
    word-break: break-all;
}

/* Title bar inactive state */
.title-bar.inactive {
    background: linear-gradient(to bottom, #7996C8 0%, #A4BBD8 10%, #7996C8 90%, #6682AE 100%);
}

/* Control Panel Items */
.cp-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 220px;
    height: auto;
    padding: 10px;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid transparent;
    gap: 12px;
    background: #fdfdfd;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.cp-item:hover {
    background-color: #E8F1FC;
    border: 1px solid #316AC5;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.cp-item img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.cp-item span {
    font-family: Tahoma, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #003399;
    text-align: left;
    line-height: 1.2;
}

/* Tabs System */
.tabs {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    border-bottom: 1px solid #ACA899;
    padding: 0 5px;
    margin-bottom: 10px;
    scrollbar-width: thin;
}

.tab {
    padding: 4px 12px;
    background: #ECE9D8;
    border: 1px solid #ACA899;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    font-size: 11px;
    cursor: pointer;
    margin-right: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    top: 1px;
    z-index: 1;
}

.tab.active {
    background: #FFF;
    border-bottom: 2px solid #FFF;
    font-weight: bold;
    z-index: 2;
    top: 0;
    padding-bottom: 5px;
}

.tab:hover:not(.active) {
    background: #F4F2E8;
}

.tab img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

/* File Properties Dialog */
#properties-window {
    background: #ECE9D8;
}

.tab-pane {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}
.resize-handle

 position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; cursor: se-resize; z-index: 10; 

\n/* Help Center Global Typography */\n#help-content-right {\n    font-family: Tahoma, Arial, sans-serif !important;\n    font-size: 12px !important;\n    line-height: 1.5 !important;\n    color: #000 !important;\n}\n#help-content-right h2 {\n    color: #E56717 !important;\n    font-size: 18px !important;\n    margin-top: 0 !important;\n    margin-bottom: 10px !important;\n    border-bottom: 1px solid #ACA899 !important;\n    padding-bottom: 5px !important;\n}\n#help-content-right h3 {\n    color: #215DC6 !important;\n    font-size: 14px !important;\n    margin-top: 15px !important;\n    margin-bottom: 8px !important;\n    border-bottom: 1px solid #ACA899 !important;\n    padding-bottom: 3px !important;\n}\n#help-content-right h4 {\n    color: #494949 !important;\n    font-size: 13px !important;\n    margin-top: 10px !important;\n    margin-bottom: 5px !important;\n}\n#help-content-right p {\n    margin-bottom: 10px !important;\n}\n#help-content-right ul {\n    margin-top: 5px !important;\n    margin-bottom: 10px !important;\n    padding-left: 25px !important;\n}\n#help-content-right li {\n    margin-bottom: 5px !important;\n}\n#help-content-right a {\n    color: #003399 !important;\n    text-decoration: none !important;\n}\n#help-content-right a:hover {\n    text-decoration: underline !important;\n}\n#help-content-right code {\n    background: #f0f0f0 !important;\n    padding: 2px 4px !important;\n    border: 1px solid #ccc !important;\n    font-family: monospace !important;\n    font-size: 11px !important;\n}\n
.menu-check-icon { display: inline-block; width: 4px; height: 8px; border: solid black; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-left: 3px; margin-top: -2px; }
.context-item:hover .menu-check-icon { border-color: white; }
