/* --- CONFIGURAÇÕES GERAIS --- */
body {
    background-color: #008080; 
    background-image: url(img/noise.gif);/* A clássica cor "Teal" do Windows 98 */
    /* Se quiser manter seu GIF de ruído, descomente a linha abaixo: */
    /* background-image: url('img/noise.gif'); */
    margin: 0;
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
}

/* --- LAYOUT PRINCIPAL (GRID) --- */
.layout-container {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar content";
    grid-template-rows: auto 1fr; /* Topo automático, resto preenche */
    grid-template-columns: 250px 1fr; /* Lateral 250px, resto preenche */
    gap: 15px; /* Espaço entre as janelas */
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- AJUSTES DAS JANELAS (98.css) --- */

/* Header */
header.window {
    grid-area: header;
    z-index: 10;
}

.header-buttons-container {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.header-buttons-container button {
    font-weight: bold;
    min-width: 80px;
    cursor: pointer;
}

/* Sidebar */
aside.window {
    grid-area: sidebar;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Estilizando lista lateral para parecer sistema de arquivos */
ul.tree-view {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

ul.tree-view li {
    margin-bottom: 5px;
}

ul.tree-view a {
    color: black;
    text-decoration: none;
}

ul.tree-view a:hover {
    color: blue;
    text-decoration: underline;
}


/* Main Content */
main.window {
    grid-area: content;
    overflow: hidden; /* Garante que a janela não estoure */
    display: flex;
    flex-direction: column;
}

/* Garante que o scroll fique DENTRO do corpo da janela, não na página toda */
main .window-body {
    overflow-y: auto;
    height: 100%;
}

/* Imagens responsivas dentro das janelas */
img {
    max-width: 100%;
    height: auto;
}

/* --- RESPONSIVIDADE (Celular) --- */
@media (max-width: 700px) {
    body {
        padding: 10px;
        height: auto; /* Permite rolagem no celular */
    }

    .layout-container {
        grid-template-areas:
            "header"
            "sidebar"
            "content";
        grid-template-rows: auto auto auto;
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .header-buttons-container {
        flex-wrap: wrap;
        justify-content: center;
    }
}