@import url('https://fonts.cdnfonts.com/css/satoshi');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

@font-face {
    font-family: '8BitOperator';
    font-weight: bold;
    src: url(./Fonts/8bitOperatorPlus-Bold.ttf);
}

@font-face {
    font-family: '8BitOperator';
    font-weight: normal;
    src: url(./Fonts/8bitOperatorPlus-Regular.ttf);
}

:root,
:root[data-theme="light"] {
    font-size: 16px;
    --bg-main: #eee6bd;
    --bg-mainborder: #cec69d;
    --bg-neg: #010101;
    --bg-panel: #fdf6cf;
    --bg-hover: #fffce6;
    --bg-border: #e6ddbf;
    --text-main: #010101;
    --text-hyp: #5454ff;
    --btnbor-hover: #e6ddbf;
    --navbtn-hover: #010101;
    --border-rad: 1rem;
    --font: 'Satoshi';
    --inflate-size: 1.05;
    --deflate-size: 0.95;
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

:root[data-theme="dark"] {
    font-size: 16px;
    --bg-main: #3b361e;
    --bg-mainborder: #3b361e;
    --bg-neg: #f9f9f9;
    --bg-panel: #6e6855;
    --bg-hover: #3b361e;
    --bg-border: #646052;
    --text-main: #f5f2e6;
    --text-hyp: #8a8aff;
    --btnbor-hover: #646052;
    --navbtn-hover: #f5f2e6;
    --border-rad: 1rem;
    --font: 'Satoshi';
    --inflate-size: 1.05;
    --deflate-size: 0.95;
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

:root[data-theme="soulless"] {
    font-size: 16px;
    --bg-main: #fafafa;
    --bg-mainborder: #fafafa;
    --bg-neg: #010101;
    --bg-panel: #efefef;
    --bg-hover: #fcfcfc;
    --bg-border: #efefef;
    --text-main: #010101;
    --text-hyp: #5454ff;
    --btnbor-hover: #acacac;
    --navbtn-hover: #010101;
    --border-rad: 0.8rem;
    --inflate-size: 1.05;
    --deflate-size: 0.95;
    --font: 'Inter';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0, 0.25, 0.5, 1);
}

:root[data-theme="black"] {
    font-size: 16px;
    --bg-main: #060606;
    --bg-mainborder: #060606;
    --bg-neg: #f9f9f9;
    --bg-panel: #484848;
    --bg-hover: #060606;
    --bg-border: #474747;
    --text-main: #fefefe;
    --text-hyp: #8a8aff;
    --btnbor-hover: #474747;
    --navbtn-hover: #fefefe;
    --border-rad: 0.8rem;
    --inflate-size: 1.05;
    --deflate-size: 0.95;
    --font: 'Inter';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0, 0.25, 0.5, 1);
}

:root[data-theme="lgreen"] {
    font-size: 16px;
    --bg-main: #a0dda4;
    --bg-mainborder: #a0dda4;
    --bg-neg: #002b02;
    --bg-panel: #8ad18f;
    --bg-hover: #a0dda4;
    --bg-border: #baf5be;
    --text-main: #236620;
    --text-hyp: #b93aca;
    --btnbor-hover: #baf5be;
    --navbtn-hover: #236620;
    --border-rad: 1.1rem;
    --inflate-size: 1.05;
    --deflate-size: 0.95;
    --font: 'Plus Jakarta Sans';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.1, 0.2, 0.5, 1);
}

:root[data-theme="green"] {
    font-size: 16px;
    --bg-main: #37833c;
    --bg-mainborder: #37833c;
    --bg-neg: #cff0d1;
    --bg-panel: #439649;
    --bg-hover: #37833c;
    --bg-border: #57ad5d;
    --text-main: #d3ffd1;
    --text-hyp: #ef8dfc;
    --btnbor-hover: #57ad5d;
    --navbtn-hover: #d3ffd1;
    --border-rad: 1.1rem;
    --font: 'Plus Jakarta Sans';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.1, 0.2, 0.5, 1);
}

