/* Nexus Cyberdeck OS - Industrial Sci-Fi Theme (Prosperous Universe Style) */

:root {
    /* Colors - Dark Industrial */
    --bg-deep: #0a0c10;
    --bg-dark: #12151c;
    --bg-primary: #181c26;
    --bg-panel: #181c26;
    --bg-panel-hover: #1e2432;
    --bg-input: #0d1018;
    
    /* Accents - Amber/Orange like Prosperous */
    --accent-primary: #e8a54b;
    --accent-secondary: #d4913d;
    --accent-glow: rgba(232, 165, 75, 0.3);
    --accent-cyan: #22d3ee;
    --accent-blue: #4a90d9;
    --accent-green: #5cb85c;
    --accent-red: #d9534f;
    --accent-purple: #9d7fd9;
    
    /* Borders - Subtle industrial */
    --border-color: #2a3040;
    --border-light: #3a4560;
    --border-active: #e8a54b;
    --border-glow: #e8a54b;
    
    /* Text */
    --text-primary: #c8cfd8;
    --text-secondary: #8a95a8;
    --text-muted: #5a6578;
    --text-accent: #e8a54b;
    
    /* Spacing & Grid */
    --header-height: 40px;
    --dock-height: 60px;
    --border-radius: 4px;
    --grid-size: 40px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
    font-size: 13px;
    line-height: 1.4;
}

/* App Container */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-deep) 0%, #080a0f 100%);
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake-anim {
    animation: shake 0.4s ease-in-out;
}

/* Status Bar */
.status-bar {
    height: var(--header-height);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    flex-shrink: 0;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-center {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

#clock {
    color: var(--accent-primary);
    font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 1px;
}

.logo {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.node-indicator {
    font-size: 12px;
    cursor: help;
    transition: var(--transition-fast);
    color: #4ade80;
    text-shadow: 0 0 8px #4ade80, 0 0 12px rgba(74, 222, 128, 0.5);
}

.node-indicator.offline { 
    color: #f87171;
    text-shadow: 0 0 8px #f87171, 0 0 12px rgba(248, 113, 113, 0.5);
}

.node-indicator.online { 
    color: #4ade80;
    text-shadow: 0 0 8px #4ade80, 0 0 12px rgba(74, 222, 128, 0.5);
}

.node-indicator.warn { 
    color: var(--accent-primary);
    text-shadow: 0 0 6px var(--accent-primary);
}
.tab-bar {
    display: flex;
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 5px 14px;
    font-size: 11px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    background: var(--bg-panel);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-panel);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(232, 165, 75, 0.15);
}

/* Add Tab & Store Buttons */
#add-tab-btn {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-fast);
}

#add-tab-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(232, 165, 75, 0.1);
}

#widget-store-btn {
    background: rgba(232, 165, 75, 0.15);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 5px 14px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition-fast);
}

#widget-store-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

/* Grid Background for Visual Snapping */
.desktop-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    background-image: none;
    background-size: var(--grid-size) var(--grid-size);
    background-position: 0 0;
    background-color: var(--bg-deep);
}

.desktop-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 16px;
    background: transparent;
}

/* Grid Snap Preview - Ghost overlay */
.grid-snap-preview {
    position: absolute;
    pointer-events: none;
    border: 2px dashed var(--accent-primary);
    background: rgba(232, 165, 75, 0.08);
    border-radius: var(--border-radius);
    z-index: 9998;
    transition: all 0.05s linear;
    opacity: 0;
}

.grid-snap-preview.active {
    opacity: 1;
}

/* Snap Effect Animation */
@keyframes snapFlash {
    0% { box-shadow: 0 0 0 0 rgba(232, 165, 75, 0.5); border-color: var(--accent-primary); }
    50% { box-shadow: 0 0 20px 5px rgba(232, 165, 75, 0.3); border-color: var(--text-accent); }
    100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); border-color: var(--border-color); }
}

.window.snap-anim {
    animation: snapFlash 0.4s ease-out;
}

/* Window Styles */
.window {
    position: absolute;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-width: 200px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    will-change: transform, left, top;
    backface-visibility: hidden;
}

