.window {
    position: absolute;
    background: #ECE9D8;
    border: 3px solid #0054E3;
    border-radius: 8px 8px 0 0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    min-height: 150px;
    display: block;
    /* Ensure window is visible */
}

.window-title {
    background: linear-gradient(to right, #0054E3, #2787E9);
    padding: 5px 8px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    /* Prevent text selection while dragging */
}

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

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

.window-controls button {
    width: 21px;
    height: 21px;
    border: 1px solid #fff;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 10px;
    margin-left: 2px;
    background: linear-gradient(to bottom, #fff, #DFDFDF);
    border-radius: 3px;
    box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.window-controls .minimize {
    font-size: 9px;
    line-height: 0;
    padding-bottom: 8px;
}

.window-controls .maximize {
    font-size: 14px;
    line-height: 1;
    padding: 0;
    font-weight: normal;
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-controls .maximize:hover {
    background: linear-gradient(to bottom, #0063B1, #004E8C);
    color: white;
}

.window-controls .close {
    font-size: 11px;
    font-weight: bold;
}

.window-controls button:hover {
    background: linear-gradient(to bottom, #e81123, #c21019);
    color: white;
}

.window-controls .minimize:hover,
.window-controls .maximize:hover {
    background: linear-gradient(to bottom, #0063B1, #004E8C);
}

.window-content {
    padding: 10px;
    height: calc(100% - 30px);
    overflow: auto;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 30px) !important;
    border-radius: 0;
}

.window.minimized {
    display: none;
}

.saved-games-content {
    padding: 20px;
    background: white;
    height: calc(100% - 40px);
}

.game-icons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.game-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    border-radius: 3px;
    width: 80px;
    text-align: center;
}

.game-icon:hover {
    background: #E8E8E8;
}

.game-icon img {
    width: 32px;
    height: 32px;
}

.game-icon span {
    font-size: 12px;
    color: #333;
}

.pacman-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: black;
    padding: 10px;
    box-sizing: border-box;
    height: 100%;
}

#pacman-canvas {
    background: black;
    display: block;
    width: 400px;
    height: 400px;
    margin: auto;
}

.game-info {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px;
    background: #3B6DC0;
    border-radius: 4px;
    margin-top: 10px;
}

.game-score,
.game-lives {
    color: white;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.window.maximized .pacman-game {
    height: 100%;
}

.window.maximized .game-container {
    flex: 1;
}

.window.maximized .window-controls .maximize {
    font-size: 14px;
}