* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #8FA8C4;

    cursor: default;
}

body.w98-crashed {
    cursor: none;
}


#w98-splash {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #8FA8C4 url("win98-splash.1787416569.jpg") center center / cover no-repeat;
}


#w98-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;

    font-family: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: #000000;

    width: 42em;
    background: #C0C0C0;

    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #DFDFDF;
    padding: 1px;
}

@media (min-width: 1600px) {
    #w98-dialog {
        font-size: 16px;
    }
}

@media (min-width: 2400px) {
    #w98-dialog {
        font-size: 21px;
    }
}

.w98-titlebar {
    background: linear-gradient(to right, #00007B, #0873BD);
    color: #FFFFFF;
    font-weight: bold;
    text-align: left;
    padding: 0.22em 0.4em;
    user-select: none;
}

.w98-body {
    display: flex;
    gap: 0.9em;
    padding: 1em 0.9em 0.6em;
}

.w98-art {
    flex: 0 0 auto;
    align-self: flex-start;
    border: 1px solid #000000;
}

.w98-art img {
    display: block;
    width: 9em;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.w98-main {
    flex: 1 1 auto;
    min-width: 0;
}

.w98-heading {
    font-family: Arial, Helvetica, "MS Sans Serif", sans-serif;
    font-size: 1.75em;
    font-weight: bold;
    margin: 0 0 0.8em;
    line-height: 1.1;
}

.w98-main p {
    margin: 0 0 1.4em;
}

.w98-progress-label {
    margin: 0 0 0.3em;
    height: 1.3em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.w98-progress {
    position: relative;
    height: 1.5em;
    background: #FFFFFF;
    border: 1px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #C0C0C0;
    overflow: hidden;
}

.w98-progress-layer {
    position: absolute;
    left: 2px;
    top: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.w98-progress-trough {
    color: #000000;
}

.w98-progress-bar {
    color: #FFFFFF;
    background: #000080;
    -webkit-clip-path: inset(0 100% 0 0);
    clip-path: inset(0 100% 0 0);
}

.w98-footer {
    padding: 0.6em 0.9em 0.9em;
    display: flex;
    justify-content: flex-end;
    gap: 0.5em;
}

.w98-btn {
    position: relative;
    font-family: inherit;
    font-size: 1em;
    min-width: 6.4em;
    padding: 0.32em 0.8em;
    background: #C0C0C0;
    color: #000000;
    cursor: default;

    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #DFDFDF;
}

.w98-btn:active {
    border-top-color: #404040;
    border-left-color: #404040;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
    box-shadow: inset 1px 1px 0 #808080;
}

.w98-btn[disabled] {
    color: #808080;
    text-shadow: 1px 1px 0 #FFFFFF;
}

.w98-btn-default {
    outline: 1px solid #000000;
    outline-offset: 0;
}

.w98-btn-default::after {
    content: "";
    position: absolute;

    left: 1px;
    top: 1px;
    right: 1px;
    bottom: 1px;
    border: 1px dotted #000000;
    pointer-events: none;
}


#w98-bsod {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 3;

    background: #0000AA;
    color: #AAAAAA;
    font-family: "Courier New", Courier, "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.45;

    padding: 6vh 4vw;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1600px) {
    #w98-bsod {
        font-size: 19px;
    }
}

@media (min-width: 2400px) {
    #w98-bsod {
        font-size: 25px;
    }
}

body.w98-crashed #w98-bsod {
    display: flex;
}

body.w98-crashed #w98-splash,
body.w98-crashed #w98-dialog,
body.w98-crashed #w98-hint {
    display: none;
}

#w98-bsod pre {
    margin: 0;
    font: inherit;
    white-space: pre-wrap;
    max-width: 72ch;
}

.w98-bsod-title {
    display: block;
    text-align: center;
    margin-bottom: 1.5em;
}

.w98-bsod-title span {
    background: #AAAAAA;
    color: #0000AA;
    padding: 0 0.5em;
}

.w98-bsod-prank {
    color: #FFFFFF;
}

.w98-bsod-continue {
    display: block;
    text-align: center;
    margin-top: 1.5em;
}

#w98-cursor {
    animation: w98-blink 1s steps(1, end) infinite;
}

@keyframes w98-blink {
    50% {
        opacity: 0;
    }
}


#w98-hint {
    position: fixed;
    left: 50%;
    bottom: 1.5em;
    transform: translateX(-50%);
    z-index: 4;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 20px;
    padding: 9px 18px;
    white-space: nowrap;
    max-width: 92vw;
    overflow: hidden;
    text-overflow: ellipsis;

    transition: opacity 0.6s ease;
}

#w98-hint kbd {
    font-family: inherit;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 1px 6px;
}

#w98-hint.w98-hint-gone {
    opacity: 0;
    pointer-events: none;
}


@media (max-width: 760px) {
    #w98-dialog {
        font-size: 11px;
        width: 94vw;
    }

    .w98-art {
        display: none;
    }

    #w98-bsod {
        font-size: 12px;
        padding: 4vh 4vw;
    }
}
