@font-face {
    font-family: "RetroUI";
    src: url("../font/FFFFORWA.ttf") format("truetype");
    font-display: swap;
}

:root {
    color-scheme: dark;
    --cyan: #55ffff;
    --green: #55ff55;
    --red: #ff5555;
    --ink: #02090d;
    --paper: #ffffff;
}

body {
    margin: 0;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    min-height: 100vh;
    box-sizing: border-box;
    background: #03080d url("../img/screen-trans.png") repeat;
    color: #dffff5;
    font-family: system-ui, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
    z-index: 20;
}

.retro-fonts-sitebar,
body > nav,
body > h1,
body > p,
body > .controls,
body > #status,
body > #stage,
body > main {
    width: min(1180px, 100%);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.retro-fonts-sitebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: #000;
    background: var(--cyan);
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
}

.retro-fonts-brand {
    font-family: RetroUI, monospace;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.08em;
}

.retro-fonts-home {
    font-family: RetroUI, monospace;
    font-size: 0.75rem;
    color: #fff;
    background: var(--red);
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

body > nav {
    margin-top: 1rem;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    background: rgba(85, 255, 255, 0.18);
    border: 1px solid var(--cyan);
}

body > nav a,
body > nav a:visited {
    font-family: RetroUI, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
}

body > nav a:hover,
.retro-fonts-home:hover {
    transform: translateY(-1px);
    box-shadow: 4px 4px 0 #000;
}

h1 {
    font-family: RetroUI, monospace;
    color: var(--green);
    font-size: clamp(1.25rem, 4vw, 2rem);
    line-height: 1.35;
    text-shadow: 3px 3px 0 #007777;
}

.controls {
    border: 2px solid var(--red);
    box-shadow: 4px 4px 0 #000;
}

input,
button,
select {
    border: 2px solid #000;
    font: inherit;
}

button {
    box-shadow: 2px 2px 0 #000;
}

#stage {
    border: 2px solid var(--cyan);
    box-shadow: 4px 4px 0 #000;
}

.font-card {
    border: 2px solid var(--red) !important;
    box-shadow: 3px 3px 0 #000;
}

.font-card:hover {
    transform: translateY(-2px);
    border-color: var(--green) !important;
}

.font-card.selected {
    border-color: var(--cyan) !important;
    box-shadow: 0 0 0 2px #000, 0 0 14px var(--cyan);
}

canvas,
img {
    image-rendering: pixelated;
}

@media (max-width: 600px) {
    .retro-fonts-sitebar {
        align-items: flex-start;
        flex-direction: column;
    }

    body > nav {
        align-items: stretch;
        flex-direction: column;
    }
}