.window:hover {
    border-color: var(--border-light);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.window.dragging {
    opacity: 0.92;
    transform: scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    cursor: grabbing;
    z-index: 9999 !important;
}

.window.spawning {
    animation: windowSpawn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes windowSpawn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.window-header {
    height: 32px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(24, 28, 38, 0.95) 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: grab;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    user-select: none;
}

.window-header:active {
    cursor: grabbing;
}

.window-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
}

.window-controls {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.window-controls button {
    width: 20px;
    height: 20px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.window-controls button:hover {
    background: var(--bg-panel-hover);
    color: var(--text-primary);
}

.window-controls .window-close:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

.window-controls .window-minimize:hover {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.window-controls .window-maximize:hover {
    background: var(--accent-blue);
    color: white;
}

.window-content {
    flex: 1;
    overflow: auto;
    padding: 12px;
    min-height: 100px;
}

/* Maximized Window */
.window.maximized {
    transition: all var(--transition-slow);
}

.window.maximized .window-resize {
    display: none;
}

/* Minimized Window */
.window.minimized {
    min-height: auto !important;
}

.window.minimized .window-content {
    display: none;
}

/* Window dragging states */
.window.dragging {
    opacity: 0.9;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s;
}

.window.dragging .window-header {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.window.dragging .window-title {
    color: var(--bg-deep);
}

.window.resizing {
    box-shadow: 0 0 20px var(--accent-glow), 0 6px 32px rgba(0, 0, 0, 0.6);
}

/* Window Resize Handle */
.window-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--border-color) 50%);
    border-radius: 0 0 var(--border-radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
}

.window-resize::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    border-radius: 0 0 2px 0;
    opacity: 0.5;
}

.window-resize:hover,
.window-resize:active {
    background: linear-gradient(135deg, transparent 40%, var(--accent-primary) 100%);
}

.window-resize:hover::after,
.window-resize:active::after {
    border-color: var(--accent-primary);
    opacity: 1;
}

/* App Launcher Widget Styles */
.app-launcher-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px;
}

.app-launcher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(24, 28, 38, 0.8) 0%, rgba(13, 16, 24, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-medium);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.app-launcher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.app-launcher-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(232, 165, 75, 0.1);
}

.app-launcher-card:hover::before {
    opacity: 1;
}

.app-launcher-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-fast);
}

.app-launcher-card:hover .app-launcher-icon {
    transform: scale(1.1);
}

.app-launcher-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
}

.app-launcher-desc {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window.snapped {
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Spotlight overlay - main container */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.85);
    z-index: 10001;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.spotlight.active {
    display: flex;
    opacity: 1;
}

.spotlight > .spotlight-input-container {
    width: 500px;
    max-width: 90vw;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(232, 165, 75, 0.1);
}

.spotlight > .spotlight-input-container input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-family: inherit;
    outline: none;
}

.spotlight > .spotlight-input-container input::placeholder {
    color: var(--text-muted);
}

.spotlight > .spotlight-results {
    position: absolute;
    top: 140px;
    width: 500px;
    max-width: 90vw;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.spotlight-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spotlight-container {
    width: 600px;
    max-width: 90vw;
    background: rgba(24, 28, 38, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(232, 165, 75, 0.1);
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.spotlight-overlay.active .spotlight-container {
    transform: translateY(0) scale(1);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(232, 165, 75, 0.15), 0 0 40px rgba(232, 165, 75, 0.1);
}

.spotlight-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
}

.spotlight-search-icon {
    font-size: 20px;
    color: var(--text-muted);
    margin-right: 12px;
    opacity: 0.7;
}

.spotlight-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-family: inherit;
    outline: none;
    padding: 4px 0;
}

.spotlight-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.spotlight-input:focus {
    outline: none;
}

.spotlight-shortcut-hint {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
}

.spotlight-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.spotlight-section {
    margin-bottom: 8px;
}

.spotlight-section-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 12px;
    font-weight: 600;
}

.spotlight-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin: 2px 0;
}

.spotlight-result:hover,
.spotlight-result.selected {
    background: rgba(232, 165, 75, 0.12);
}

.spotlight-result.selected {
    border-left: 3px solid var(--accent-primary);
}

.spotlight-result-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-fast);
}

.spotlight-result:hover .spotlight-result-icon,
.spotlight-result.selected .spotlight-result-icon {
    border-color: var(--accent-primary);
    background: rgba(232, 165, 75, 0.15);
}

.spotlight-result-info {
    flex: 1;
}

