* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

body {
    background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1920');
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background-image 0.3s ease;
}

.desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 48px;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    grid-template-rows: repeat(auto-fill, 100px);
    grid-gap: 20px;
    grid-auto-flow: column;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    padding: 8px;
    transition: background 0.2s, transform 0.1s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.03);
}

.desktop-icon .icon-wrapper {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-icon span {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    word-break: break-word;
}

/* Window UI Elements */
.window {
    position: absolute;
    width: 850px;
    height: 550px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.window.focused {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2), 0 15px 40px rgba(0,0,0,0.7);
}

.window-header {
    background: #2d2d2d;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-bottom: 1px solid #3c3c3c;
}

.window-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-title {
    color: #ddd;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

.window.focused .window-title {
    color: #00ff00;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.btn-close { background: #ff5f56; }
.btn-close:hover { background: #e04f47; }

.window-body {
    flex: 1;
    color: #eee;
    background: #121212;
    position: relative;
    overflow: hidden;
}

/* CreepBrowser Styles */
.browser-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.browser-navbar {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
    align-items: center;
}

.browser-nav-btn {
    background: #3c3c3c;
    border: 1px solid #444;
    color: #00ff00;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.browser-nav-btn:hover {
    background: #00ff00;
    color: #000;
}

.browser-url-bar {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #00ff00;
    padding: 6px 12px;
    border-radius: 4px;
    outline: none;
    font-family: monospace;
    font-size: 12px;
}

.browser-workspace {
    display: flex;
    flex: 1;
    height: calc(100% - 43px);
}

.browser-sidebar {
    width: 190px;
    background: #141414;
    border-right: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 6px;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
    margin: 8px 0 4px 2px;
    letter-spacing: 1px;
}

.directory-link {
    background: #1e1e1e;
    color: #ccc;
    border: 1px solid #333;
    padding: 7px 10px;
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-link:hover {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border-color: #00ff00;
}

.browser-frame {
    flex: 1;
    border: none;
    background: #fff;
}

/* Settings Dashboard Layouts */
.settings-layout {
    display: flex;
    height: 100%;
}

.settings-sidebar {
    width: 160px;
    background: #181818;
    border-right: 1px solid #2d2d2d;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-tab {
    padding: 10px;
    color: #00ff00;
    font-family: monospace;
    background: rgba(0,255,0,0.05);
    border: 1px solid rgba(0,255,0,0.2);
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
}

.settings-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.settings-title {
    color: #00ff00;
    font-family: monospace;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #2d2d2d;
    padding-bottom: 8px;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.wallpaper-thumb {
    width: 100%;
    height: 85px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #333;
    object-fit: cover;
}

.wallpaper-thumb.selected, .wallpaper-thumb:hover {
    border-color: #00ff00;
}

.version-box {
    background: #181818;
    border: 1px dashed #00ff00;
    padding: 15px;
    border-radius: 6px;
    font-family: monospace;
    color: #ccc;
    line-height: 1.6;
}

/* Terminal Framework Styles */
.terminal-container {
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff00;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-log {
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 10px;
    line-height: 1.4;
}

.terminal-input-row {
    display: flex;
    align-items: center;
}

.terminal-prompt {
    font-weight: bold;
    margin-right: 8px;
    white-space: nowrap;
}

.terminal-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Arcade Module UI */
.arcade-container {
    display: flex;
    height: 100%;
}

.arcade-list {
    width: 200px;
    background: #151515;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 8px;
}

.game-btn {
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
}

.game-btn:hover, .game-btn.active {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border-color: #00ff00;
}

.arcade-screen {
    flex: 1;
    background: #000;
    position: relative;
}

.arcade-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Recycle Bin Styles */
.bin-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bin-toolbar {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.bin-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Fixed Reactive Taskbar Layout Layer */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 255, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 999999;
    justify-content: space-between;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.start-button {
    width: 36px;
    height: 36px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.start-button:hover {
    border-color: #00ff00;
    box-shadow: 0 0 8px rgba(0,255,0,0.3);
}

.running-apps {
    display: flex;
    gap: 6px;
    align-items: center;
}

.taskbar-app {
    height: 36px;
    padding: 0 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #aaa;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.taskbar-app.active {
    color: #00ff00;
    border-color: #00ff00;
    background: rgba(0,255,0,0.05);
}

.taskbar-right {
    color: #00ff00;
    font-family: monospace;
    font-size: 12px;
}