:root[data-theme="bad"] {
    font-size: 16px;
    --bg-main: #ff0000;
    --bg-mainborder: #ff0000;
    --bg-neg: #cff0d1;
    --bg-panel: #00e1ff;
    --bg-hover: #00ff11;
    --bg-border: #ff00b3;
    --text-main: #000000;
    --text-hyp: #ff0000;
    --btnbor-hover: #ff00b3;
    --navbtn-hover: #000000;
    --border-rad: 6767px;
    --font: 'Impact';
    --inflate-size: 1.65;
    --deflate-size: 0.1;
    --border-size: 1rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: 0;
    --bezier: cubic-bezier(0, 1, 0.1, 1.9);
}

:root[data-theme="tfx"] {
    font-size: 16px;
    --bg-main: #000000;
    --bg-mainborder: #ffffff;
    --bg-neg: #ffffff;
    --bg-panel: #000000;
    --bg-hover: #000000;
    --bg-border: #ffffff;
    --text-main: #ffffff;
    --text-hyp: #ffff00;
    --btnbor-hover: #ffff00;
    --navbtn-hover: #ffff00;
    --border-rad: 0;
    --font: '8BitOperator';
    --inflate-size: 1;
    --deflate-size: 1;
    --border-size: 0.3rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: 0;
    --bezier: cubic-bezier(0, 0.25, 0.5, 0.75, 1);
}

:root[data-theme="scary"] {
    font-size: 16px;
    --bg-main: #723700;
    --bg-mainborder: #db990b;
    --bg-neg: #b3873d;
    --bg-panel: #723700;
    --bg-hover: #4e3002;
    --bg-border: #db990b;
    --text-main: #ffd900;
    --text-hyp: #ffbb00;
    --btnbor-hover: #ffcf87;
    --navbtn-hover: #ffcf87;
    --border-rad: 1.1rem;
    --font: 'Plus Jakarta Sans';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.1, 0.2, 0.5, 1);
}

:root[data-theme="jolly"] {
    font-size: 16px;
    --bg-main: linear-gradient(to left, #eeffe4, #ffffff, #ffefef);
    --bg-mainborder: #ff0000;
    --bg-neg: #ff0000;
    --bg-panel: #f7fff2;
    --bg-hover: #9eff95;
    --bg-border: #15ff00;
    --text-main: #3d0000;
    --text-hyp: #ff0000;
    --btnbor-hover: #ff0000;
    --navbtn-hover: #ff0000;
    --border-rad: 1.1rem;
    --font: 'Plus Jakarta Sans';
    --border-size: 0.25rem;
    --highlight-border-size: 1px;
    --bg-hover-border-highlight: linear-gradient(165deg,
            rgba(255, 255, 255, 0.85) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.3) 100%);
    --bezier: cubic-bezier(0.1, 0.2, 0.5, 1);
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg-main);
    font-family: var(--font);
    color: var(--text-main);
    will-change: background-color, color;
    transition: background-color 0.3s ease, color 0.3s ease;
    scrollbar-color: var(--bg-mainborder) var(--bg-panel);
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        box-sizing: border-box;
        scroll-behavior: auto;
    }
}

.fakeConsole {
    width: 100%;
    height: 350px;
    background: #000000;
    border: none;
    display: grid;
    grid-column: 1;
    grid-row: auto;
    gap: 0;
    border-radius: var(--border-rad);
    padding: var(--border-rad);
    overflow-y: auto;
    overflow-x: hidden;
}