.spotlight-result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.spotlight-result-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.spotlight-result-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.spotlight-result:hover .spotlight-result-actions,
.spotlight-result.selected .spotlight-result-actions {
    opacity: 1;
}

.spotlight-tab-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.spotlight-tab-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-deep);
}

.spotlight-no-results {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.spotlight-no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Spotlight Footer */
.spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
}

.spotlight-hints {
    display: flex;
    gap: 16px;
}

.spotlight-hint {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spotlight-hint kbd {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
}

/* Empty State for Spotlight */
.spotlight-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
}

.spotlight-empty-title {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ===== DOCK & SPOTLIGHT ===== */
.dock {
    height: 64px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100;
}

/* Spotlight wrapper in dock */
.spotlight-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    position: relative;
}

.spotlight-input-container {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 10px;
    width: 100%;
    transition: all 0.2s ease;
    cursor: text;
}

.spotlight-input-container:hover,
.spotlight-input-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(232, 165, 75, 0.15);
}

.spotlight-icon {
    color: var(--accent-primary);
    font-size: 14px;
    margin-right: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
}

.spotlight-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.spotlight-input::placeholder {
    color: var(--text-muted);
}

/* Spotlight results dropdown */
.spotlight-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10000;
}

.spotlight-results.show {
    display: block;
}

.spotlight-result {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.spotlight-result:last-child {
    border-bottom: none;
}

.spotlight-result:hover,
.spotlight-result.active {
    background: var(--bg-panel-hover);
}

.spotlight-result-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 28px;
    text-align: center;
}

.spotlight-result-content {
    flex: 1;
}

.spotlight-result-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.spotlight-result-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.spotlight-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
}

.dock-spotlight-trigger {
    height: 44px;
    padding: 0 20px;
    background: linear-gradient(135deg, rgba(232, 165, 75, 0.15) 0%, rgba(232, 165, 75, 0.05) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: 22px;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.dock-spotlight-trigger:hover {
    background: var(--accent-primary);
    color: var(--bg-deep);
    box-shadow: 0 4px 20px rgba(232, 165, 75, 0.3);
    transform: translateY(-2px);
}

.dock-spotlight-shortcut {
    font-size: 10px;
    opacity: 0.7;
    font-family: 'IBM Plex Mono', monospace;
}

.dock-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.dock-item {
    width: 44px;
    height: 44px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.dock-item:hover {
    background: var(--bg-panel-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary);
}

/* Widget Styles */
.telemetry-widget {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-family: 'IBM Plex Mono', monospace;
}

.telemetry-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    text-align: center;
}

.telemetry-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.telemetry-bar {
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    margin: 6px 0;
    overflow: hidden;
}

.telemetry-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.telemetry-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Chat Widget */
.chat-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    margin-bottom: 8px;
    min-height: 100px;
}

.chat-message {
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: var(--border-radius);
    font-size: 12px;
    word-wrap: break-word;
    animation: messageIn 0.2s ease;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    background: rgba(232, 165, 75, 0.15);
    border-left: 2px solid var(--accent-primary);
    margin-left: 15%;
}

.chat-message.bot {
    background: rgba(74, 144, 217, 0.15);
    border-left: 2px solid var(--accent-blue);
    margin-right: 15%;
}

.chat-input-area {
    display: flex;
    gap: 6px;
}

.chat-input-area select,
.chat-input-area input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
}

.chat-input-area input {
    flex: 1;
}

.chat-input-area button {
    background: var(--accent-primary);
    border: none;
    color: var(--bg-deep);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.chat-input-area button:hover {
    background: var(--accent-secondary);
}

/* Terminal Widget */
.terminal-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'IBM Plex Mono', monospace;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    font-size: 11px;
    min-height: 80px;
}

.terminal-line {
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.prompt {
    color: var(--accent-green);
}

.terminal-line.error {
    color: var(--accent-red);
}

.terminal-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 6px 8px;
}

.terminal-prompt {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 11px;
}

.terminal-input-area input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

/* Files Widget */
.files-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.files-path {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 6px 8px;
    font-size: 11px;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-family: 'IBM Plex Mono', monospace;
}

.files-list {
    flex: 1;
    overflow-y: auto;
}

.files-item {
    padding: 5px 8px;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-size: 12px;
    transition: all var(--transition-fast);
}

