:root {
    --theme-color: #0078d7;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

#desktop {
    width: 100vw;
    height: calc(100vh - 40px);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    position: relative;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
}

.icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px;
    color: white;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.icon-img {
    width: 48px;
    height: 48px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.icon-label {
    text-align: center;
    font-size: 14px;
    text-shadow: 1px 1px 2px black;
}

#taskbar {
    width: 100vw;
    height: 40px;
    background-color: #111;
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    color: white;
    z-index: 9999;
}

#start-button {
    background-color: var(--theme-color);
    color: white;
    border: none;
    padding: 5px 15px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
    font-weight: bold;
    border-radius: 2px;
}

#start-button:hover {
    box-shadow: inset 0 0 100px 100px rgba(0,0,0,0.1);
}

#start-button.active {
    box-shadow: inset 0 0 100px 100px rgba(0,0,0,0.2);
}

#start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 250px;
    background-color: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #444;
    border-bottom: none;
    display: none;
    flex-direction: column;
    padding: 5px 0;
    z-index: 10000;
    box-shadow: 2px -2px 10px rgba(0,0,0,0.5);
    color: white;
}

#start-search {
    width: 90%;
    margin: 5px auto 10px auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

#start-search:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--theme-color);
}

#start-search-count {
    display: none;
    padding: 0 15px 8px 15px;
    color: #b8d7ff;
    font-size: 12px;
}

#start-no-results {
    display: none;
    padding: 10px 15px;
    color: #c7c7c7;
    font-size: 13px;
    font-style: italic;
}

.start-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.1s;
}

.start-item:hover {
    background-color: rgba(255,255,255,0.1);
}

.start-item.selected {
    background-color: rgba(255,255,255,0.2);
    outline: 1px solid rgba(255, 255, 255, 0.15);
}

.start-item-label-mark {
    background: rgba(241, 196, 15, 0.35);
    color: #fff6d6;
    border-radius: 3px;
    padding: 0 2px;
}

.start-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
}

.start-divider {
    height: 1px;
    background-color: #555;
    margin: 5px 10px;
}

#taskbar-apps {
    flex-grow: 1;
    display: flex;
}

.taskbar-item {
    padding: 5px 10px;
    margin-right: 5px;
    background-color: #333;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
}

.taskbar-item:hover {
    background-color: #444;
}

.taskbar-item.active {
    background-color: #555;
    border-bottom: 2px solid var(--theme-color);
}

#clock {
    font-size: 14px;
    margin-left: 10px;
    min-width: 50px;
    text-align: right;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 2px;
}

#clock:hover {
    background-color: #333;
}

#show-desktop {
    width: 15px;
    height: 100%;
    background: transparent;
    border: none;
    border-left: 1px solid #555;
    margin-left: 10px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
}

#show-desktop:hover {
    background-color: #333;
    color: white;
}

/* Window Styles (Preparing for next step) */
#window-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    pointer-events: none; /* Let clicks pass through to icons if no window is there */
}

.window {
    position: absolute;
    background-color: #f0f0f0;
    border: 1px solid #999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* Enable interaction */
    border-radius: 4px;
    overflow: hidden;
    min-width: 200px;
    min-height: 150px;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 40px) !important;
    border-radius: 0;
    transform: none !important;
}

.title-bar {
    background-color: var(--theme-color); /* Active color */
    color: white;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    user-select: none;
    height: 30px;
    box-sizing: border-box;
}

.window.inactive .title-bar {
    background-color: #999;
}

.title-bar-text {
    font-size: 14px;
    font-weight: bold;
}

.title-bar-controls {
    display: flex;
}

