body {
margin: 0;
background-color: #008080;
overflow: hidden;
font-family: 'MS Sans Serif', Arial, sans-serif;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}

#window {
background: #C0C0C0;
width: 820px;
max-width: 95vw;
max-height: 95vh;
display: flex;
flex-direction: column;
padding: 2px;
position: relative;
}

#titlebar {
background: linear-gradient(90deg, #000080, #1084D0);
color: white;
display: flex;
align-items: center;
height: 22px;
padding: 2px 4px;
font-weight: bold;
}

.win-buttons {
margin-left: auto;
display: flex;
gap: 2px;
}

.win-buttons button {
width: 16px;
height: 14px;
font-size: 10px;
background: #C0C0C0;
border: 1px solid white;
border-right-color: #808080;
border-bottom-color: #808080;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}

#menubar {
display: flex;
padding: 2px 0;
font-size: 12px;
}

#menubar span {
padding: 2px 6px;
}

#toolbar {
height: 40px;
border-bottom: 2px inset white;
display: flex;
align-items: center;
padding: 4px;
}

#content {
background: #808080;
padding: 10px;
overflow: auto;
height: 600px;
position: relative;
}

#statusbar {
display: flex;
gap: 16px;
font-size: 11px;
padding: 2px 6px;
border-top: 2px inset white;
}

#scanlines {
position: absolute;
top: 10px;
left: 10px;
pointer-events: none;
z-index: 10;
background:  repeating-linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.25) 50%);
background-size: 100% 4px;
width: 800px;
height: 800px;
box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

#minimap-window {
position: absolute;
bottom: 35px;
right: 25px;
background: #C0C0C0;
padding: 2px;
z-index: 100;
display: flex;
flex-direction: column;
}

#minimapCanvas{
background: white;
display: block;
cursor: crosshair;
}

#menubar {
display: flex;
padding: 2px 0;
font-size: 12px;
position: relative;
z-index: 500;
}

#gridCheck {
font-weight: bold;
}

#pixelTooltip {
display: none;
position: fixed;
background: #FFFFE1;
border: 1px solid #000000;
padding: 3px 5px;
font-size: 11px;
color: #000000;
pointer-events: none;
z-index: 9999;
box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
white-space: nowrap;
}
.inset {
border: 2px solid;
border-color: #808080 #FFFFFF #FFFFFF #808080;
}

.outset {
border: 2px solid;
border-color: #FFFFFF #808080 #808080 #FFFFFF;
}

canvas {
    background: white;
    display: block;
    image-rendering: pixelated;
}
.swatch {
    width: 28px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-classic {
    background-color: #008080;
}
.theme-dark {
    background-color: #1a1a1a;
}
.theme-dark #window {
    background: #404040;
    color: #e0e0e0;
}
.theme-dark .win-buttons button {
    background: #404040;
    color: white;
}
.theme-dark #content {
    background: #202020;
}

.theme-retro {
    background: linear-gradient(45deg, #ff71ce, #01cdfe, #05ffa1);
}
.theme-retro #titlebar {
    background: linear-gradient(90deg, #ff71ce, #b967ff);
}
.theme-retro #window {
    background: #f0f8ff;
}
.minimap-titlebar {
    background: linear-gradient(90deg, #000080, #1084D0);
    color: white;
    font-size: 10px;
    padding: 1px 3px;
    margin-bottom: 2px;
    font-weight: bold;
}
.theme-dark #minimap-window {
    background: #404040;
}
.theme-retro .minimap-titlebar {
    background: linear-gradient(90deg, #ff71ce, #b967ff);
}
.menu-item {
position: relative;
padding: 2px 6px;
cursor: default;
user-select: none;
color: black;
}
.menu-item:hover {
background: #000000;
color: white;
}
.dropdown {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #C0C0C0;
color: black;
min-height: 140px;
flex-direction: column;
padding: 2px;
box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.dropdown-item:hover {
background: #000000;
color: white;
}
.menu-separator {
height: 0;
margin: 3px 2px;
border-top:1px solid #808080;
border-bottom: 1px solid #FFFFFF;
}