@import url('https://unpkg.com/98.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #008080;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
}

/* ── Desktop ── */
.desktop {
    width: 100%;
    height: calc(100% - 28px);
    position: relative;
    background: #008080;
}

/* ── Desktop Icons ── */
.desktop-icons {
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 80px;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    cursor: pointer;
    padding: 4px;
    border: 1px solid transparent;
}

.icon:hover,
.icon:focus {
    border: 1px dotted white;
    background: rgba(0, 0, 128, 0.4);
    outline: none;
}

.icon-image {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 4px;
    color: white;
    filter: drop-shadow(1px 1px 0 #000);
}

.icon-label {
    color: white;
    font-size: 10px;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
    line-height: 1.2;
    word-break: break-word;
}

/* ── Windows ── */
.window {
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.window.minimized {
    display: none;
}

/* Override 98.css title-bar for draggable cursor */
.window .title-bar {
    cursor: move;
}

/* ── Window Content ── */
.window-content {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* 98.css window-body already has padding, we respect it */
.window .window-body {
    flex: 1;
    overflow: auto;
}

/* ── Emulator Canvas ── */
#screen {
    display: block;
    width: 512px;
    height: 480px;
    background: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 2px inset #aaa;
    margin-bottom: 6px;
}

.emulator-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.emulator-controls input[type="file"] {
    font-size: 10px;
}

/* ── Debug canvases ── */
.debug-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 2px inset #aaa;
}

.debug-section {
    margin-bottom: 12px;
}

.debug-section h4 {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 11px;
}

/* ── Taskbar ── */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    z-index: 10000;

    display: flex;
    align-items: center;
    padding: 2px 4px;
    gap: 4px;

    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    box-shadow: inset 0 1px 0 #dfdfdf;
}

.start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    height: 22px;
    cursor: pointer;
    font-family: inherit;

    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

.start-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: none;
    padding: 3px 7px 1px 9px;
}

.start-button-icon {
    font-size: 14px;
}

/* Taskbar items */
#taskbar-items {
    display: flex;
    gap: 2px;
    flex: 1;
}

.taskbar-item {
    height: 22px;
    padding: 0 8px;
    font-size: 10px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;

    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

.taskbar-item.active {
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: inset 1px 1px 0 #aaa;
    background: #b8b8b8;
}

/* Taskbar clock */
.taskbar-clock {
    margin-left: auto;
    padding: 2px 6px;
    font-size: 10px;
    font-family: inherit;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: #c0c0c0;
    min-width: 50px;
    text-align: center;
}

/* ── Status bar text ── */
.status-text {
    font-size: 10px;
    color: #444;
}