:root {
            --xdev-window-header-height: 48px;
            --xdev-window-header-padding-top: 6px;
            --xdev-window-header-padding-left: 10px;
            --xdev-window-border-radius: 8px;
            --xdev-taskbar-height: 60px;
            --xdev-window-footer-height: 36px;
            --fc-border-color: #333;
            --fc-page-bg-color: #1e1e1e;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-image: url('../imgs/Desktopxi1.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
            height: 100vh;
            display: block;
            /* Changed from flex */
            user-select: none;
        }

        /* Pantalla de carga */
        .boot-screen {
            position: absolute;
            top: 8%;
            left: 16.6%;
            align-items: center;
            justify-content: center;
            z-index: 100000;
            transition: opacity 0.5s ease;
        }

        .boot-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .boot-logo {
            /* font-size: 120px;  */
            margin-bottom: 30px;
            animation: logoFloat 2s ease-in-out infinite;
            display: flex;
            justify-content: center;
        }

        @keyframes logoFloat {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-40px);
            }
        }

        .boot-title {
            font-size: 48px;
            font-weight: bold;
            color: white;
            margin-bottom: 10px;
            letter-spacing: 4px;
        }

        .boot-version {
            font-size: 24px;
            width: 100%;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 50px;
            text-align: center;
            /*color: #00CED1;*/
        }

        .boot-loader {
            /*width: 300px;*/
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
            overflow: hidden;
        }

        .boot-loader-bar {
            height: 100%;
            width: 100%;
            background: #00CED1;
            /*#FFA500;*/
            /*white;*/
            border-radius: 3px;
            animation: loading 2s ease-in-out;
        }

        @keyframes loading {
            0% {
                width: 0%;
            }

            100% {
                width: 100%;
            }
        }

        .desktop {
            height: calc(100vh - 60px);
            padding: 20px;
            position: relative;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            align-content: flex-start;
            gap: 10px;
        }

        /* AI Chat Toggle Button */
        .ia-toggle-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 56px;
            height: 56px;
            border: none;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #0c0a0e 100%);
            color: white;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
            transition: all 0.3s ease;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ia-toggle-btn:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
        }

        .ia-toggle-btn:active {
            transform: scale(0.95);
        }

        .ia-toggle-btn.active {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        }

        .desktop-wallpaper-content {
            position: absolute;
            right: 12%;
            top: 45%;
            /* transform: translateY(-50%); Removed to stop upward shift when height changes */
            text-align: center;
            color: white;
            pointer-events: none;
            z-index: 0;
        }

        .wallpaper-icon {
            width: 128px;
            height: auto;
            margin-top: 70px;
            /*margin-bottom: 10px;*/
        }

        .wallpaper-title {
            font-size: 2rem;
            font-weight: bold;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .wallpaper-version {
            font-size: 1.2rem;
            opacity: 0.8;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        }

        .desktop .app-item {
            z-index: 1;
            /* Above wallpaper content */
            width: 90px;
            height: 110px;
            /* Fixed size for grid consistence */
            margin: 5px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
            color: white;
        }

        .desktop .app-item .app-name {
            color: white;
            font-weight: 500;
        }

        .window {
            position: absolute;
            background: white;
            border-radius: var(--xdev-window-border-radius);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            min-width: 400px;
            min-height: 300px;
            display: none;
            flex-direction: column;
            resize: both;
            overflow: hidden;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .window.active {
            display: flex;
            animation: windowOpen 0.2s ease;
        }

        @keyframes windowOpen {
            from {
                opacity: 0;
                transform: scale(0.95);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .window.maximized {
            top: 0 !important;
            left: 0 !important;
            width: 99.7% !important;
            /* 100%; */
            height: calc(100vh - 70px) !important;
            border-radius: 0;
            resize: none;
            transition: opacity 0.3s ease;
        }

        .window.minimized {
            display: none;
        }

        .window-header {
            height: var(--xdev-window-header-height);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 6px 10px;
            display: flex;
            justify-content: space-between;
            cursor: move;
        }

        .window-title {
            display: flex;
            gap: 8px;
            align-items: center;
            margin: 0;
        }

        .window-title span img {
            width: 28px;
            height: 28px;
            padding-right: 6px;
        }

        .window-controls button {
            width: 30px;
            height: 30px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            margin-left: 5px;
            font-size: 16px;
            font-weight: bold;
            transition: background 0.2s;
        }

        .window-controls button:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .window-content {
            display: flex;
            flex-direction: column;
            padding: 20px;
            overflow: auto;
            background: #fff;
            height: calc(100% - var(--xdev-window-header-height)) !important;
        }

        /*
        .window-content {
            display: flex;
            flex-direction: column;
            padding: 20px;
            overflow: auto;
            background: #fff;
            flex: 1;
            height: auto !important;
            min-height: 0;
        }
*/

        /* Contenedor de la barra de progreso superior */
        .window-bar-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            /*height: 5px;*/
            z-index: 100000;
            pointer-events: none;
        }

        /* La barra de carga en si */
        #window-bar {
            width: 0%;
            /*height: 100%;*/
            height: 5px;
            background-color: #dbdbe3;
            z-index: 100000;
            transition: width 0.2s ease;
            box-shadow: 0 0 10px rgba(219, 219, 227, 0.5);
        }

        .window-footer {
            height: var(--xdev-window-footer-height);
            background-color: gray;
            color: white;
            padding: 2px 10px;
            border-top: 1px solid #ccc;
            justify-content: space-between;
            /*justify-content: center;*/
            display: flex;
        }

        /* Ocupando el 100% del width */
        /*
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--xdev-taskbar-height);
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    padding: 0; 
    margin: 0;
    gap: 10px;
    border-radius: 0;
    z-index: 10001;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.taskbar.hidden {
    transform: translateY(calc(var(--xdev-taskbar-height) - 3px));
}
*/

        /* Con secciones para ocupar el width 100% */
        /*
.taskbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;

    ... Resto del CSS
}

.taskbar-section {
    display: flex;
    align-items: center;
    flex: 1; 
}

.section-left {
    justify-content: flex-start;
}

.section-center {
    justify-content: center;
    flex: 0 0 auto; 
}

.section-right {
    justify-content: flex-end;
}

#clock {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    padding-right: 10px;
}
*/

        .taskbar {
            position: fixed;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            height: var(--xdev-taskbar-height);
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(30px);
            display: flex;
            align-items: center;
            padding: 0 8px;
            gap: 5px;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            z-index: 10001;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            max-width: 90vw;
            overflow-x: auto;
            scrollbar-width: none;
            /* Firefox */
        }

        .taskbar::-webkit-scrollbar {
            display: none;
            /* Chrome/Safari */
        }

        .taskbar.hidden {
            transform: translateX(-50%) translateY(calc(var(--xdev-taskbar-height) - 3px));
            cursor: pointer;
        }

        .start-button {
            width: 48px;
            height: 48px;
            background: transparent;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 24px;
            transition: all 0.2s ease;
        }

        .start-button:hover {
            background: rgba(0, 0, 0, 0.1);
            transform: scale(1.05);
        }

        .start-button.active {
            background: rgba(0, 0, 0, 0.15);
        }

        .taskbar-separator {
            width: 1px;
            height: 30px;
            background: rgba(0, 0, 0, 0.2);
            margin: 0 3px;
            align-self: center;
        }

        .taskbar-icon {
            width: 48px;
            height: 48px;
            border: none;
            border-radius: 8px;
            background: transparent;
            cursor: pointer;
            font-size: 24px;
            transition: all 0.2s ease;
            position: relative;
        }

        .taskbar-icon img {
            width: 24px;
            height: 24px;
            border: none;
            border-radius: 8px;
            background: transparent;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

        .taskbar-icon:hover {
            background: rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        .taskbar-icon.running::after {
            content: '';
            position: absolute;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: #667eea;
            border-radius: 50%;
            animation: dotPulse 2s ease infinite;
        }

        @keyframes dotPulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }
        }

        .taskbar-icon.minimized {
            background: rgba(0, 0, 0, 0.1);
        }

        .taskbar-icon.minimized::after {
            width: 20px;
            height: 3px;
            border-radius: 2px;
        }

        .start-menu {
            position: fixed;
            /*bottom: 80px;*/
            bottom: calc(var(--xdev-taskbar-height) + 10px);
            left: 50%;
            transform: translateX(-50%);
            width: 620px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(40px);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            display: none;
            flex-direction: column;
            max-height: 700px;
            opacity: 0;
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 10000;
        }

        .start-menu.active {
            display: flex;
            opacity: 1;
            animation: menuSlideUp 0.2s ease;
        }

        @keyframes menuSlideUp {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .start-menu-header {
            padding: 30px 30px 20px 30px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        }

        .start-menu-search input {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 6px;
            font-size: 14px;
        }

        .start-menu-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px 30px;
        }

        .section-title {
            font-size: 13px;
            font-weight: 600;
            color: #333;
            margin-bottom: 16px;
        }

        .start-menu-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background: rgba(0, 0, 0, 0.1);
            /* Un tono más oscuro que el resto del menú */
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .apps-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 8px;
            margin-bottom: 30px;
        }

        .app-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 8px;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .app-item:hover {
            background: rgba(0, 0, 0, 0.05);
            transform: translateY(-2px);
        }

        .app-item:active {
            transform: scale(0.95);
        }

        .app-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }

        .app-icon img {
            width: 1em;
            height: auto;
            vertical-align: middle;
            display: inline-block;
            transform: translateY(1px);
        }

        .app-name {
            font-size: 11px;
            color: #333;
            text-align: center;
        }

        textarea {
            width: 100%;
            height: 100%;
            border: none;
            font-family: 'Courier New', monospace;
            resize: none;
        }

        .calculator {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            width: 100%;
            max-width: 400px;
            height: 100%;
        }

        .calc-display {
            grid-column: 1 / -1;
            padding: 20px;
            background: #f0f0f0;
            border-radius: 8px;
            text-align: right;
            font-size: 24px;
            margin-bottom: 10px;
            word-break: break-all;
        }

        .calc-btn {
            padding: 20px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            min-height: 60px;
            transition: all 0.2s ease;
        }

        .calc-btn:hover {
            background: #5568d3;
            transform: scale(1.05);
        }

        .calc-btn:active {
            transform: scale(0.95);
        }

        .clock-display {
            font-size: 72px;
            font-weight: bold;
            text-align: center;
            color: #667eea;
            margin: 40px 0 20px 0;
            font-family: 'Courier New', monospace;
        }

        .date-display {
            font-size: 24px;
            text-align: center;
            color: #666;
            text-transform: capitalize;
        }

        .settings-section {
            margin-bottom: 30px;
        }

        .settings-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .settings-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .settings-option:hover {
            background: #e9ecef;
            transform: translateX(5px);
        }

        .music-player {
            text-align: center;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .album-cover {
            width: 200px;
            height: 200px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            margin: 30px auto;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 80px;
            transition: transform 0.3s ease;
        }

        .album-cover.playing {
            animation: spin 3s linear infinite;
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        .song-info {
            margin: 20px 0;
        }

        .song-title {
            font-size: 24px;
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
        }

        .song-artist {
            font-size: 16px;
            color: #666;
        }

        .progress-bar {
            width: 80%;
            height: 6px;
            background: #e0e0e0;
            border-radius: 3px;
            margin: 20px auto;
            position: relative;
            cursor: pointer;
        }

        .progress-fill {
            height: 100%;
            background: #667eea;
            border-radius: 3px;
            width: 0%;
            transition: width 0.1s linear;
        }

        .progress-time {
            display: flex;
            justify-content: space-between;
            width: 80%;
            margin: 5px auto;
            font-size: 12px;
            color: #666;
        }

        .player-controls {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
        }

        .player-btn {
            width: 50px;
            height: 50px;
            border: none;
            border-radius: 50%;
            background: #667eea;
            color: white;
            font-size: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .player-btn:hover {
            background: #5568d3;
            transform: scale(1.1);
        }

        .player-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .player-btn.play {
            width: 60px;
            height: 60px;
            font-size: 24px;
        }

        .volume-control {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
        }

        .volume-slider {
            width: 120px;
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            position: relative;
            cursor: pointer;
        }

        .volume-fill {
            height: 100%;
            background: #667eea;
            border-radius: 2px;
            width: 70%;
        }

        .camera-preview {
            width: 100%;
            height: 100%;
            background: #000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: white;
            position: relative;
        }

        .camera-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .camera-placeholder {
            font-size: 80px;
        }

        .camera-text {
            font-size: 18px;
            margin-top: 20px;
        }

        .camera-controls {
            position: absolute;
            bottom: 20px;
            display: flex;
            gap: 15px;
        }

        .camera-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            color: white;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .camera-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        .camera-btn.capture {
            background: #667eea;
            width: 70px;
            height: 70px;
        }

        .settings-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .settings-option:hover {
            background: #e9ecef;
            transform: translateX(5px);
        }

        .settings-value {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #667eea;
            font-weight: 500;
        }

        .color-circle {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .settings-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 20000;
        }

        .settings-modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 12px;
            padding: 30px;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .modal-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 20px;
            color: #333;
        }

        .modal-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .modal-option {
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modal-option:hover {
            border-color: #667eea;
            background: #f0f3ff;
        }

        .modal-option.selected {
            border-color: #667eea;
            background: #667eea;
            color: white;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .modal-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .modal-btn.primary {
            background: #667eea;
            color: white;
        }

        .modal-btn.primary:hover {
            background: #5568d3;
        }

        .modal-btn.secondary {
            background: #e0e0e0;
            color: #333;
        }

        .modal-btn.secondary:hover {
            background: #d0d0d0;
        }

        /* Esto asegura que el contenido de la ventana sea oscuro siempre */
        #win-terminal .window-content {
            background-color: #1e1e1e !important;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        /* Terminal */
        .terminal {
            background: #1e1e1e;
            color: #d4d4d4;
            font-family: 'Consolas', 'Monaco', 'Lucida Console', 'Ubuntu Mono', monospace;
            padding: 15px;
            height: 100%;
            overflow-y: auto;
            font-size: 14px;
            line-height: 1.4;
            box-sizing: border-box;
        }

        .terminal-line {
            margin-bottom: 5px;
            word-wrap: break-word;
        }

        .terminal-prompt {
            color: #4ec9b0;
        }

        .terminal-command {
            color: #d4d4d4;
        }

        .terminal-output {
            color: #a9cc8d;
            /* Un verde suave tipo retro-tech */
            white-space: pre-line;
            /* Mantiene los saltos de línea del string */
            display: block;
            margin: 5px 0;
            margin-left: 0;
        }

        .terminal-error {
            color: #f48771;
        }

        .terminal-input-line {
            display: flex;
            gap: 5px;
        }

        .terminal-input {
            flex: 1;
            background: transparent;
            border: none;
            color: #d4d4d4;
            font-family: 'Courier New', Consolas, monospace;
            font-size: 14px;
            outline: none;
        }

        /* Contenedor central del fondo */
        .desktop-wallpaper-content {
            position: absolute;
            top: 52%;
            /*80%*/
            left: 26%;
            /*85%;*/
            transform: translate(-50%, -50%);
            text-align: center;
            z-index: 0;
            pointer-events: none;
            opacity: 0.9;
            user-select: none;
            transition: filter 0.3s ease, opacity 0.3s ease;
        }

        .desktop-blur .desktop-wallpaper-content {
            filter: blur(10px);
            opacity: 0.7;
        }

        /* Estilo de la imagen (favicon) en el fondo */
        .wallpaper-icon {
            width: 100px;
            height: 100px;
            object-fit: contain;
            margin-bottom: 30px;
            /*15px*/
            filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
        }

        /* Texto del título */
        .wallpaper-title {
            font-size: 48px;
            font-weight: 650;
            color: #00CED1;
            /*rgba(128, 128, 128, 0.9);*/
            /*white;*/
            letter-spacing: 3px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            margin-left: 10px;
        }

        /* Texto de la version */
        .wallpaper-version {
            font-size: 28px;
            color: #FFA500;
            /*rgba(255, 255, 255, 0.7);*/
            margin-top: 5px;
            margin-left: 10px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            font-weight: 450;
        }

        /*
        .context-menu {
            position: fixed;
            z-index: 10000;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            width: 180px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            padding: 5px 0;
        }

        .context-menu-item {
            padding: 10px 15px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background 0.2s;
        }

        .context-menu-item:hover {
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
        }
        */

        .context-menu {
            position: fixed;
            z-index: 10000;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 12px;
            width: 220px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
            padding: 8px 0;
            font-family: 'Segoe UI', sans-serif;
        }

        .context-menu-item {
            padding: 10px 16px;
            font-size: 14px;
            font-weight: 500;
            color: #333;
        }

        .context-menu-item:hover {
            background: #0078d4;
            color: white;
        }

        .context-menu-divider {
            height: 1px;
            background: rgba(0, 0, 0, 0.20);
            margin: 5px 0;
        }

        /* Solo afecta a los iconos que están en el escritorio */
        .desktop .app-item {
            width: 100px;
            /* Antes ~80px */
            height: 110px;
            margin: 15px;
            padding: 10px;
        }

        /* Aumentar el tamaño del emoji/icono en el escritorio */
        .desktop .app-icon {
            font-size: 50px;
            /* Antes ~32px */
            margin-bottom: 8px;
            transition: transform 0.2s;
        }

        /* Aumentar y mejorar la legibilidad del título */
        .desktop .app-name {
            font-size: 14px;
            /* Un poco más grande */
            font-weight: 500;
            text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.8);
            /* Sombra para resaltar sobre el fondo */
            color: white;
            width: 100%;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            /* Si el nombre es muy largo, pone "..." */
        }

        /* Efecto al pasar el ratón para que se sienta interactivo */
        .desktop .app-item:hover .app-icon {
            transform: scale(1.1);
        }

        .taskmgr-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            background: #f3f3f3;
            color: #333;
            font-family: sans-serif;
        }

        .taskmgr-header {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            padding: 10px;
            background: #e1e1e1;
            font-weight: bold;
            font-size: 12px;
            border-bottom: 1px solid #ccc;
        }

        /*
        .taskmgr-footer {
            padding: 15px;
            background: #ebebeb;
            border-top: 1px solid #ccc;
            display: flex;
            justify-content: center;
        }
*/

        .taskmgr-footer {
            padding: 10px;
            text-align: right;
            background: #e1e1e1;
        }

        .btn-refresh {
            background: linear-gradient(180deg, #6e6e6e 0%, #4a4a4a 100%);
            color: white;
            border: 1px solid #333;
            padding: 8px 24px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
            transition: all 0.2s ease;
        }

        .btn-refresh:hover {
            background: linear-gradient(180deg, #7a7a7a 0%, #555555 100%);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .btn-refresh:active {
            transform: translateY(1px);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .task-item {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            align-items: center;
            padding: 10px 15px;
            border-bottom: 1px solid #eee;
        }

        .task-app-info {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
        }

        .task-list {
            flex-grow: 1;
            overflow-y: auto;
        }

        .task-item:hover {
            background: #e9e9e9;
        }

        .status-active {
            color: #28a745;
            font-weight: bold;
        }

        .btn-kill {
            background: #ff4d4d;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 3px;
            cursor: pointer;
        }

        .btn-kill:hover {
            background: #cc0000;
        }

        #win-sheets .window-content {
            background: white;
            padding: 0 !important;
            /* Sheets necesita todo el espacio */
        }

        #win-sheets iframe {
            display: block;
        }

        .power-group {
            display: flex;
            gap: 10px;
        }

        .power-btn {
            background: transparent;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
            padding: 8px;
            border-radius: 5px;
            transition: background 0.2s;
        }

        .power-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .power-btn[title="Apagar"]:hover {
            background: #e74c3c;
            /* Rojo al pasar por encima de apagar */
        }

        .power-on-btn {
            background: none;
            border: 2px solid #333;
            color: #333;
            border-radius: 50%;
            width: 80px;
            height: 80px;
            font-size: 35px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .power-on-btn:hover {
            color: #4285f4;
            border-color: #4285f4;
            box-shadow: 0 0 20px rgba(66, 133, 244, 0.6);
            transform: scale(1.1);
        }

        #shutdown-layer {
            /* Este es el que importa ahora */
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: black;
            z-index: 10001;
            /* Un nivel por encima de las ventanas y el boot original */
            display: none;
            /* Se activa por JS */
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .loader-content {
            text-align: center;
        }

        .os-logo {
            font-size: 2.5rem;
            font-weight: bold;
            display: block;
            margin-bottom: 20px;
            letter-spacing: 2px;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(255, 255, 255, 0.1);
            border-top: 4px solid #4285f4;
            /* Azul Google para coherencia */
            border-radius: 50%;
            margin: 0 auto 20px;
            animation: spin 1s linear infinite;
        }

        .os-prompt-input {
            width: 100%;
            padding: 10px;
            margin-top: 15px;
            background: #000;
            border: 1px solid #444;
            border-radius: 4px;
            color: white;
            outline: none;
            box-sizing: border-box;
        }

        .os-prompt-input:focus {
            border-color: #4285f4;
            box-shadow: 0 0 5px rgba(66, 133, 244, 0.5);
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .google-auth-btn span {
            font-size: 1.2em;
            vertical-align: middle;
        }

        .google-auth-btn:active {
            transform: translateY(1px);
            filter: brightness(0.9);
        }

        .google-auth-btn {
            background: white;
            color: #444;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 8px 16px;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .google-auth-btn:hover {
            background: #f8f8f8;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }


        .fc {
            background: #1e1e1e;
            color: white;
            padding: 10px;
            border-radius: 8px;
        }

        .fc-event {
            cursor: move;
            background-color: #4285f4;
            border: none;
        }

        .fc-theme-standard td,
        .fc-theme-standard th {
            border: 1px solid #333;
        }

        #calendar-container {
            flex: 1 1 auto !important;
            display: flex !important;
            flex-direction: column !important;
            min-height: 0;
            /*min-height: 500px;*/
            width: 100%;
            height: 100%;
            background-color: #1e1e1e;
            /* overflow: hidden; */
        }

        #xdev-clock {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            justify-content: center;
            padding: 0 15px;
            color: #000;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            cursor: default;
            user-select: none;
            font-size: 14px;
            margin-left: auto;
            /* Empuja el reloj al extremo derecho */
        }

        #xdev-clock .time {
            justify-content: center;
            font-weight: 700;
        }

        #xdev-clock .date {
            justify-content: center;
            font-weight: 700;
            font-size: 12px;
            opacity: 0.8;
        }

        /*

@keyframes taskbar-pulse {
    0% { background-color: rgba(0, 120, 212, 0.5); }
    50% { background-color: rgba(0, 120, 212, 1); box-shadow: 0 0 10px #0078d4; }
    100% { background-color: rgba(0, 120, 212, 0.5); }
}

.taskbar-item.notifying {
    animation: taskbar-pulse 1.5s infinite;
    color: white !important;
}
*/

        /* --- CODE EDITOR STYLES --- */
        .window-menu-bar {
            background: #e1e1e1;
            padding: 5px;
            border-bottom: 1px solid #eee;
            display: flex;
            gap: 10px;
        }

        .btn-action {
            background: #ddd;
            border: 1px solid #bbb;
            border-radius: 3px;
            padding: 3px 10px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 700;
            transition: background 0.2s;
        }

        .btn-action:hover {
            background: #e9e9e9;
        }

        .btn-add {
            background: #e8f5e9;
            border-color: #a5d6a7;
            color: #2e7d32;
        }

        .btn-import {
            background: #e3f2fd;
            border-color: #90caf9;
            color: #1565c0;
        }

        .btn-export {
            background: #fff3e0;
            border-color: #ffcc80;
            color: #ef6c00;
        }

        .btn-execute {
            background: #ffcc80;
            border-color: #ffcc80;
            color: gray;
        }

        /* --- DATA EXPLORER STYLES --- */
        .data-viewer-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            padding: 0;
        }

        .data-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background: #f5f6fa;
            border-bottom: 1px solid #ddd;
            gap: 10px;
        }

        .toolbar-left,
        .toolbar-right {
            display: flex;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #f6f8fa;
            font-size: 12px;
            color: #8993a4;
        }

        .task-actions {
            display: flex;
            gap: 6px;
        }

        .task-action-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            padding: 4px;
            opacity: 0.6;
            transition: opacity 0.2s;
        }

        .task-action-btn:hover {
            opacity: 1;
        }

        .board-column.drag-over {
            background: #f0f4ff;
            border: 2px dashed #667eea;
        }