:root {
    --window-bg: rgba(249, 249, 249, 0.85);
    --sidebar-bg: rgba(240, 240, 240, 0.8);
    --accent-color: #0078d4;
    --border-color: rgba(0, 0, 0, 0.1);
    --nokia-bg: #c7d1c3;
    --nokia-screen-bg: #9aa899;
    --nokia-screen-border: #3b3f38;
    --nokia-text: #3b3f38;
}
html { height: 100%; }
body, html {
    width: 100%; 
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none; background-color: #FFFFFF;
}



/* Desktop specific styles */
@media (min-width: 1024px) {
    body, html { height: 100%; } 
    #desktop { 
        width: 100%; height: 100%; position: relative; overflow: hidden;
        background-image: url('image/fondoescritorio.png');
        background-size: cover;
        background-position: center;
    } 
    #desktop-logo {
        position: absolute; top: 20px; left: 20px;
        z-index: 1; opacity: 0.8; pointer-events: none;
    }
    #desktop-logo img { width: 250px; height: auto; }
    .desktop-icon {
        text-align: center; width: 120px; padding: 10px 5px; cursor: pointer; border-radius: 6px; 
        transition: background-color 0.2s ease; z-index: 2;
        color: white; /* Color de texto de íconos de escritorio */
    }
    .desktop-icon:hover { background-color: rgba(255, 255, 255, 0.15); }
    /* Estilo para el contenedor del SVG */
    .desktop-icon > div {
        width: 40px;
        height: 40px;
        margin: 0 auto;
    }
    .desktop-icon p { 
        font-size: 13px; 
        margin-top: 6px; 
        line-height: 1.2; 
        height: 3.2em; 
        font-weight: 500;
        /* Sombra de texto con contorno para mejor legibilidad */
        text-shadow: 0 0 3px rgba(0,0,0,0.7), 0 0 5px rgba(0,0,0,0.7);
    }
    
    .window {
        position: absolute; width: 720px; height: 550px; background-color: var(--window-bg);
        backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2); resize: both; overflow: hidden;
        min-width: 450px; min-height: 350px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1);
        display: none; flex-direction: column; z-index: 10; transition: all 0.2s ease-in-out;
    }
    .window.is-dragging {
        transition: none !important;
    }
    .window.maximized {
        top: 0 !important; left: 0 !important; width: 100% !important; height: calc(100% - 48px) !important; border-radius: 0; resize: none;
    }
    .title-bar {
        padding: 8px 12px; font-weight: 600; cursor: move; display: flex;
        justify-content: space-between; align-items: center; width: 100%; flex-shrink: 0; color: #333;
    }
    .title-bar-buttons button { background: transparent; border: none; width: 36px; height: 32px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
    .title-bar-buttons button:hover { background-color: rgba(0,0,0,0.1); }
    .title-bar-buttons .close-btn:hover { background-color: #e81123; color: white; }
    .toolbar { display: flex; align-items: center; padding: 4px 12px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
    .toolbar-btn { background: transparent; border: none; font-size: 16px; padding: 4px 8px; margin-right: 4px; border-radius: 4px; }
    .toolbar-btn:hover { background-color: rgba(0,0,0,0.08); }
    .window-body { display: flex; flex-grow: 1; height: calc(100% - 80px); }
    .sidebar { width: 220px; background-color: var(--sidebar-bg); padding: 8px; border-right: 1px solid var(--border-color); flex-shrink: 0; display: flex; flex-direction: column;}
    .main-content { flex-grow: 1; padding: 15px 20px; overflow-y: auto; }
    .gallery-grid-item {
        width: 100%;
        aspect-ratio: 1 / 1; /* Makes them square */
    }
    .gallery-grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
}

/* --- Mobile & Tablet Styles --- */
#mobile-homescreen {
    transition: all 0.3s ease-in-out;
    background-image: url('image/fondomovil1.png');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    padding-bottom: 90px; /* Espacio para el dock */
}
/* Efecto de desenfoque para One UI */
#mobile-homescreen.blurred {
    filter: blur(10px) brightness(0.8);
    transform: scale(0.98);
    border-radius: 20px;
    overflow: hidden; /* Importante para el efecto de escala */
}

/* Modal estilo One UI */
#mobile-modal {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    background-color: var(--window-bg); /* Fondo semi-transparente */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}
#mobile-modal.is-open {
    transform: translateY(0);
}
#modal-header {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Dock estilo One UI */
#mobile-dock {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7); /* Fondo de dock */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    z-index: 30; /* Encima del homescreen, debajo del modal */
}
.dock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px; /* Squircles */
}
.dock-icon i {
    font-size: 24px;
    color: white;
}

/* Estilos para el Reloj de la Pantalla de Bloqueo Móvil */
#mobile-lock-time {
    font-size: 5rem; /* 80px */
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
}
#mobile-lock-date {
    font-size: 1.125rem; /* 18px */
    font-weight: 500;
    opacity: 0.8;
}

