/* Window styles */
.program-window {
    position: absolute;
    top: 50px;
    left: 100px;
    min-width: 300px;
    min-height: 200px;
    background-color: var(--bg-light);
    border: 2px solid var(--purple-dark);
    box-shadow: 4px 4px 5px var(--window-shadow);
    z-index: 10;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
}

.program-window.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 30px) !important;
    resize: none;
}

.title-bar {
    background: var(--titlebar-gradient);
    padding: 5px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    flex-shrink: 0;
    height: 28px;
}

.window-title {
    font-weight: bold;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.window-button {
    width: 20px;
    height: 20px;
    background-color: var(--bg-mid);
    border: 1px outset var(--bg-lightest);
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.window-button:hover {
    background-color: var(--bg-light);
}

.window-button:active {
    background-color: var(--border-light);
    border-style: inset;
}

.window-content {
    padding: 0;
    overflow: auto;
    flex-grow: 1;
    height: calc(100% - 28px);
    background-color: var(--text-light)
}

/* Menu styles */
.menu-item {
    position: relative;
    padding: 2px 8px;
    cursor: pointer;
    color: var(--purple-dark);
}

.menu-item:hover {
    background-color: var(--border-light);
    color: var(--text-light);
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-mid);
    border: 2px solid var(--bg-lightest);
    box-shadow: 2px 2px 5px var(--window-shadow);
    z-index: 1000;
    min-width: 150px;
}

.menu-item.active .menu-dropdown {
    display: block;
}

.menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 4px 8px;
    border: none;
    background: none;
    color: var(--purple-dark);
    cursor: pointer;
}

.menu-dropdown button:hover {
    background-color: var(--border-light);
    color: white;
}

.menu-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 4px 0;
}

/* Scrollbar Styles */
.window-content::-webkit-scrollbar {
    width: 16px;
}

.window-content::-webkit-scrollbar-track {
    background: var(--bg-lightest);
    border-left: 1px solid var(--border-light);
}

.window-content::-webkit-scrollbar-thumb {
    background-color: var(--border-light);
    border: 3px solid var(--bg-lightest);
    border-radius: 8px;
    min-height: 40px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--purple-main);
}

/* Firefox scrollbar */
.window-content {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) var(--bg-lightest);
}