.window-button {
    width: 20px;
    height: 20px;
    margin-left: 5px;
    border: none;
    background-color: transparent;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-button:hover {
    background-color: rgba(255,255,255,0.2);
}

.close-button:hover {
    background-color: #e81123;
}

.window-content {
    flex-grow: 1;
    padding: 10px;
    background-color: white;
    overflow: auto;
    font-size: 14px;
    color: black;
    display: flex;
    flex-direction: column;
}

/* Terminal Styles */
.terminal-window .window-content {
    background-color: #0c0c0c;
    color: #cccccc;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 5px;
}

.terminal-input-line {
    display: flex;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #cccccc;
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
}

/* Notepad Styles */
.notepad-area {
    width: 100%;
    height: 100%;
    resize: none;
    border: none;
    outline: none;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

/* About Styles */
.about-content {
    text-align: center;
    padding: 20px;
}

.about-content h2 {
    margin-top: 0;
    color: var(--theme-color);
}

.about-content button {
    margin-top: 20px;
    padding: 5px 20px;
    cursor: pointer;
}

/* Calculator Styles */
.calculator-window .window-content {
    background-color: #f0f0f0;
    padding: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.calc-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.calc-display {
    background-color: white;
    border: 1px solid #ccc;
    height: 40px;
    margin-bottom: 10px;
    text-align: right;
    padding: 5px 10px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-family: 'Consolas', monospace;
}

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

.calc-history {
    width: 150px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
}

.history-title {
    background: #e0e0e0;
    padding: 5px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.history-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 5px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
}

.history-item {
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.history-item .expr {
    color: #666;
}

.history-item .res {
    font-weight: bold;
    font-size: 14px;
}

.calc-btn {
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    border-radius: 3px;
    transition: background-color 0.1s;
}

.calc-btn:hover {
    background-color: #e0e0e0;
}

.calc-btn.operator {
    background-color: #f5f5f5;
    font-weight: bold;
}

.calc-btn.equals {
    background-color: #27ae60;
    color: white;
    border-color: #219150;
}

.calc-btn.equals:hover {
    background-color: #219150;
}

.calc-btn.clear {
    background-color: #e74c3c;
    color: white;
    border-color: #c0392b;
}

.calc-btn.clear:hover {
    background-color: #c0392b;
}

.minimize-button:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Paint Styles */
.paint-window .window-content {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.paint-toolbar {
    background: #f0f0f0;
    padding: 5px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.paint-toolbar button {
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}

.paint-toolbar button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.paint-toolbar button:active {
    background: #ccc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.paint-palette {
    display: flex;
    gap: 2px;
    margin: 0 5px;
}

.palette-color {
    width: 20px;
    height: 20px;
    border: 1px solid #999;
    cursor: pointer;
}

.palette-color:hover {
    border-color: #000;
    transform: scale(1.1);
}

/* Notepad Toolbar Styles */
.notepad-toolbar {
    padding: 5px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 5px;
}

.notepad-toolbar button {
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}

.notepad-toolbar button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.notepad-toolbar label {
    font-size: 12px;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    display: inline-block;
}

.notepad-toolbar label:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.notepad-area {
    border: none;
    padding: 5px;
    box-sizing: border-box;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

/* Speak App Styles */
#speak-text {
    font-size: 16px;
    line-height: 1.5;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 1000;
}

.resize-r {
    top: 0;
    right: 0;
    bottom: 5px;
    width: 5px;
    cursor: e-resize;
}

.resize-b {
    bottom: 0;
    left: 0;
    right: 5px;
    height: 5px;
    cursor: s-resize;
}

.resize-br {
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: se-resize;
    z-index: 1001;
}

@media (max-width: 768px) {
    .icon {
        width: 70px;
        height: 80px;
        margin: 5px;
    }
    #start-menu {
        width: 100%;
        bottom: 40px;
        border: none;
        border-top: 1px solid #444;
    }
    .window {
        width: 100% !important;
        height: calc(100% - 40px) !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0;
        transform: none !important;
    }
    .resize-handle {
        display: none;
    }
    .maximize-button {
        display: none;
    }
    .taskbar-item {
        padding: 5px 15px;
    }
}

/* Calendar Styles */
.calendar-window .window-content {
    background: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.calendar-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.calendar-header button {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
}

.calendar-header button:hover {
    background: #f5f5f5;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-day-header {
    font-weight: bold;
    font-size: 12px;
    color: #666;
    padding-bottom: 5px;
}

.calendar-day {
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: default;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.today {
    background: var(--theme-color);
    color: white;
    font-weight: bold;
}

.calendar-day.other-month {
    color: #ccc;
}

/* Memory Game Styles */
.memory-window .window-content {
    background: #2c3e50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.memory-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: white;
    font-family: 'Segoe UI', sans-serif;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 320px;
    height: 320px;
}

.memory-card {
    background-color: #34495e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    color: transparent; /* Hide emoji */
    transition: all 0.2s;
    user-select: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #2c3e50;
}

.memory-card:hover {
    background-color: #46627f;
    transform: translateY(-2px);
}

.memory-card.flipped {
    background-color: #ecf0f1;
    color: #2c3e50;
    transform: rotateY(0deg); /* Reset if we used rotation */
    border-color: white;
    cursor: default;
}

.memory-card.matched {
    background-color: #27ae60;
    color: white;
    border-color: #2ecc71;
    cursor: default;
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Music Player Styles */
.music-player-content label:hover {
    background: #c2185b !important;
}

.music-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Task Manager Styles */
.task-manager-window .window-content {
    padding: 0;
}

.task-row:hover {
    background-color: #e6f7ff !important;
}

/* Tetris Styles */
.tetris-window .window-content {
    background-color: #202028;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-family: 'Segoe UI', sans-serif;
}

.tetris-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tetris-canvas {
    border: 2px solid #333;
    background-color: #000;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.tetris-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 100px;
}

.tetris-score-box {
    background: #333;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.tetris-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.tetris-value {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.tetris-controls-hint {
    font-size: 11px;
    color: #888;
    margin-top: 10px;
    line-height: 1.4;
}

/* Clock App Styles */
.clock-window .window-content {
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

.clock-tabs {
    display: flex;
    background: #333;
    border-bottom: 1px solid #444;
}

.clock-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #aaa;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.clock-tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.clock-tab-btn.active {
    color: var(--theme-color);
    border-bottom: 2px solid var(--theme-color);
}

.clock-tab-content {
    flex: 1;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.clock-tab-content.active {
    display: flex;
}

.clock-display, .stopwatch-display, .timer-display {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 10px;
    font-family: 'Segoe UI', sans-serif; /* Monospace variant might be better for alignment, but Segoe UI is clean */
}

.clock-date {
    font-size: 18px;
    color: #aaa;
}

.clock-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.clock-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    min-width: 80px;
}

.clock-btn.start {
    background: #2ecc71;
    color: white;
}

.clock-btn.start:hover {
    background: #27ae60;
}

.clock-btn.stop {
    background: #e74c3c;
    color: white;
}

.clock-btn.stop:hover {
    background: #c0392b;
}

.clock-btn.reset, .clock-btn.lap {
    background: #555;
    color: white;
}

.clock-btn.reset:hover, .clock-btn.lap:hover {
    background: #666;
}

.laps-list {
    margin-top: 20px;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid #444;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-bottom: 1px solid #333;
    font-size: 14px;
    color: #ccc;
}

.lap-item:last-child {
    border-bottom: none;
}

.timer-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.timer-input {
    background: #333;
    border: 1px solid #444;
    color: white;
    padding: 5px;
    border-radius: 4px;
    width: 60px;
    text-align: center;
    font-size: 18px;
}

.timer-label {
    font-size: 14px;
    color: #aaa;
}

/* Web Browser Styles */
.browser-window .window-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
}

.browser-toolbar {
    padding: 5px 10px;
    background: #e0e0e0;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 5px;
    align-items: center;
}

.browser-toolbar button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
}

.browser-toolbar button:hover {
    background-color: rgba(0,0,0,0.1);
    border-color: #aaa;
}

.browser-toolbar input {
    flex-grow: 1;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.browser-iframe {
    flex-grow: 1;
    width: 100%;
    border: none;
    background: white;
}

/* Unit Converter Styles */
.unit-converter-window .window-content {
    background-color: #f9f9f9;
    font-family: 'Segoe UI', sans-serif;
}

.converter-container select, .converter-container input {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.converter-container select:focus, .converter-container input:focus {
    outline: none;
    border-color: var(--theme-color);
}

/* Sticky Notes Styles */
.sticky-note-window {
    background-color: #fefeb3 !important;
    border: 1px solid #e0e090 !important;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.sticky-note-window .title-bar {
    background-color: #fbfb75 !important;
    color: #555 !important;
}

.sticky-note-window .window-content {
    background-color: #fefeb3 !important;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.sticky-toolbar {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 5px;
}

.sticky-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    padding: 0 5px;
}

.sticky-btn:hover {
    color: #d9534f;
}

.sticky-note-textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    resize: none;
    outline: none;
    font-family: 'Comic Sans MS', 'Marker Felt', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

/* Solitaire Styles */
.solitaire-window .window-content {
    background-color: #27ae60;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

.solitaire-board {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.solitaire-top-row {
    display: flex;
    justify-content: space-between;
    height: 110px;
    margin-bottom: 20px;
}

.solitaire-bottom-row {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
    position: relative;
}

.solitaire-deck-area, .solitaire-foundation-area {
    display: flex;
    gap: 10px;
}

.solitaire-column {
    position: relative;
    width: 70px;
    height: 100%;
}

.solitaire-slot {
    width: 70px;
    height: 100px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
}

.solitaire-card {
    width: 70px;
    height: 100px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    position: absolute; /* Default for tableau piles */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
    font-size: 16px;
}

/* Static position for stock/waste/foundation top card */
.solitaire-card.static {
    position: relative;
}

.solitaire-card:hover {
    filter: brightness(1.05);
}

.solitaire-card.selected {
    box-shadow: 0 0 0 3px #f1c40f;
    z-index: 100 !important;
}

.solitaire-card.red { color: #e74c3c; }
.solitaire-card.black { color: #2c3e50; }

.solitaire-card-back {
    background: repeating-linear-gradient(
        45deg,
        #606dbc,
        #606dbc 10px,
        #465298 10px,
        #465298 20px
    );
    border: 2px solid white;
}

.solitaire-card-top, .solitaire-card-center, .solitaire-card-bottom {
    display: flex;
    pointer-events: none;
}

.solitaire-card-top { justify-content: flex-start; }
.solitaire-card-bottom { justify-content: flex-end; transform: rotate(180deg); }
.solitaire-card-center {
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* Overlap handling in CSS?
   No, we will use inline style top: Xpx for cascading cards
   or absolute positioning logic in JS.
*/

/* Markdown Viewer Styles */
.markdown-window .window-content {
    background: white;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.markdown-window h1 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

.markdown-window h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.markdown-window a {
    color: var(--theme-color);
    text-decoration: none;
}

.markdown-window a:hover {
    text-decoration: underline;
}

.markdown-window code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
}

.markdown-window pre {
    background: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.markdown-window blockquote {
    border-left: 4px solid #ddd;
    margin: 0;
    padding-left: 15px;
    color: #666;
}

/* Pong Styles */
.pong-window .window-content {
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-family: 'Courier New', monospace;
}

/* 2048 Game Styles */
.game-2048-window .window-content {
    background-color: #faf8ef;
    color: #776e65;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
}

.game-2048-header {
    display: flex;
    justify-content: space-between;
    width: 300px;
    margin-bottom: 10px;
    align-items: center;
}

.game-2048-title {
    font-size: 30px;
    font-weight: bold;
    color: #776e65;
}

.game-2048-scores {
    display: flex;
    gap: 5px;
}

.game-2048-score-box {
    background: #bbada0;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
    text-align: center;
    min-width: 50px;
}

.game-2048-score-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #eee4da;
}

.game-2048-score-value {
    font-size: 16px;
    font-weight: bold;
}

.game-2048-container {
    background: #bbada0;
    padding: 10px;
    border-radius: 6px;
    width: 300px;
    height: 300px;
    box-sizing: border-box;
    position: relative;
    outline: none; /* remove focus ring */
}

.game-2048-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
}

.game-2048-cell {
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: bold;
    color: #776e65;
    user-select: none;
}

.game-2048-tile {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: bold;
}

.tile-2 { background: #eee4da; color: #776e65; }
.tile-4 { background: #ede0c8; color: #776e65; }
.tile-8 { background: #f2b179; color: #f9f6f2; }
.tile-16 { background: #f59563; color: #f9f6f2; }
.tile-32 { background: #f67c5f; color: #f9f6f2; }
.tile-64 { background: #f65e3b; color: #f9f6f2; }
.tile-128 { background: #edcf72; color: #f9f6f2; font-size: 24px; }
.tile-256 { background: #edcc61; color: #f9f6f2; font-size: 24px; }
.tile-512 { background: #edc850; color: #f9f6f2; font-size: 24px; }
.tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 18px; }
.tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 18px; }

.game-2048-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(238, 228, 218, 0.73);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-align: center;
}

.game-2048-msg {
    font-size: 40px;
    font-weight: bold;
    color: #776e65;
    margin-bottom: 20px;
}

.game-2048-restart-btn {
    background: #8f7a66;
    border-radius: 3px;
    padding: 10px 20px;
    color: #f9f6f2;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: bold;
    font-size: 18px;
}

/* Markdown Editor Styles */
.markdown-editor-window .window-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: white;
}

.markdown-editor-toolbar {
    padding: 5px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 5px;
    align-items: center;
}

.markdown-editor-toolbar button {
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}

.markdown-editor-toolbar button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.markdown-editor-toolbar .file-upload {
    font-size: 12px;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    display: inline-block;
}

.markdown-editor-toolbar .file-upload:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.markdown-editor-toolbar .file-upload input {
    display: none;
}

.markdown-editor-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.markdown-editor-pane {
    width: 50%;
    height: 100%;
    border: none;
    border-right: 1px solid #ccc;
    resize: none;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    background: #fafafa;
    color: #333;
}

.markdown-preview-pane {
    width: 50%;
    height: 100%;
    overflow: auto;
    padding: 20px;
    background: white;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.markdown-preview-pane h1 { border-bottom: 1px solid #eee; padding-bottom: 10px; margin-top: 0; }
.markdown-preview-pane h2 { border-bottom: 1px solid #eee; padding-bottom: 5px; }
.markdown-preview-pane a { color: var(--theme-color); text-decoration: none; }
.markdown-preview-pane a:hover { text-decoration: underline; }
.markdown-preview-pane code { background: #f0f0f0; padding: 2px 4px; border-radius: 3px; font-family: 'Consolas', monospace; font-size: 0.9em; }
.markdown-preview-pane pre { background: #f8f8f8; padding: 10px; border-radius: 5px; overflow-x: auto; }
.markdown-preview-pane blockquote { border-left: 4px solid #ddd; margin: 0; padding-left: 15px; color: #666; }

/* Sudoku Styles */
.sudoku-window .window-content {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    padding: 10px;
    font-family: 'Segoe UI', sans-serif;
}

.sudoku-grid {
    border: 2px solid #333;
    user-select: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.sudoku-cell {
    background-color: white;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    transition: background-color 0.1s;
}

.sudoku-cell:hover {
    background-color: #e3f2fd;
}

.sudoku-cell.fixed {
    color: #000;
    background-color: #e0e0e0;
}

.sudoku-cell.selected {
    background-color: #90caf9 !important;
    outline: 2px solid #2196f3;
    z-index: 10;
}

.sudoku-controls button {
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.sudoku-controls button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    border-color: #999;
}

.sudoku-controls button:active {
    background: #ccc;
    transform: translateY(1px);
}

.sudoku-header button {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

.sudoku-header button:hover {
    background: #e0e0e0;
}

/* Weather App Styles */
.weather-window .window-content {
    background: linear-gradient(to bottom, #6dd5fa, #2980b9);
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Segoe UI', sans-serif;
}

.weather-search {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
}

.weather-search input {
    flex-grow: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
}

.weather-search button {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: #fff;
    color: #2980b9;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.weather-search button:hover {
    background: #f0f0f0;
}

.weather-current {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    width: 100%;
}

.weather-temp {
    font-size: 48px;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.weather-desc {
    font-size: 18px;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.weather-location {
    font-size: 24px;
    margin-bottom: 5px;
}

.weather-details {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
}

.weather-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-detail-label {
    font-size: 12px;
    opacity: 0.8;
}

.weather-detail-value {
    font-weight: bold;
    font-size: 16px;
}

/* Voice Recorder Styles */
.voice-recorder-window .window-content {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;
    font-family: 'Segoe UI', sans-serif;
}

.vr-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.vr-visualizer {
    background: #222;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    width: 100%;
    height: 100px;
}

.vr-time-display {
    font-size: 36px;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.vr-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.vr-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.vr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.vr-btn.record {
    background: #e74c3c;
}

.vr-btn.record:hover:not(:disabled) {
    background: #c0392b;
    transform: scale(1.05);
}

.vr-btn.stop {
    background: #333;
}

.vr-btn.stop:hover:not(:disabled) {
    background: #000;
    transform: scale(1.05);
}

.record-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
}

.stop-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 2px;
}

.vr-list-container {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.vr-list-container h3 {
    margin: 0;
    padding: 10px;
    background: #eee;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    color: #555;
}

.vr-list {
    flex-grow: 1;
    overflow-y: auto;
}

.vr-recording-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.vr-recording-item:last-child {
    border-bottom: none;
}

.vr-recording-item:hover {
    background: #f9f9f9;
}

.vr-rec-info {
    display: flex;
    flex-direction: column;
}

.vr-rec-name {
    font-weight: bold;
    color: #333;
}

.vr-rec-time {
    font-size: 12px;
    color: #888;
}

.vr-rec-actions {
    display: flex;
    gap: 5px;
}

.vr-rec-actions button, .vr-rec-actions a {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.1s;
}

.vr-rec-actions button:hover, .vr-rec-actions a:hover {
    background: #eee;
}

/* Piano Styles */
.piano-window .window-content {
    background: #222;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.piano-key {
    position: absolute;
    border: 1px solid #999;
    border-radius: 0 0 5px 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    transition: background 0.1s, transform 0.05s;
    user-select: none;
}

.piano-key.white {
    width: 40px;
    height: 200px;
    background: white;
    z-index: 1;
    color: #555;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    box-sizing: border-box;
    font-weight: bold;
    font-size: 14px;
}

.piano-key.white:active, .piano-key.white.active {
    background: #e0e0e0;
    transform: translateY(2px);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.piano-key.black {
    width: 30px;
    height: 120px;
    background: black;
    z-index: 2;
}

.piano-key.black:active, .piano-key.black.active {
    background: #333;
    transform: translateY(2px);
}

/* PDF Viewer Styles */
.pdf-viewer-window .window-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #525659;
}

.pdf-toolbar {
    background: #f0f0f0;
    padding: 5px 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 10px;
    align-items: center;
}

.pdf-toolbar label {
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    border: 1px solid #999;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border-radius: 3px;
}

.pdf-toolbar label:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

/* Spreadsheet Styles */
.spreadsheet-window .window-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    font-family: 'Segoe UI', sans-serif;
}

.spreadsheet-toolbar {
    padding: 5px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 5px;
}

.spreadsheet-toolbar button, .spreadsheet-toolbar .file-upload {
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    border: 1px solid #999;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border-radius: 3px;
    text-decoration: none;
    color: black;
    display: inline-block;
}

.spreadsheet-toolbar .file-upload input {
    display: none;
}

.spreadsheet-formula-bar {
    display: flex;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #ccc;
    background: #f9f9f9;
}

.spreadsheet-formula-bar span {
    font-weight: bold;
    font-style: italic;
    color: #666;
    margin-right: 5px;
    width: 20px;
    text-align: center;
}

.spreadsheet-formula-bar input {
    flex-grow: 1;
    padding: 4px;
    border: 1px solid #ccc;
    font-family: 'Consolas', monospace;
    font-size: 14px;
}

.spreadsheet-grid-container {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

.spreadsheet-grid {
    display: table;
    border-collapse: collapse;
}

.spreadsheet-row {
    display: table-row;
}

.spreadsheet-row.header {
    background: #e0e0e0;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.spreadsheet-header-corner {
    display: table-cell;
    width: 40px;
    height: 25px;
    background: #d0d0d0;
    border: 1px solid #999;
}

.spreadsheet-header-col {
    display: table-cell;
    width: 80px;
    height: 25px;
    border: 1px solid #999;
    vertical-align: middle;
}

.spreadsheet-header-row {
    display: table-cell;
    width: 40px;
    height: 25px;
    background: #e0e0e0;
    border: 1px solid #999;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 9;
}

.spreadsheet-cell {
    display: table-cell;
    width: 80px;
    height: 25px;
    border: 1px solid #ccc;
    padding: 0 4px;
    vertical-align: middle;
    cursor: cell;
    white-space: nowrap;
    overflow: hidden;
    font-size: 13px;
}

.spreadsheet-cell:hover {
    background: #f5f5f5;
}

.spreadsheet-cell.selected {
    outline: 2px solid var(--theme-color);
    background: #e3f2fd;
    z-index: 5;
    position: relative;
}

/* Code Editor Styles */
.code-editor-window .window-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    font-family: 'Segoe UI', sans-serif;
}

.code-editor-toolbar {
    padding: 5px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 5px;
    align-items: center;
}

.code-editor-toolbar button {
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}

.code-editor-toolbar button:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.code-editor-toolbar .file-upload {
    font-size: 12px;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    display: inline-block;
}

.code-editor-toolbar .file-upload:hover {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
}

.code-editor-toolbar .file-upload input {
    display: none;
}

.code-editor-container {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
}

.code-gutter {
    width: 45px;
    background: #f0f0f0;
    border-right: 1px solid #ccc;
    text-align: right;
    padding: 10px 5px;
    color: #999;
    user-select: none;
    overflow: hidden;
    box-sizing: border-box;
    line-height: 1.5;
}

.code-textarea {
    flex-grow: 1;
    border: none;
    resize: none;
    outline: none;
    padding: 10px;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    white-space: pre;
    overflow: auto;
    color: #333;
    background: #fff;
    tab-size: 4;
}

/* Notification Area */
#notification-area {
    position: fixed;
    bottom: 50px;
    right: 10px;
    z-index: 10001; /* Above start menu and windows */
    display: flex;
    flex-direction: column-reverse; /* Newest at bottom */
    gap: 10px;
    pointer-events: none; /* Allow clicking through empty area */
}

.notification-toast {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(5px);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid var(--theme-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    width: 250px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: auto;
    font-size: 14px;
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.notification-message {
    font-size: 12px;
    color: #ccc;
    line-height: 1.4;
}

/* Pomodoro */
.pomodoro-window .window-content {
    background: linear-gradient(160deg, #fff7ef, #ffe6d2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pomodoro-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    box-sizing: border-box;
}

.pomodoro-phase {
    font-size: 18px;
    font-weight: bold;
    color: #a84300;
}

.pomodoro-time {
    font-size: 56px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #3c2a1e;
}

.pomodoro-controls,
.pomodoro-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pomodoro-controls button,
.pomodoro-presets button {
    border: none;
    background: #e67e22;
    color: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}

.pomodoro-controls button:hover,
.pomodoro-presets button:hover {
    background: #cf6d18;
}

#power-button {
    background: transparent;
    border: none;
    color: #ddd;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

#power-button:hover {
    background: #333;
    color: #fff;
}

#power-menu {
    position: absolute;
    right: 40px;
    bottom: 46px;
    display: none;
    flex-direction: column;
    min-width: 180px;
    background: rgba(24, 24, 24, 0.96);
    border: 1px solid #555;
    border-radius: 6px;
    z-index: 10001;
    overflow: hidden;
}

#power-menu button {
    border: none;
    background: transparent;
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
}

#power-menu button:hover {
    background: rgba(255, 255, 255, 0.12);
}

#lock-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(40, 77, 134, 0.95), rgba(7, 16, 32, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

#lock-screen.hidden {
    display: none;
}

.lock-card {
    width: 320px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    padding: 20px;
    text-align: center;
}

#lock-time {
    font-size: 38px;
    font-weight: 700;
}

#lock-date {
    opacity: 0.85;
    margin-bottom: 14px;
}

#unlock-pin {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #789;
    margin-bottom: 8px;
    box-sizing: border-box;
}

#lock-error {
    color: #ffb3b3;
    min-height: 18px;
    font-size: 12px;
}

.system-monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.system-stat {
    background: #f4f7fb;
    border: 1px solid #d8e2f1;
    border-radius: 8px;
    padding: 10px;
}

.system-stat h4 {
    margin: 0 0 6px;
}

.system-center {
    padding: 16px;
    height: 100%;
    overflow: auto;
    background: #f7f9fc;
    box-sizing: border-box;
}

.system-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.system-card {
    background: #fff;
    border: 1px solid #d8e2f1;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-card input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #bfcce0;
    border-radius: 4px;
}

.system-card button {
    border: none;
    background: #2f6feb;
    color: white;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.system-startup-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.system-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.system-status {
    font-size: 13px;
    line-height: 1.5;
}