.sidebar-item { display: flex; align-items: center; width: 100%; padding: 6px 10px; border-radius: 4px; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.sidebar-item:hover { background-color: rgba(0,0,0,0.05); }
.sidebar-item.active { background-color: rgba(0, 120, 212, 0.2); border-color: rgba(0, 120, 212, 0.4); font-weight: 600;}
.sidebar-item i { margin-right: 12px; width: 16px; text-align: center; }
.content-pane { display: none; } .content-pane.active { display: block; }
.content-pane ul { list-style-type: disc; padding-left: 20px; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #000; border-radius: 6px;}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%;}

#taskbar {
    position: absolute; bottom: 0; width: 100%; height: 48px; background-color: rgba(243, 243, 243, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex;
    justify-content: space-between;
    align-items: center; padding: 0 10px; z-index: 1000; border-top: 1px solid rgba(0,0,0,0.1);
}
.taskbar-center { display: flex; justify-content: center; align-items: center; height: 100%; }
.taskbar-center > button { width: 48px; height: 40px; border-radius: 4px; margin: 0 2px; font-size: 20px; display: inline-flex; justify-content: center; align-items: center; transition: background-color 0.2s; border: none; background-color: transparent; }
.taskbar-center > button:hover { background-color: rgba(0, 120, 212, 0.2); }
#taskbar-apps { flex-grow: 1; display: flex; justify-content: center; align-items: center; height: 100%; }
.taskbar-app { background: transparent; border: none; height: 40px; padding: 0 10px; font-size: 20px; color: #333; border-radius: 4px; margin: 0 2px; transition: background-color 0.2s ease; border-bottom: 2px solid transparent; }
.taskbar-app:hover { background-color: rgba(0,0,0,0.1); }
.taskbar-app.active { background-color: rgba(0, 120, 212, 0.2); border-bottom: 2px solid var(--accent-color); }

#start-button { color: var(--accent-color); }
.taskbar-right { display: flex; align-items: center; }
#clock { font-size: 13px; padding: 5px 10px; text-align: right; }

#start-menu {
    display: none;
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    height: 600px;
    background-color: rgba(243, 243, 243, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0;
    flex-direction: column;
}

.start-menu-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    height: 80px;
}
.start-menu-grid-item:hover {
    background-color: rgba(0, 0, 0, 0.08);
}
.start-menu-grid-item i {
    font-size: 24px;
}
.start-menu-grid-item p {
    font-size: 11px;
    margin-top: 8px;
    line-height: 1.2;
    font-weight: 500;
    height: 2.4em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.start-menu-footer {
    background-color: rgba(229, 231, 235, 0.5);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.spinner-windows {
    width: 48px;
    height: 48px;
    display: inline-block;
    position: relative;
}
.spinner-windows::after,
.spinner-windows::before {
    content: '';
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FFF;
    position: absolute;
    left: 0;
    top: 0;
    animation: anim-spinner-windows 2s linear infinite;
}
.spinner-windows::after {
    animation-delay: -1s;
}

@keyframes anim-spinner-windows {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Game Styles */
.nokia-game-window { background-color: var(--nokia-bg); font-family: monospace; color: var(--nokia-text); }
.nokia-screen { background-color: var(--nokia-screen-bg); border: 2px solid var(--nokia-screen-border); padding: 4px; box-shadow: inset 2px 2px 4px rgba(0,0,0,0.3); }
.game-canvas { display: block; image-rendering: pixelated; }

.minesweeper-board { display: grid; border: 2px solid #7b7b7b; }
.minesweeper-cell { width: 30px; height: 30px; background-color: #bdbdbd; border: 2px outset #ffffff; display: flex; justify-content: center; align-items: center; font-size: 16px; font-weight: bold; cursor: pointer; }
.minesweeper-cell.revealed { background-color: #d6d6d6; border: 1px solid #7b7b7b; }
.minesweeper-cell.mine { background-color: #ff4141; }
.minesweeper-cell.flagged::before { content: '🚩'; }
.c-1 { color: #0000ff; } .c-2 { color: #008000; } .c-3 { color: #ff0000; } .c-4 { color: #00008b; } .c-5 { color: #8b0000; } .c-6 { color: #008b8b; } .c-7 { color: #000000; } .c-8 { color: #808080; }

#pairs-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pair-card { width: 100%; aspect-ratio: 1 / 1; background-color: var(--nokia-text); cursor: pointer; transition: transform 0.3s; transform-style: preserve-3d; }
.pair-card.flipped, .pair-card.matched { transform: rotateY(180deg); background-color: var(--nokia-screen-bg); }
.pair-card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; justify-content: center; align-items: center; font-size: 2em; }
.pair-card-back { transform: rotateY(180deg); }

.icon-color-blue { color: #0078D4; } .icon-bg-blue { background-color: #0078D4; }
.icon-color-purple { color: #8A2BE2; } .icon-bg-purple { background-color: #8A2BE2; }
.icon-color-orange { color: #FF8C00; } .icon-bg-orange { background-color: #FF8C00; }
.icon-color-yellow { color: #B8860B; } .icon-bg-yellow { background-color: #B8860B; }
.icon-color-red { color: #DC143C; } .icon-bg-red { background-color: #DC143C; }
.icon-color-green { color: #2E8B57; } .icon-bg-green { background-color: #2E8B57; }
.icon-color-teal { color: #20B2AA; } .icon-bg-teal { background-color: #20B2AA; }
.icon-color-darkblue { color: #00008B; } .icon-bg-darkblue { background-color: #00008B; }
.icon-color-slate { color: #708090; } .icon-bg-slate { background-color: #708090; }
.icon-color-steel { color: #4682B4; } .icon-bg-steel { background-color: #4682B4; }
.icon-color-gray { color: #696969; } .icon-bg-gray { background-color: #696969; }
.icon-color-lightblue { color: #5F9EA0; } .icon-bg-lightblue { background-color: #5F9EA0; }

/* Estilo para el acordeón interactivo */
.accordion-toggle i {
    transition: transform 0.2s ease-in-out;
}
