/* Moon Dust on the web, 1996 edition: LunaOS 95 windows on a starry page.
   Colours from src/core/palette.h. No web fonts, nothing from other sites. */

body {
    margin: 0;
    padding: 16px 0 40px;
    background: #0b0b10 url("img/stars.png");
    color: #d9d3c7;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
}

a { color: #e8a33d; }
a:visited { color: #c98fd9; }
a:hover { color: #f4e8b8; }

img { image-rendering: pixelated; image-rendering: crisp-edges; }

.page { width: 760px; margin: 0 auto; }
.center { text-align: center; }

/* --- The top ----------------------------------------------------------------------- */
.masthead { display: flex; align-items: center; justify-content: center; gap: 18px; }
.masthead .moon { width: 96px; height: 96px; }
.masthead .banner { width: 476px; }
.tagline { text-align: center; font-style: italic; color: #9cc4d4; margin: 4px 0 12px; font-size: 18px; }

marquee {
    display: block;
    background: #142134;
    color: #e8a33d;
    border: 2px inset #7a7468;
    padding: 3px 0;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    margin-bottom: 14px;
}

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

hr.dust {
    border: 0;
    height: 6px;
    margin: 22px 0;
    background: repeating-linear-gradient(90deg, #7a7468 0 6px, transparent 6px 10px, #bdb6a8 10px 13px, transparent 13px 20px);
}

/* --- LunaOS 95 windows ------------------------------------------------------------- */
.win {
    background: #bdb6a8;
    color: #1e1c1a;
    border: 1px solid #1e1c1a;
    box-shadow: inset 1px 1px #f2eee4, inset -1px -1px #7a7468, 6px 6px 0 rgba(0, 0, 0, 0.5);
    margin: 0 0 20px;
    font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}
.win .title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px;
    padding: 2px 3px 2px 6px;
    color: #fbf8f1;
    font-weight: bold;
    letter-spacing: 0.5px;
    /* The title bar's dither, darker on the left (as in the game). */
    background:
        linear-gradient(90deg, #142134 55%, transparent 100%),
        repeating-conic-gradient(#142134 0 25%, #2b3a67 0 50%) 0 0 / 2px 2px;
}
.win .title .icon { color: #e8a33d; }
.win .title .grow { flex: 1; }
.win .title button {
    width: 18px;
    height: 16px;
    padding: 0;
    font: bold 11px Tahoma, Verdana, sans-serif;
    line-height: 12px;
    background: #bdb6a8;
    color: #1e1c1a;
    border: 1px solid #1e1c1a;
    box-shadow: inset 1px 1px #f2eee4, inset -1px -1px #7a7468;
    cursor: pointer;
}
.win .title button:active { box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4; }
.win .body { padding: 10px 14px 12px; }
.win.closed .body { display: none; }
.win h3 { margin: 12px 0 4px; font-size: 15px; }
.win p { margin: 6px 0; }
.win ul { margin: 6px 0; padding-left: 22px; }
.win li { margin: 3px 0; }
.win a { color: #14213d; }
.win a:visited { color: #5a3a7a; }

.well {
    background: #fbf8f1;
    border: 1px solid #7a7468;
    box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4;
    padding: 8px 10px;
}

.note {
    background: #f4e8b8;
    border: 1px solid #1e1c1a;
    padding: 6px 10px;
    margin: 10px 0;
}

.soon { color: #a86e1e; font-weight: bold; }
.small { font-size: 12px; }
code, .mono { font-family: "Courier New", Courier, monospace; font-size: 13px; }

/* --- Downloads --------------------------------------------------------------------- */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl {
    display: block;
    text-decoration: none;
    background: #bdb6a8;
    color: #1e1c1a !important;
    border: 1px solid #1e1c1a;
    box-shadow: inset 1px 1px #f2eee4, inset -1px -1px #7a7468;
    padding: 8px 10px;
}
.dl:hover { background: #d9d3c7; }
.dl:active { box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4; }
.dl b { display: block; font-size: 15px; }
.dl .what { font-size: 12px; color: #4a463f; }
.dl.main { background: #e8a33d; }
.dl.main:hover { background: #f2bb62; }
.sha { word-break: break-all; font-family: "Courier New", Courier, monospace; font-size: 11px; color: #4a463f; }

/* --- Pictures ---------------------------------------------------------------------- */
.shot { display: block; border: 2px inset #7a7468; background: #0b0b10; }
.shot.full { width: 704px; height: auto; }   /* 640x360 at 1.1x would blur: */
.shot.x1 { width: 640px; height: 360px; }      /* the game's own pixels, 1:1 */
figure { margin: 10px 0; }
figcaption { font-size: 12px; color: #4a463f; margin-top: 3px; }
.row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery a { display: block; }
.gallery img { width: 100%; height: auto; border: 2px inset #7a7468; }

table.facts { border-collapse: collapse; width: 100%; background: #fbf8f1; }
table.facts td, table.facts th { border: 1px solid #7a7468; padding: 3px 8px; text-align: left; vertical-align: top; }
table.facts th { background: #d9d3c7; }

/* --- The bottom -------------------------------------------------------------------- */
.buttons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.buttons img { width: 88px; height: 31px; }
.counter {
    display: inline-block;
    background: #000;
    color: #7fb069;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 1px 6px;
    border: 2px inset #7a7468;
}
.footer { text-align: center; font-size: 13px; color: #9a948a; }

/* --- 1996 mode (slowload.js) ------------------------------------------------------- */
html.slowload .page { visibility: hidden; }
html.slowload.slowload-ready .page { visibility: visible; }
html.slowload .pending { display: none !important; }

.dl-img {
    position: relative;
    width: fit-content;
    vertical-align: top;
    background: #d9d3c7;
    outline: 1px solid #7a7468;
}
.dl-img::before {  /* the picture's name in its empty box, as Netscape did */
    content: "\25A1  " attr(data-alt);
    position: absolute;
    left: 4px;
    top: 3px;
    right: 4px;
    overflow: hidden;
    max-height: calc(100% - 6px);
    font: 11px Tahoma, Verdana, sans-serif;
    color: #4a463f;
    text-align: left;
}
.dl-img img { position: relative; z-index: 1; }
.dl-img.loaded { background: none; outline: none; }
.dl-img.loaded::before { content: none; }

.netbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    background: #bdb6a8;
    color: #1e1c1a;
    border-top: 1px solid #f2eee4;
    box-shadow: 0 -1px #7a7468;
    font: 12px Tahoma, Verdana, sans-serif;
    transition: opacity 0.6s;
}
.netbar.gone { opacity: 0; pointer-events: none; }
.netbar .throb { width: 18px; height: 18px; }
.netbar .msg {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #bdb6a8;
    box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4;
    padding: 2px 6px;
}
.netbar .meter {
    width: 160px;
    height: 14px;
    background: #fbf8f1;
    box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4;
}
.netbar .fill { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #142134 0 8px, transparent 8px 10px); }
.netbar button {
    font: 12px Tahoma, Verdana, sans-serif;
    padding: 2px 12px;
    background: #bdb6a8;
    color: #1e1c1a;
    border: 1px solid #1e1c1a;
    box-shadow: inset 1px 1px #f2eee4, inset -1px -1px #7a7468;
    cursor: pointer;
}
.netbar button:active { box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4; }
.netbar button:disabled { color: #7a7468; cursor: default; }

/* --- Tabs (HOME / CHANGES), as LunaOS's: the open one pressed in -------------------- */
.tabs { display: flex; justify-content: center; gap: 4px; margin: 0 0 12px; }
.tabs a {
    font: bold 13px Tahoma, Verdana, sans-serif;
    letter-spacing: 0.5px;
    color: #1e1c1a;
    text-decoration: none;
    background: #bdb6a8;
    border: 1px solid #1e1c1a;
    box-shadow: inset 1px 1px #f2eee4, inset -1px -1px #7a7468;
    padding: 3px 14px;
}
.tabs a:visited { color: #1e1c1a; }
.tabs a:hover { background: #d9d3c7; }
.tabs a.on { background: #d9d3c7; box-shadow: inset 1px 1px #7a7468, inset -1px -1px #f2eee4; cursor: default; }

/* --- CHANGES.TXT ------------------------------------------------------------------- */
.changelog .version { margin: 0 0 10px; padding: 0 0 6px; border-bottom: 1px dotted #7a7468; }
.changelog .version:last-child { border-bottom: 0; }
.changelog h3 { margin: 12px 0 2px; }
.changelog h3 img { vertical-align: 1px; }
.changelog .num { font-family: "Courier New", Courier, monospace; font-size: 16px; }
.changelog .date { float: right; font-weight: normal; font-size: 12px; color: #4a463f; }
.changelog .version.here { background: #f4e8b8; outline: 1px solid #1e1c1a; padding: 0 8px 6px; margin: 0 -8px 10px; }

/* --- ARCHIVE.EXE ------------------------------------------------------------------- */
.archive { margin-top: 12px; }
.archive .old { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px dotted #7a7468; }
.archive .old:last-child { border-bottom: 0; }
.archive h3 { margin: 12px 0 6px; }
.archive h3 .badge { vertical-align: 1px; image-rendering: pixelated; }
.archive .num { font-family: "Courier New", Courier, monospace; font-size: 16px; }
.archive .also { font-weight: normal; color: #4a463f; }
.archive .date { float: right; font-weight: normal; font-size: 12px; color: #4a463f; }
.archive .dl b { font-size: 14px; }
.archive details.changes { margin: 8px 0 0; }
.archive details.changes summary { cursor: pointer; font-size: 13px; }
.archive details.changes .changelog { margin: 4px 0 0 14px; }
.archive details.changes .changelog h3 { margin: 8px 0 2px; font-size: 14px; }
.archive .old.here { background: #f4e8b8; outline: 1px solid #1e1c1a; padding: 0 8px 10px; margin: 0 -8px 12px; }