.basic-viewport {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.consoleEntry {
    width: 100%;
    height: 1rem;
    font-size: 1rem;
    color: #efefef;
    font-family: 'Consolas';
    overflow: hidden;
}

@media (min-width: 1001px) {
    body {
        display: grid;
        grid-template-columns: 15rem 1fr 15rem;
        grid-template-rows: 1fr;
        gap: 1rem;
        padding: 1rem;
        height: 100vh;
        overflow: hidden;
    }

    .left-nav,
    .right-news,
    iframe.center-iframe {
        border: 0;
        min-height: 0;
        min-width: 0;
    }

    .left-nav,
    .right-news {
        height: 100%;
        overflow-x: auto;
    }

    iframe.center-iframe {
        border: 0;
        width: 100%;
        height: 100%;
    }
}

.left-nav {
    background: var(--bg-panel);
    border: var(--border-size) solid var(--bg-border);
    border-radius: var(--border-rad);
    padding: 1rem;
    display: flex;
    width: fit-content;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.theme-selector-container {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    width: fit-content;
}

select#theme-selector {
    width: 100%;
    font-family: var(--font);
    font-size: 1.1rem;
    overflow: hidden;
    padding: 0.5rem;
    border-radius: var(--border-rad);
    border: var(--border-size) solid var(--bg-mainborder);
    background-color: var(--bg-panel);
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: transform 0.2s var(--bezier), background-color 0.2s ease, color 0.3s ease, opacity 0.2s ease;
}

select {
    font-family: var(--font);
    font-size: 1.1rem;
    overflow: hidden;
    padding: 0.5rem;
    border-radius: var(--border-rad);
    border: var(--border-size) solid var(--bg-mainborder);
    background-color: var(--bg-panel);
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: transform 0.2s var(--bezier), background-color 0.2s ease, color 0.3s ease, opacity 0.2s ease;
}

.search-input {
    width: 100%;
    max-width: 500px;
    font-family: var(--font);
    font-size: 1.1rem;
    overflow: hidden;
    padding: 0.5rem;
    border-radius: var(--border-rad);
    border: var(--border-size) solid var(--bg-border);
    background-color: var(--bg-main);
    color: var(--text-main);
    cursor: text;
    outline: none;
    transition: transform 0.2s var(--bezier), background-color 0.2s ease, color 0.3s ease, opacity 0.2s ease;
}

.search-input::placeholder {
    color: var(--bg-border);
}

.gameImage {
    width: 100px;
    height: 100px;
    image-rendering: auto;
    background: transparent;
}

.gameFrame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    background: var(--bg-panel);
    border-radius: var(--border-rad);
    border: var(--border-size) solid var(--bg-border);
}

.left-nav-entry {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-family: var(--font);
    user-select: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    overflow: hidden;
    border-radius: var(--border-rad);
    text-decoration: none;
    background: transparent;
    border: var(--highlight-border-size) solid transparent;

    transition:
        transform 0.25s var(--bezier),
        background 0.25s var(--bezier),
        color 0.25s var(--bezier);
}

.left-nav-entry:hover {
    transform: scale(var(--inflate-size));
    color: var(--navbtn-hover);
    background:
        linear-gradient(var(--bg-hover), var(--bg-hover)) padding-box,
        var(--bg-hover-border-highlight) border-box;
}

.left-nav-entry:active {
    transform: scale(var(--deflate-size));
    color: var(--navbtn-hover);
    background:
        linear-gradient(var(--bg-main), var(--bg-main)) padding-box,
        var(--bg-hover-border-highlight) border-box;
}

.nav-text {
    display: inline-block;
    white-space: nowrap;
    transform-origin: left center;
}

.iframe-container {
    background: transparent;
    border-radius: var(--border-rad);
    border: var(--border-size) solid var(--bg-border);
    padding: 0.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.2s var(--bezier), background-color 0.3s ease, color 0.3s ease, opacity 0.2s ease;
}

iframe.center-iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    border: 0;
    display: block;
    font-family: var(--font);
}