.files-item:hover {
    background: var(--bg-panel-hover);
}

.files-item.directory {
    color: var(--accent-secondary);
}

/* Network Widget */
.network-widget {
    font-size: 11px;
}

.network-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.refresh-btn:hover {
    background: var(--bg-panel-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.network-self, .network-peer {
    padding: 6px 8px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    font-size: 10px;
    border-left: 2px solid var(--accent-primary);
}

/* Torn Widget */
.torn-widget {
    font-size: 11px;
}

.torn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.torn-stats {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 10px;
    margin-bottom: 8px;
    border-left: 2px solid var(--accent-secondary);
}

.torn-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.torn-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.torn-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.torn-tab.active {
    background: rgba(232, 165, 75, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.torn-tab:hover {
    background: var(--bg-panel-hover);
}

.torn-content {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 8px;
    max-height: 120px;
    overflow-y: auto;
    border-left: 2px solid var(--border-color);
}

/* Hermes Widget */
.hermes-widget {
    font-size: 11px;
}

.hermes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hermes-tasks {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.hermes-task {
    padding: 5px 6px;
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    transition: all var(--transition-fast);
    font-size: 11px;
}

.hermes-task:hover {
    background: var(--bg-panel-hover);
}

.task-status {
    margin-right: 6px;
}

/* Bookmarks Widget */
.bookmarks-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bookmarks-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.bookmarks-header input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: 11px;
    flex: 1;
}

.bookmarks-list {
    flex: 1;
    overflow-y: auto;
}

.bookmark-item {
    display: block;
    padding: 8px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    border-left: 2px solid var(--border-color);
}

.bookmark-item:hover {
    background: var(--bg-panel-hover);
    border-left-color: var(--accent-primary);
}

.bookmark-icon {
    margin-right: 6px;
}

.bookmark-title {
    font-size: 12px;
}

.bookmark-tags {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.bookmark-tag {
    font-size: 9px;
    background: rgba(232, 165, 75, 0.2);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RSS Widget */
.rss-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rss-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.rss-header input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: var(--border-radius);
    font-size: 11px;
}

.rss-header button {
    background: var(--accent-primary);
    border: none;
    color: var(--bg-deep);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rss-items {
    flex: 1;
    overflow-y: auto;
}

.rss-item {
    padding: 8px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    border-left: 2px solid var(--accent-blue);
}

.rss-item a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 12px;
}

.rss-item a:hover {
    text-decoration: underline;
}

.rss-item .rss-date {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* AI Builder Widget */
.ai-builder-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-builder-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    resize: none;
    min-height: 60px;
    margin-bottom: 8px;
    font-family: inherit;
}

.ai-builder-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.ai-builder-submit {
    background: var(--accent-primary);
    border: none;
    color: var(--bg-deep);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
    transition: var(--transition-fast);
}

.ai-builder-submit:hover {
    background: var(--accent-secondary);
}

.ai-builder-result {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    border-left: 2px solid var(--accent-primary);
}

.ai-builder-preview {
    margin-top: 8px;
}

.ai-builder-preview button {
    background: var(--accent-green);
    border: none;
    color: var(--bg-deep);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

/* Arcade Widget */
.arcade-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-input);
    border-radius: var(--border-radius);
}

.arcade-canvas {
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Login Overlay */
#login-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-deep);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.login-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    min-width: 280px;
    animation: loginIn 0.4s ease;
}

@keyframes loginIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-box h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 4px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.login-box input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--border-radius);
    font-size: 14px;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 16px;
    transition: var(--transition-fast);
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.1);
}

.login-box button {
    width: 100%;
    background: var(--accent-primary);
    border: none;
    color: var(--bg-deep);
    padding: 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition-fast);
}

.login-box button:hover {
    background: var(--accent-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Edge Glow Effect */
.edge-glow {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.15s ease;
    opacity: 0;
}

.edge-glow.top-left {
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 0 0, rgba(232, 165, 75, 0.4) 0%, transparent 70%);
}

.edge-glow.top-right {
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 100% 0, rgba(232, 165, 75, 0.4) 0%, transparent 70%);
}

.edge-glow.bottom-left {
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 0 100%, rgba(232, 165, 75, 0.4) 0%, transparent 70%);
}

.edge-glow.bottom-right {
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 100% 100%, rgba(232, 165, 75, 0.4) 0%, transparent 70%);
}

