body {
    margin: 0;
    /* Alteração: Remover padding para que width: 100% no main-window e footer funcione */
    padding: 0; 
    
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a);
    font-family: 'Courier New', monospace;
    color: #00ffcc;
    overflow: hidden;
    height: 100vh;
    
    /* Alteração: Garantir que os filhos (main-window e footer) se empilham verticalmente */
    display: flex;
    flex-direction: column;
    
    justify-content: flex-start; /* Alinha o conteúdo ao topo (main-window) */
    align-items: center; /* Centraliza horizontalmente o conteúdo */
    box-sizing: border-box;
}

.main-window {
    /* Alteração: Ocupa todo o espaço vertical que sobra para empurrar o footer */
    flex-grow: 1; 
    
    width: calc(100% - 20px);
    height: auto; /* Definido pelo flex-grow: 1 */
    max-width: 100%; /* Garantia de que não ultrapassa */
    background: rgba(10, 20, 30, 0.85);
    border: 1px solid #00ffcc;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 0 10px #00ffcc;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0; /* Remover margem inferior para encostar no rodapé */
}

.top-windows {
    display: flex;
    gap: 10px;
    flex: 3;
    align-items: stretch;
    overflow: hidden;
}

.window {
    background: rgba(10, 20, 30, 0.85);
    border: 1px solid #00ffcc;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 0 10px #00ffcc;
    display: flex;
    flex-direction: column;
}

.window-1 {
    flex: 0.25;
    min-width: 180px;
}

.window-2 {
    flex: 2.25;
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a);
    position: relative;
    overflow: hidden;
}

.window-2 .content {
    padding: 10px;
    height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
}

.image-frame {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.window-3 {
    flex: 0.5;
}

.bottom-window {
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a);
    border: 1px solid #00ffcc;
    border-radius: 5px;
    padding: 10px;
    height: 150px;
    box-shadow: 0 0 5px #00ffcc;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 10px;
}

.bottom-window .header {
    background: #00ffcc;
    color: #0a0a1a;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    width: 100%;
    box-sizing: border-box;
}

.sub-windows {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    width: calc(100% - 60px);
    height: 130px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    margin-top: 10px;
}

.sub-windows::-webkit-scrollbar {
    display: none;
}

.sub-window {
    background: rgba(10, 20, 30, 0.85);
    border: 1px solid #00ffcc;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    cursor: pointer;
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    margin-right: 5px;
}

.sub-window:hover {
    box-shadow: 0 0 8px #00ffcc inset;
}

.sub-window .image-frame {
    width: 100%;
    height: 70%;
}

.sub-window-label {
    text-align: center;
    font-size: 10px;
    color: #00ffcc;
    padding: 2px 0;
    text-transform: uppercase;
}

.carousel-button {
    background: rgba(0, 255, 204, 0.2);
    border: 1px solid #00ffcc;
    color: #00ffcc;
    font-size: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: calc(50% + 15px);
    transform: translateY(-50%);
    border-radius: 3px;
    z-index: 20;
}

.carousel-button.left {
    left: 10px;
}

.carousel-button.right {
    right: 10px;
}

.carousel-button:hover {
    background: rgba(0, 255, 204, 0.4);
}

.circle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.circle {
    width: 40px;
    height: 40px;
    background: #00ffcc;
    color: #0a0a1a;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 5px #00ffcc;
    transition: transform 0.2s;
    position: absolute;
}

.circle:hover {
    transform: scale(1.1);
}

.circle-top-left {
    top: 5px;
    left: 5px;
}

.circle-top-right {
    top: 5px;
    right: 5px;
}

.circle-bottom-center {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.header {
    background: #00ffcc;
    color: #0a0a1a;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

.content {
    padding: 10px;
    font-size: 14px;
    height: calc(100% - 20px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#tree-container,
#tree-container-3 {
    padding: 0;
    margin: 0;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

#tree-container ul,
#tree-container-3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px;
}

#tree-container li,
#tree-container-3 li {
    margin: 5px 0;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

#tree-container .item,
#tree-container-3 .item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box;
}

#tree-container .icon,
#tree-container-3 .icon {
    width: 20px;
    text-align: center;
    color: #00ffcc;
    flex-shrink: 0;
}

#tree-container .file .icon,
#tree-container-3 .file .icon {
    margin-left: 20px;
}

#tree-container .name,
#tree-container-3 .name {
    margin-left: 5px;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tree-container .folder,
#tree-container-3 .folder,
#tree-container .file,
#tree-container-3 .file {
    cursor: pointer;
}

#tree-container ul ul,
#tree-container-3 ul ul {
    padding-left: 40px;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

#default-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 10px !important;
}

#default-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    display: block !important;
    box-sizing: border-box !important;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.svg-iframe-container {
    width: 100%;
    height: 100%;
    border: none;
}

.svg-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.svg-fullscreen {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.svg-fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.audio-controls {
    width: 100%;
    padding: 5px;
    background-color: rgba(0, 255, 204, 0.1);
    border-top: 1px solid #00ffcc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-controls input[type="range"] {
    width: 50%;
    accent-color: #00ffcc;
}

.audio-controls button {
    background: none;
    border: none;
    color: #00ffcc;
    cursor: pointer;
    font-size: 14px;
}
.window-1 {
    flex: 0.25;
    min-width: 180px;
}

.window-2 {
    flex: 2.25;
}

.window-3 {
    flex: 0.5;
    display: none;
}

/* When window 3 is visible */
.window-3.visible {
    display: flex;
    flex: 0.5;
}

/* Adjust window-2 flex when window-3 is visible */
.window-3.visible ~ .window-2 {
    flex: 1.5;
}

/* --- CORREÇÃO DO RODAPÉ (FOOTER) --- */
footer {
    /* Garante que o footer ocupa toda a largura */
    width: 100%;
    /* Define a aparência para corresponder ao tema */
    background: #0a0a1a;
    border-top: 1px solid #00ffcc;
    color: #00ffcc;
    font-size: 12px;
    padding: 5px 10px;
    box-sizing: border-box;
    flex-shrink: 0; /* Impede que o footer seja comprimido */
    
    /* Centraliza o conteúdo (o link) */
    text-align: center; 
}

footer a {
    color: #00ffcc;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}