/* --- GLOBAL & LAYOUT --- */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    font-family: "Pixelated MS Sans Serif", Arial;
    font-size: 11px;
}

body {
    background-color: #008080;
}

.main-window {
    width: 85vw;
    height: 85vh;
    margin: 32px auto;
    display: flex;
    flex-direction: column;
}

.main-window .window-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    position: relative;
}

/* --- CORNER ICON --- */
.window-corner-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 5;
}

/* --- TITLE BAR ICON --- */
.title-bar-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- MENU STYLING --- */
ul.menu-bar {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 2px;
    height: 21px;
    align-items: center;
}

li.menu-item {
    position: relative;
    padding: 2px 8px;
    cursor: default;
    color: black;
}

li.menu-item.active, 
li.menu-item:hover {
    background-color: #000080;
    color: white;
}

.menu-item .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: silver;
    border: 1px solid;
    border-color: #fff #000 #000 #fff;
    box-shadow: 1px 1px 0 black;
    list-style: none;
    padding: 2px;
    min-width: 160px;
    z-index: 10;
}

.menu-item.active > .menu { display: block; }
.menu .menu-item { display: flex; justify-content: space-between; position: relative; padding-left: 20px; }
.menu .divider { height: 1px; background-color: #848584; border-bottom: 1px solid white; margin: 4px 0 4px 0; padding-left: 0; }
.menu .menu-item a { color: inherit; text-decoration: none; display: block; margin: -2px -8px; padding: 2px 8px; padding-left: 20px; }

/* Inactive (disabled) menu item styling */
.menu .menu-item[aria-disabled="true"] {
    color: #848584; /* Gray out text */
    text-shadow: 1px 1px #fff; /* Emboss effect */
}
.menu .menu-item[aria-disabled="true"]:hover {
    background-color: transparent; /* Prevent hover highlight */
    color: #848584;
}

/* Menu checkmark style */
.menu .menu-item.checked::before {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 2px;
}

/* --- TOOLBAR & ADDRESS BAR --- */
.address-bar, .window-content-layout {
    border-top: 1px solid white;
}
.address-bar {
    display: flex;
    align-items: center;
    padding: 3px;
    border-bottom: 1px solid #848584;
}
.address-bar label { margin-right: 4px; }
#address-bar-content {
    flex-grow: 1;
    padding: 3px 4px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 21px;
}

/* WIN95-STYLE TOOLBAR BUTTONS */
.toolbar {
    display: flex;
    align-items: center;
    padding: 3px;
    border-bottom: 1px solid #848584;
    flex-wrap: wrap;
    gap: 2px;
}
.toolbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 55px;
    padding: 4px 0;
    gap: 4px;
}
.toolbar .divider {
    width: 1px;
    height: 50px;
    background-color: #848584;
    border-right: 1px solid white;
    margin: 0 4px;
}

/* --- TWO-PANE CONTENT LAYOUT --- */
.window-content-layout {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}
.left-pane {
    width: 210px;
    background-image: url('./res/img/backleft.gif');
    background-position: top left;
    background-repeat: no-repeat;
    background-color: #f8f8f8;
    color: black;
    padding: 45px 10px 10px 15px;
    flex-shrink: 0;
    overflow-y: auto;
}
.left-pane h2, .left-pane p { margin: 0 0 1em 0; }
.left-pane h2 { font-size: 20px; font-weight: bold; }
.left-pane a { color: #0000FF; }
.main-content {
    flex-grow: 1;
    background: #f8f8f8;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}
.page-header {
    flex-basis: 100%;
    width: 100%;
}

/* --- ICON STYLING --- */
.icon { display: flex; flex-direction: column; align-items: center; text-align: center; width: 90px; height: 80px; padding: 5px; cursor: pointer; border: 1px solid transparent; }
.icon:hover { background-color: #e0e0e0; border: 1px dotted #a0a0a0; }
.icon:focus { background: #000080; color: white; border: 1px dotted white; outline: none; }
.icon img { width: 32px; height: 32px; margin-bottom: 5px; }
.icon-label { font-size: 11px; }

/* --- STATUS BAR --- */
.status-bar { display: flex; }
#status-text { width: 25%; }
#status-middle { flex-grow: 1; }
#version-text { width: auto; padding-right: 4px; }

/* --- MODAL --- */
#about-modal { width: 320px; position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%); z-index: 100; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    body { background: none; }
    .main-window { width: 100vw; height: 100vh; margin: 0; border: none; box-shadow: none; }
    .left-pane { display: none; }
}