.right-news {
    font-family: var(--font);
    border-radius: var(--border-rad);
    padding: 1rem;
    background: var(--bg-panel);
    border: var(--border-size) solid var(--bg-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s var(--bezier), background-color 0.2s ease, color 0.3s ease, opacity 0.2s ease;
}

button {
    background: var(--bg-panel);
    border: var(--border-size) solid var(--bg-border);
    width: fit-content;
    height: fit-content;
    padding: 1rem;
    border-radius: var(--border-rad);
    font-family: var(--font);
    font-size: 1.25rem;
    color: var(--text-main);
    backface-visibility: hidden;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.2s var(--bezier);
}

.emoji {
    width: 1.25rem;
    height: 1.25rem;
    image-rendering: auto;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    transform: translateX(-50px);
    filter: drop-shadow(50px 0 0 var(--bg-neg));
}

button:hover {
    transform: scale(var(--inflate-size));
    color: var(--navbtn-hover);
    border-color: var(--btnbor-hover);
}

button:active {
    transform: scale(var(--deflate-size));
    color: var(--navbtn-hover);
    border-color: var(--btnbor-hover);
}

h1 {
    width: fit-content;
    height: fit-content;
    font-size: 2rem;
    font-weight: 700;
}

.news-entry {
    width: 100%;
    max-width: 13rem;
    height: 100%;
    max-height: 7rem;
    background: transparent;
    border: 0;
    padding: 0.5rem;
    outline: 0;
}

.news-img {
    width: 100%;
    height: calc(100% - 1rem);
    background: var(--bg-main);
    object-fit: cover;
    border: 0;
    outline: 0;
}

.news-desc {
    font-size: 1rem;
    color: var(--text-main);
    font-family: var(--font);
    border: 0;
    width: 100%;
    max-width: 10rem;
    overflow-wrap: break-word;
    white-space: normal;
}

hr {
    width: 95%;
    height: 1px;
    border: 0;
    background: var(--bg-panel);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.hyperlink {
    color: var(--text-hyp);
    text-decoration: underline;
    cursor: pointer;
}

.mini {
    font-size: 0.75rem;
    padding: 0.5rem;
}

.bitoperator {
    font-family: '8BitOperator';
}

.rainbow {
    background: repeating-linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet, red 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-text 2s linear infinite;
    transition: 0.2s var(--bezier) all;
}

.rainbow:hover {
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
}

@keyframes rainbow-text {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: -200% center;
    }
}

.deltarune-wavy {
    display: inline-flex;
    white-space: pre;
}

.deltarune-wavy span {
    display: inline-block;
    font-size: inherit;
    animation: deltaruneWave 0.6s ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * 0.06s);
}

p {
    font-size: 1.2rem;
}

.speak-btn {
    width: 1.2rem;
    height: 1.2rem;
    line-height: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

@keyframes deltaruneWave {
    0% {
        transform: translateY(1px);
    }

    100% {
        transform: translateY(-1px);
    }
}

@media (max-width: 1000px) {

    :root,
    :root[data-theme="light"],
    :root[data-theme="dark"],
    :root[data-theme="soulless"],
    :root[data-theme="black"],
    :root[data-theme="lgreen"],
    :root[data-theme="green"],
    :root[data-theme="bad"],
    :root[data-theme="tfx"],
    :root[data-theme="scary"],
    :root[data-theme="jolly"] {
        font-size: 14px;
    }

    body {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .left-nav {
        width: 100%;
        height: auto;
        min-height: max-content;
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .left-nav>* {
        flex-shrink: 0;
    }

    .theme-selector-container {
        margin-bottom: 0;
        padding: 0;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    select#theme-selector {
        width: auto;
        padding: 0.4rem 0.6rem;
    }

    .left-nav-entry {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        padding: 0.4rem 0.6rem;
    }

    .left-nav-entry:hover,
    .left-nav-entry:active {
        transform: none;
    }

    .iframe-container {
        width: 100%;
        flex: 1;
        margin: 0;
        padding: 0;
        border: var(--border-size) solid var(--bg-border);
        overflow: hidden;
        border-radius: var(--border-rad);
    }

    iframe.center-iframe {
        display: block;
        width: 100%;
        height: 100%;
        max-height: 100%;
        margin: 0;
        border: 0;
    }

    .right-news {
        width: 100%;
        box-sizing: border-box;
        height: auto;
        min-height: fit-content;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .right-news>* {
        flex-shrink: 0;
    }

    .left-nav::-webkit-scrollbar,
    .right-news::-webkit-scrollbar {
        display: none;
    }

    .news-entry {
        width: 16rem;
        max-width: 80vw;
        height: auto;
        max-height: none;
        padding: 0.5rem;
        background: var(--bg-main);
        border-radius: calc(var(--border-rad) * 0.75);
    }

    .news-desc {
        max-width: 100%;
        white-space: normal;
        margin: 0;
        font-size: 0.95rem;
    }
}