:root {
    --bg-dark: #12141c;
    --win-surface: #1e2230;
    --win-header-bg: #161822;
    --text-primary: #e2e4ec;
    --text-muted: #6e738c;
    --neon-violet: #bb9af7;
    --nordic-blue: #7dcfff;
    --terminal-green: #73daca;
    --danger-red: #f7768e;
}

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

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    color: var(--text-primary);
    background-color: var(--bg-dark);
}

#lockscreen {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: var(--bg-dark);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 9999;
transition: opacity 0.4s ease, transform 0.4s ease;
}

#lockscreen.hidden {
opacity: 0;
transform: translateY(-100%);
pointer-events: none;
}

#lockscreen-clock {
font-size: 3rem;
font-family: 'Press Start 2P', monospace;
color: var(--neon-violet);
margin-bottom: 40px;
user-select: none;
}

#unlock-btn {
background: transparent;
border: 2px solid var(--text-primary);
color: var(--text-primary);
font-family: 'Courier New', Courier, monospace;
font-weight: bold;
font-size: 1rem;
padding: 12px 24px;
cursor: pointer;
letter-spacing: 2px;
transition: all 0.2s ease;
}

#unlock-btn:hover {
background: var(--text-primary);
color: var(--bg-dark);
}

#desktop {
width: 100vw;
height: 100vh;
background-color: var(--bg-dark);
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
background-size: 32px 32px;
position: relative;
}

#clock {
position: absolute;
top: 30px;
left: 40px;
font-size: 2.2rem;
font-family: 'Press Start 2P', monospace;
color: var(--nordic-blue);
letter-spacing: -1px;
opacity: 0.65;
user-select: none;
border-bottom: 2px dashed rgba(125, 207, 255, 0.2);
padding-bottom: 5px;
}

.box {
    position: absolute;
    width: 340px;
    background: var(--win-surface);
    border-top: 3px solid var(--neon-violet);
    border-left: 2px solid #2a2f45;
    border-right: 2px solid #161822;
    border-bottom: 4px solid #10121a;
    border-radius: 2px;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 1;
}

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

.box-header {
    background: var(--win-header-bg);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-bottom: 1px solid #2a2f45;
    user-select: none;
}

.box-header span {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

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

.minimize, .close {
    background: transparent;
    font-family: monospace;
    font-weight: bold;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 11px;
    line-height: 14px;
    text-align: center;
}

.minimize {
    border: 1px solid var(--nordic-blue);
    color: var(--nordic-blue);
}

.minimize:hover {
    background: var(--nordic-blue);
    color: var(--bg-dark);
}

.close {
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
}

.close:hover {
    background: var(--danger-red);
    color: var(--bg-dark);
}

.box-body {
    padding: 16px;
    min-height: 120px;
    font-size: 13px;
    line-height: 1.5;
}

.box-body h3 {
    color: var(--neon-violet);
    font-size: 15px;
    margin-bottom: 8px;
    text-decoration: underline;
}

textarea {
    width: 100%;
    height: 110px;
    background: #161822;
    border: 1px solid #2a2f45;
    border-radius: 0px;
    color: var(--text-primary);
    padding: 8px;
    resize: none;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
}

textarea:focus {
    border-color: var(--neon-violet);
}

.term-container {
    display: flex;
    flex-direction: column;
    height: 180px;
    font-family: monospace;
    font-size: 13px;
    color: var(--terminal-green);
}

.term-output {
    flex-grow: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    padding-right: 5px;
}

.term-input-line {
    display: flex;
    align-items: center;
    border-top: 1px dashed rgba(115, 218, 202, 0.1);
    padding-top: 5px;
}

.term-prompt {
    color: #eed49f;
    margin-right: 8px;
    user-select: none;
}

.term-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: monospace;
    font-size: 13px;
    outline: none;
    flex-grow: 1;
}

.calc-screen {
    width: 100%;
    height: 40px;
    background: #161822;
    border: 1px solid #2a2f45;
    color: #ffffff;
    font-family: monospace;
    font-size: 1.2rem;
    text-align: right;
    padding: 8px;
    margin-bottom: 12px;
    outline: none;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    background: #161822;
    border: 1px solid #2a2f45;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1rem;
    padding: 12px;
    cursor: pointer;
}

.calc-btn:hover {
    background: var(--neon-violet);
    color: var(--bg-dark);
}

.calc-btn.op {
    border-color: var(--nordic-blue);
    color: var(--nordic-blue);
}

.calc-btn.op:hover {
    background: var(--nordic-blue);
    color: var(--bg-dark);
}

.task-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border: 1px dashed var(--text-muted);
    margin-bottom: 8px;
    font-size: 12px;
}

.kill-btn {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    cursor: pointer;
    font-family: monospace;
    padding: 2px 6px;
    font-size: 11px;
}

.kill-btn:hover {
    background: var(--danger-red);
    color: var(--bg-dark);
}

#start-menu {
position: absolute;
bottom: 60px;
left: 20px;
width: 240px;
background: var(--win-surface);
border: 2px solid var(--text-muted);
padding: 4px 0;
box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
z-index: 1000;
}

.menu-item {
    padding: 8px 14px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-primary);
}

.menu-item:hover {
    background: var(--neon-violet);
    color: var(--bg-dark);
    font-weight: bold;
}

#taskbar {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 44px;
background: #161822;
border-top: 2px solid #2a2f45;
display: flex;
align-items: center;
padding: 0 16px;
z-index: 100;
}

.start-btn {
    background: transparent;
    border: 1px solid var(--neon-violet);
    color: var(--neon-violet);
    font-family: monospace;
    font-weight: bold;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.start-btn:hover {
    background: var(--neon-violet);
    color: var(--bg-dark);
}

#running-apps {
display: flex;
gap: 8px;
margin-left: 16px;
flex-grow: 1;
}

.taskbar-tab {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    font-family: monospace;
    padding: 4px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-tab.active-tab {
    border-color: var(--neon-violet);
    color: var(--neon-violet);
    font-weight: bold;
}

.system-tray {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
}
