:root {
    --bg: #1038af;
    --fg: black;
    --sections: white;
    --linksfg: #1e33a8;
}

body.dark-theme {
    --bg: #17181b;
    --fg: white;
    --sections: #0c1b44;
    --linksfg: #55bbf7;
}

/* ===== FONT ===== */
@font-face {
    font-family: 'abaddon_light';
    src: url(/assets/abaddon_light-webfont.woff);
}

/* ===== RESET & GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: var(--fg);
}

head *, script, style {
    display: none;
}

body {
    background-color: var(--bg);
    height: 100dvh;
}

.site {
    padding: 15px;
    gap: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: calc(100dvh - 40px);
    max-height: calc(100dvh - 40px);
    height: calc(100dvh - 40px);
    align-items: center;
}

/* ===== LAYOUT UTILS ===== */
.center {
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.center2 {
    height: 100%;
    justify-content: center;
}

.row {
    flex-direction: row;
    gap: 5px;
}

/* ===== HEADER ===== */
header {
    width: 70dvw;
    justify-content: center;
}

header p {
    font-size: 48px;
    margin: 0 10px;
    font-family: monospace;
}

.after-header {
    justify-content: center;
    flex-direction: row;
    gap: 5px;
    width: 70dvw;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 40px;
    width: 100%;
    background-color: #C0C0C0;
    border-top: 2px solid #FFFFFF;
    border-bottom: 2px solid #808080;
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-family: Tahoma, sans-serif;
    font-size: 14px;
    flex-direction: row;
}

footer .start {
    background-color: #C0C0C0;
    color: black;
    padding: 4px 12px;
    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 2px;
    margin-right: 8px;
    user-select: none;
    flex-direction: row;
    gap: 10px;
}

footer .start:active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
    background-color: #808080;
}

footer .buttons {
    flex-grow: 1;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

footer .buttons p {
    animation-fill-mode: forwards;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--move-distance));
    }
}

footer .buttons img {
    margin-top: 10px;
    margin-right: 5px;
}

footer .clock {
    background-color: #C0C0C0;
    padding: 4px 8px;
    border-top: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
}

/* ===== MAIN STRUCTURE ===== */
main, aside, nav, header {
    padding: 10px;
    border: 1px solid black;
    background-color: var(--sections);
}

nav, aside {
    min-width: 200px;
    max-width: 200px;
}

main {
    max-width: calc(100% - 410px);
    flex-grow: 1;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-family: 'abaddon_light';
    font-size: 60px;
    background-color: #3939ee;
    padding: 10px;
    text-align: center;
    margin-bottom: 5px;
    color: white;
}

nav h2,
aside h2 {
    background-color: #125515;
    padding: 2px;
    text-align: center;
    color: white;
    margin-top: 5px;
    margin-bottom: 5px;
}

p {
    margin-bottom: 5px;
    display: block;
}

a {
    color: var(--linksfg);
    text-decoration: none;
}

li {
    display: list-item;
}

ul {
    display: block;
    margin-left: 25px;
    list-style: disc;
}

b, br, a, i, p img {
    display: inline;
}

/* ===== ELEMENTS ===== */
hr {
    display: block;
    border: none;
    height: 20px;
    margin: 5px 0;
    margin-top: 10px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10 Q 25 0 50 10 T 100 10" fill="transparent" stroke="blue" stroke-width="2"/></svg>') repeat-x;
    background-size: 100px 10px;
}

.quote {
    border-left: 5px solid #3939ee;
    padding-left: 5px;
}

/* ===== ANIMATIONS ===== */
@keyframes animate1 {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-15px); }
    50%  { transform: translateX(15px); }
    100% { transform: translateX(0); }
}

#animate1 {
    animation: animate1 1s infinite linear;
    text-align: center;
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
    border-radius: 5px;
    padding: 5px;
    background-color: black;
    color: white;
    margin-bottom: 5px;
    text-align: center;
}

body.dark-theme .theme-switcher {
    background-color: white;
    color: black;
}

/* ===== RESPONSIVE ===== */
@media only screen and (max-width: 1050px) {
    main {
        max-width: calc(90dvw - 410px);
    }

    header, .after-header {
        width: 90%;
    }
}

@media only screen and (max-width: 800px) {
    .site {
        padding: 0;
        min-height: 100dvh;
        max-height: 100dvh;
        height: 100dvh;
    }

    .after-header {
        flex-direction: column;
    }

    nav, aside, main {
        min-width: 100%;
        max-width: 100%;
        border: none;
    }

    header, .after-header {
        border: none;
        width: 100dvw;
    }

    main {
        order: 1;
    }

    nav {
        order: 2;
    }

    aside {
        order: 3;
    }

    footer {
        display: none;
    }
}