/* Settings Widget */
.settings-widget {
    font-size: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.settings-section {
    padding: 4px;
}

.settings-field {
    margin-bottom: 12px;
}

.settings-field label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.settings-field input,
.settings-field textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
    transition: var(--transition-fast);
}

.settings-field input:focus,
.settings-field textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.settings-field textarea {
    resize: vertical;
    min-height: 60px;
}

/* ===== SPOTLIGHT SEARCH ===== */
.spotlight-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.spotlight-input-container {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 14px;
    height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.spotlight-input-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.spotlight-icon {
    color: var(--accent-primary);
    font-size: 14px;
    margin-right: 10px;
    font-weight: 600;
}

#spotlight-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'IBM Plex Sans', sans-serif;
    outline: none;
}

#spotlight-input::placeholder {
    color: var(--text-muted);
}

.spotlight-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.spotlight-result {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.spotlight-result:last-child {
    border-bottom: none;
}

.spotlight-result:hover,
.spotlight-result.active {
    background: var(--bg-panel-hover);
}

.spotlight-result-icon {
    font-size: 22px;
    margin-right: 14px;
    width: 36px;
    text-align: center;
}

.spotlight-result-content {
    flex: 1;
}

.spotlight-result-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.spotlight-result-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.spotlight-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Widget Store Modal */
#widget-store-modal {
    backdrop-filter: blur(4px);
}

#widget-store-modal > div {
    background: linear-gradient(180deg, #1e2432 0%, #181c26 100%) !important;
    border: 1px solid #e8a54b !important;
    box-shadow: 0 0 40px rgba(232, 165, 75, 0.15), 0 20px 40px rgba(0,0,0,0.5);
}

#widget-store-modal h3 {
    color: #e8a54b !important;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 1px;
}

#widget-tab-select {
    background: #0d1018 !important;
    border: 1px solid #3a4560 !important;
    color: #e8eaf0 !important;
    padding: 8px 12px !important;
    border-radius: 4px;
}
.widget-store-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.widget-store-item:hover {
    background: var(--bg-panel-hover);
    border-color: var(--accent-primary);
}

.widget-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.widget-info {
    flex: 1;
}

