/* Restablecemos márgenes y rellenos */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'MS Sans Serif';
    src: url('https://themes.cdn.pixel.net/api/fonts/ms-sans-serif.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body#win95-desktop {
    background-color: #008080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Estilos de Iconos de Escritorio */
#desktop-icons {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 30px; 
    align-content: start;
    height: calc(100vh - 65px); 
    z-index: 1; 
}

.desktop-icon {
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 10px;
    transition: background-color 0.1s;
    user-select: none; 
}

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.desktop-icon img {
    width: 75px; 
    height: 75px;
    margin-bottom: 10px;
}

.desktop-icon span {
    font-size: 22px; 
    display: block;
    text-shadow: 1px 1px 2px black; 
}

/* Estilos de las Ventanas */
.window-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
}

.window {
    background-color: #c0c0c0;
    border: 2px solid #ffffff;
    border-right-color: #000000;
    border-bottom-color: #000000;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    width: 600px; 
    position: absolute; 
    display: none; 
    pointer-events: auto; 
}

.window-header {
    background-color: #000080;
    color: #ffffff;
    padding: 2px 5px;
    height: 35px; 
    display: flex;
    align-items: center;
    border-bottom: 2px solid #cccccc;
    cursor: move; 
    user-select: none;
}

.title-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    pointer-events: none;
}

.title-text {
    font-weight: bold;
    font-size: 18px; 
    flex-grow: 1;
    pointer-events: none;
}

.control-btn {
    background-color: #c0c0c0;
    color: #000000;
    width: 28px; 
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border: 2px solid #ffffff;
    border-right-color: #000000;
    border-bottom-color: #000000;
    font-weight: bold;
    font-size: 18px; 
    cursor: pointer;
    box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.5);
}

.control-btn:active {
    border: 2px solid #000000;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    box-shadow: inset -1px -1px 0px rgba(0, 0, 0, 0.5);
}

.window-body {
    padding: 15px;
}

.window-body p {
    font-size: 18px; 
    margin-bottom: 12px;
}

.window-body ul {
    list-style-type: disc;
    margin-left: 25px;
    font-size: 18px; 
}

.window-body li {
    margin-bottom: 8px;
}

.window-body a {
    color: #000000;
    text-decoration: underline;
}

.window-body a:hover {
    color: #000080;
}

/* Barra de Tareas */
#taskbar {
    background-color: #c0c0c0;
    height: 65px; 
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 3px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 9999; 
}

.start-btn {
    background-color: #c0c0c0;
    color: #000000;
    text-decoration: none;
    border: 2px solid #ffffff;
    border-right-color: #000000;
    border-bottom-color: #000000;
    height: 48px; 
    padding: 0 15px;
    display: flex;
    align-items: center;
    box-shadow: inset 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.start-btn:active {
    border: 2px solid #000000;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    box-shadow: inset -2px -2px 0px rgba(0, 0, 0, 0.5);
}

.start-icon {
    width: 32px; 
    height: 32px;
    margin-right: 10px;
}

.start-btn span {
    font-weight: bold;
    font-size: 22px; 
}

.minimized-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
}

.clock-section {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #000000;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    padding: 5px 15px;
    height: 38px; 
}

.speaker-icon {
    width: 28px; 
    height: 28px;
}

.clock {
    font-size: 20px; 
}

/*ESTILOS PARA EL VISOR DE IMÁGENES*/
.folder-window {
    width: 750px; 
}

.folder-menu {
    background-color: #c0c0c0;
    padding: 2px 10px;
    border-bottom: 2px solid #ffffff;
    font-size: 18px;
    display: flex;
    gap: 15px;
}

.folder-menu span {
    cursor: default;
    padding: 2px 5px;
}

.folder-menu span:hover {
    background-color: #000080;
    color: #ffffff;
}

.folder-content {
    background-color: #ffffff;
    border: 3px solid #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    height: 450px; 
    overflow-y: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    align-content: start;
}

.file-item {
    text-align: center;
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    padding: 5px;
    user-select: none;
}

.file-item:hover {
    background-color: #000080;
    color: #ffffff;
}

.file-item img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    margin-bottom: 5px;
    border: 1px solid #cccccc; 
}

.file-item span {
    font-size: 16px;
    display: block;
    word-wrap: break-word; 
}

.folder-statusbar {
    background-color: #c0c0c0;
    padding: 5px 15px;
    font-size: 16px;
    border-top: 2px solid #808080;
    border-bottom: 2px solid #ffffff;
}

/* ESTILOS PARA EL VISOR DE IMÁGENES */
.image-viewer-window {
    width: auto;
    max-width: 85vw; 
}

.image-viewer-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #808080; 
    border: 3px solid #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

#viewer-img {
    max-width: 80vw;
    max-height: 70vh; 
    object-fit: contain; 
    display: block;
}

/* MENÚ DE INICIO */
#start-menu {
    position: fixed;
    bottom: 65px; /* Aparece justo arriba de tu barra de tareas escalada */
    left: 0;
    width: 280px;
    background-color: #c0c0c0;
    border: 3px solid #ffffff;
    border-right-color: #000000;
    border-bottom-color: #000000;
    display: flex;
    z-index: 10000;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.start-sidebar {
    background-color: #808080; /* El banner clásico lateral */
    color: #c0c0c0;
    width: 45px;
    position: relative;
}

.start-sidebar span {
    position: absolute;
    bottom: 10px;
    left: 5px;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    font-size: 26px;
    font-weight: bold;
    white-space: nowrap;
}

.start-items {
    flex-grow: 1;
    padding: 5px;
}

.start-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    text-decoration: none;
    color: black;
    font-size: 22px;
}

.start-item:hover {
    background-color: #000080;
    color: white;
}

.start-item img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

/* =========================================
   EFECTO DE APAGADO Y PANTALLA CRT
   ========================================= */
#shutdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999; /* Cubre todo el sitio */
}

#burn-in-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Crea el efecto de imagen fantasma quemada en el tubo de rayos catódicos */
    backdrop-filter: grayscale(1) contrast(3) brightness(0.2) sepia(0.5); 
}

.progress-bar-container {
    background-color: #c0c0c0;
    border: 3px solid #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    height: 35px;
    padding: 3px;
    margin-top: 20px;
}

#progress-blocks-area {
    display: flex;
    gap: 4px;
    height: 100%;
}

.progress-block {
    background-color: #000080;
    width: 22px;
    height: 100%;
}

#safe-to-turn-off {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ff6600; /* Naranja fósforo */
    font-family: 'Courier New', Courier, monospace; 
    font-size: 38px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000001;
    cursor: pointer;
}