.widget-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.widget-category {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-add-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.widget-add-btn:disabled {
    border-color: var(--accent-green);
    color: var(--accent-green);
    cursor: default;
}

/* Quick Links Widget */
.links-widget {
    font-size: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.links-header {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.links-section {
    margin-bottom: 14px;
    flex: 1;
    min-height: 0;
}

.links-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e8a54b;
    margin-bottom: 8px;
    font-weight: 600;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1a1f2e 0%, #151a26 100%);
    border: 1px solid #3a4560;
    border-radius: 6px;
    text-decoration: none;
    color: #e8eaf0;
    transition: var(--transition-fast);
    font-weight: 500;
}

.link-card:hover {
    background: linear-gradient(135deg, #242d3d 0%, #1e2535 100%);
    border-color: #e8a54b;
    box-shadow: 0 0 12px rgba(232, 165, 75, 0.2);
    transform: translateY(-1px);
}

.link-card.tailscale {
    border-left: 3px solid #9d7fd9;
}

.link-icon {
    font-size: 18px;
}

.link-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* App Launcher Window customization for 1x1 grid squares */
.window.app-launcher-window.size-1x1 {
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.window.app-launcher-window.size-1x1 .window-header {
    display: none !important; /* Hide header completely */
}

.window.app-launcher-window.size-1x1 .window-content {
    padding: 0 !important;
    height: 100% !important;
    min-height: unset !important;
    overflow: hidden !important;
}

.window.app-launcher-window.size-1x1 .app-launcher-widget {
    padding: 0 !important;
    height: 100% !important;
}

.window.app-launcher-window.size-1x1 .app-launcher-card {
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.window.app-launcher-window.size-1x1 .app-launcher-name,
.window.app-launcher-window.size-1x1 .app-launcher-desc {
    display: none !important; /* Hide text */
}

.window.app-launcher-window.size-1x1 .app-launcher-icon {
    margin-bottom: 0 !important;
    font-size: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* App Launcher dual-layout styles */
.app-launcher-widget-wrapper {
    height: 100%;
    width: 100%;
    position: relative;
}

/* 1x1 Minimal Layout */
.window.size-1x1 .launcher-minimal-view {
    display: flex !important;
    width: 100%;
    height: 100%;
}

.window.size-1x1 .launcher-expanded-view {
    display: none !important;
}

/* Expanded Layout */
.window:not(.size-1x1) .launcher-minimal-view {
    display: none !important;
}

.window:not(.size-1x1) .launcher-expanded-view {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.window.app-launcher-window.size-1x1 img {
    margin-bottom: 0 !important;
    width: 24px !important;
    height: 24px !important;
}

/* Make resize handle tiny and positioned in bottom-right for 1x1 */
.window.app-launcher-window.size-1x1 .window-resize {
    width: 8px !important;
    height: 8px !important;
    font-size: 0 !important;
    background: linear-gradient(135deg, transparent 50%, var(--accent-primary) 50%) !important;
}
.window.app-launcher-window.size-1x1 .window-resize::after {
    display: none !important;
}

/* RSS Reader Widget */
.rss-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 150px;
}

.rss-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.rss-header input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.rss-header input:focus {
    border-color: var(--accent-primary);
}

.rss-header button {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: var(--bg-deep);
    padding: 6px 14px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
}

.rss-header button:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 10px rgba(232, 165, 75, 0.3);
}

.rss-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.rss-item {
    border: 1px solid var(--border-color);
    background: rgba(24, 28, 38, 0.4);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.rss-item:hover {
    border-color: var(--border-light);
    background: rgba(24, 28, 38, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rss-item-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.rss-item-title a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.rss-item-title a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.rss-item-meta {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
    margin-bottom: 6px;
}

.rss-item-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Tabbed Window Styles */
.window-header-tabs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-top: 4px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.window-header-tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.window-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-bottom: none;
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all var(--transition-fast);
    white-space: nowrap;
    user-select: none;
    height: 28px;
}

.window-tab:hover {
    color: var(--text-primary);
    background: var(--bg-panel-hover);
    border-color: var(--border-light);
}

.window-tab.active {
    color: var(--accent-primary);
    background: var(--bg-panel);
    border-color: var(--accent-primary) var(--accent-primary) transparent var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(232, 165, 75, 0.1);
}

.window-tab-close {
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.window-tab-close:hover {
    background: var(--accent-red);
    color: white;
}

.window-content-tab {
    width: 100%;
    height: 100%;
}

/* Sleek Industrial Task Sidebar on Right */
.task-sidebar {
    position: fixed;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    width: 48px;
    background: rgba(13, 16, 24, 0.75);
    backdrop-filter: blur(12px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
    z-index: 999;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
    overflow-y: auto;
    display: none; /* Controlled dynamically by JS */
}

.task-sidebar-item {
    width: 34px;
    height: 34px;
    background: rgba(13, 16, 24, 0.6);
    border: 1px solid rgba(232, 165, 75, 0.35);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
    text-align: center;
    padding: 2px;
    line-height: 1.1;
    overflow: hidden;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.task-sidebar-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(232, 165, 75, 0.15);
    box-shadow: 0 0 10px rgba(232, 165, 75, 0.4);
}

.task-sidebar-item::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 4px var(--accent-primary);
}

.task-sidebar-label {
    font-size: 8px;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--accent-primary);
    opacity: 0.6;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 8px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    user-select: none;
    font-weight: 600;
}

/* Background Selection & Game Simulation Control Dashboard */
.bg-panel, .tron-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(13, 16, 24, 0.85);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 8px;
    padding: 12px;
    width: 260px;
    z-index: 100;
    pointer-events: auto;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(34, 211, 238, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.bg-panel:hover, .tron-panel:hover {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(34, 211, 238, 0.25);
}

/* Pacman Cyber Theme */
.bg-panel.theme-pacman {
    border-color: rgba(253, 224, 71, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(253, 224, 71, 0.12);
}

.bg-panel.theme-pacman:hover {
    border-color: rgba(253, 224, 71, 0.7);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(253, 224, 71, 0.22);
}

/* Static Cyber Theme */
.bg-panel.theme-static {
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.08);
}

.bg-panel.theme-static:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.18);
}

.bg-selector-dropdown {
    width: 100%;
    background: #0d1018;
    border: 1px solid rgba(232, 165, 75, 0.25);
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.bg-selector-dropdown:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 5px rgba(232, 165, 75, 0.3);
}

.bg-title-row, .tron-title {
    font-size: 11px;
    font-weight: bold;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bg-panel.theme-pacman .bg-title-row {
    color: #fde047;
}

.bg-panel.theme-static .bg-title-row {
    color: #38bdf8;
}

.bg-stats-container, .tron-stats {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.bg-stat-row, .tron-stat-row {
    display: flex;
    justify-content: space-between;
}

.bg-control-btn, .tron-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
    outline: none;
}

.bg-control-btn:hover, .tron-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* Pacman button adaptations */
.bg-panel.theme-pacman .bg-control-btn {
    border-color: #fde047;
    color: #fde047;
}

.bg-panel.theme-pacman .bg-control-btn:hover {
    background: #fde047;
    color: #000;
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.4);
}

.bg-control-btn.active, .tron-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.bg-control-btn.active:hover, .tron-btn.active:hover {
    background: #ff4a4a;
    box-shadow: 0 0 10px rgba(217, 83, 79, 0.4);
}

.bg-hint-text, .tron-controls-hint {
    font-size: 9px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}
.status-bg-select {
    background: #09090b !important;
    border: 1px solid rgba(34, 211, 238, 0.35) !important;
    color: var(--accent-cyan) !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
}

.status-bg-select:focus, .status-bg-select:hover {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.25) !important;
}

.status-bg-select.theme-pacman {
    border-color: rgba(253, 224, 71, 0.35) !important;
    color: #fde047 !important;
}
.status-bg-select.theme-pacman:focus, .status-bg-select.theme-pacman:hover {
    border-color: #fde047 !important;
    box-shadow: 0 0 8px rgba(253, 224, 71, 0.25) !important;
}

.status-bg-select.theme-static {
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: #38bdf8 !important;
}
.status-bg-select.theme-static:focus, .status-bg-select.theme-static:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25) !important;
}

.status-bg-btn {
    background: transparent !important;
    border: 1px solid var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
}

.status-bg-btn:hover {
    background: var(--accent-cyan) !important;
    color: #000 !important;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3) !important;
}

.status-bg-btn.theme-pacman {
    border-color: #fde047 !important;
    color: #fde047 !important;
}
.status-bg-btn.theme-pacman:hover {
    background: #fde047 !important;
    color: #000 !important;
    box-shadow: 0 0 8px rgba(253, 224, 71, 0.3) !important;
}

.status-bg-btn.active {
    background: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: #fff !important;
}

.status-bg-btn.active:hover {
    background: #ff4a4a !important;
    box-shadow: 0 0 8px rgba(217, 83, 79, 0.4) !important;
}

/* Spotify Media Controller Integration */
.status-spotify-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.spotify-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.spotify-trigger:hover {
    background: rgba(255,255,255,0.05);
    color: #1db954;
    border-color: rgba(29, 185, 84, 0.2);
}

.spotify-trigger.active {
    color: #1db954;
}

.spotify-icon {
    font-size: 9px;
    display: inline-block;
    vertical-align: middle;
}

.spotify-flyout {
    display: none;
    position: fixed;
    top: 42px;
    right: 12px;
    width: 280px;
    background: rgba(8, 10, 14, 0.98);
    border: 1px solid rgba(29, 185, 84, 0.5);
    box-shadow: 0 16px 40px rgba(0,0,0,0.9), 0 0 20px rgba(29, 185, 84, 0.2);
    border-radius: 10px;
    padding: 14px;
    z-index: 99999;
    backdrop-filter: blur(20px);
}

.spotify-flyout.open {
    display: block;
}

.spotify-flyout-content {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--text-primary);
}

.spotify-auth-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #1db954;
    color: #000 !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin-top: 8px;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.spotify-auth-btn:hover {
    background: #1ed760;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.spotify-track-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.spotify-album-art {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    border: 1px solid rgba(29, 185, 84, 0.3);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.spotify-details {
    flex: 1;
    min-width: 0;
}

.spotify-track-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-artist-name {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.spotify-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    margin-top: 10px;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.spotify-ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotify-ctrl-btn:hover {
    color: #1db954;
    transform: scale(1.15);
}

.spotify-progress-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 8px;
}

.spotify-progress-bar-bg {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.spotify-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #1db954;
    border-radius: 2px;
    transition: width 1s linear;
}
