@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

@font-face {
    font-family: 'OniriaFont';
    src: url('fonts/OniriaFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

MapNotification {
    color: #FFA500;
}

body {
    font-family: 'Share Tech Mono', monospace;
    font-weight: normal;
    background: #05070A;
    color: #C0C3C9;
    overflow: hidden;
    letter-spacing: -2.5px;
    word-spacing: -3px;
}

body.switched {
    transition: color 0.1s, background-color 0.1s;
}

h1, h2 {
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 40pt;
    margin-bottom: 10px;
    color: #B4E3E0;
    text-shadow: 0 0 8px rgba(180, 227, 224, 0.2);
    letter-spacing: 1px;
}

h2 {
    font-size: 24pt;
    font-style: italic;
    font-weight: lighter;
    color: #5CA6A3;
    letter-spacing: 0.5px;
}

.header {
    padding-top: 3em;
    padding-bottom: 3em;
}

/*
  Built-in class:
    # author: Name
*/
.byline {
    font-style: italic;
}

.written-in-ink {
    z-index: 3;
    font-size: 9pt;
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
    font-weight: 700;
    position: fixed;
    display: block;
    width: 100%;
    background: #0B0F14;
    color: #5D6D7E;
    transition: color 0.1s, background 0.1s;
    margin: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    height: 14px;
    top: 0;
    word-spacing: 0.01em;
    letter-spacing: -0.1em;
}

.outerContainer {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    overflow: scroll;
    overflow-x: hidden;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    margin-top: 7px;
    background-size: cover;
    background-repeat: no-repeat;
}

@media screen and (max-width: 980px) {
    .outerContainer {
        margin-top: 44px;
        background-size: cover;
        background-repeat: no-repeat;
    }
}

.container {
    display: block;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 4em;
    background: #11161D;
    border: 1px solid #1F2630;
    box-shadow: 0 0 30px rgba(0, 255, 200, 0.03);
    border-radius: 4px;
    min-height: min-content;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient( to bottom, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 3px );
    pointer-events: none;
    z-index: 1;
    animation: flicker 2s infinite;
    mix-blend-mode: screen;
    border-radius: 4px;
}

.container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP89+7dfwAJ+gN0qPyZzwAAAABJRU5ErkJggg==');
    background-size: cover;
    opacity: 0.03;
    z-index: 2;
    pointer-events: none;
    animation: noiseMove 0.3s steps(2) infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.03;
    }

    5% {
        opacity: 0.12;
    }

    10% {
        opacity: 0.04;
    }

    15% {
        opacity: 0.08;
    }

    20% {
        opacity: 0.02;
    }

    25% {
        opacity: 0.09;
    }

    30% {
        opacity: 0.01;
    }

    40% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.03;
    }

    60% {
        opacity: 0.07;
    }

    70% {
        opacity: 0.02;
    }

    80% {
        opacity: 0.06;
    }

    90% {
        opacity: 0.01;
    }

    100% {
        opacity: 0.04;
    }
}

@keyframes noiseMove {
    0% {
        transform: translate(0, 0);
    }

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




.switched .container {
    transition: background-color 0.1s;
}

p {
    font-size: 17pt;
    margin-bottom: -7px;
    color: #A5B0C5;
    line-height: 1.15em;
    font-weight: lighter;
}

a {
    font-weight: 550;
    color: #73FFD1;
    font-family: 'Share Tech Mono', monospace;
    transition: color 0.2s;
    text-decoration: none;
}

a:hover {
    color: #F23C50;
    transition: color 0.2s;
}

strong {
    color: #E6EAF1;
    font-weight: bold;
}

img {
    display: inline-flex;
    margin: auto auto;
    max-width: 90%;
    max-height: 90%;
}

.container .hide {
    opacity: 0.0;
}

.container .invisible {
    display: none;
}

.container > * {
    opacity: 1.0;
    transition: opacity 1.0s;
}

.choice {
    transition: opacity 0.33s;
    text-align: center;
    line-height: 0.6em;
}

:not(.choice) + .choice {
    padding-top: 1.4em;
}

.choice a {
    font-size: 17pt;
    color: #5AC8FA;
}

.choice a:hover {
    color: #7FDBFF;
}

.end {
    text-align: center;
    font-weight: bold;
    color: #FF5151;
    padding-top: 5px;
    padding-bottom: 5px;
}

#controls {
    z-index: 4;
    font-size: 9pt;
    text-align: center;
    padding-bottom: 6px;
    position: fixed;
    right: 14px;
    top: 4px;
    user-select: none;
    background: #0B0F14;
    color: #C0C3C9;
    transition: color 0.6s, background 0.6s;
    letter-spacing: -0.1em;
}

#controls [disabled] {
    color: #ccc;
}

#controls > *:not(:last-child):after {
    content: " | ";
}

@media screen and (max-width: 980px) {
    #controls {
        z-index: 2;
        padding-top: 24px;
        top: 0;
        left: 0;
        right: 0;
    }
}

/* Dark Theme */

body.dark {
    background: #0B0F14;
    color: #D1D5DC;
}

.dark h2 {
    color: #5F6368;
}

.dark .container {
    background: #11161D;
}

.dark .written-in-ink {
    background: #0B0F14;
}

.dark a {
    color: #5AC8FA;
    transition: color 0.2s;
}

    .dark a:hover {
        color: #FF6A6A;
    }

.dark strong {
    color: #F2F4F8;
}

.dark .end {
    color: #FF3C00;
}

.dark #controls {
    background: #0B0F14;
}

.dark #controls [disabled] {
    color: #444;
}

/* columns related CSS */

#story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    align-content: start;
}

#story > * {
    grid-column: span 2;
}

#story > .choice:not(:last-child):not(:has(ExSc)) {
    grid-column: span 1;
    padding: 0;
}

:nth-child(odd of p.choice):not(:last-child):not(:has(ExSc)) {
    justify-self: right;
    text-align-last: right;
    text-align: right;
}

:nth-child(even of p.choice):not(:last-child):not(:has(ExSc)) {
    justify-self: left;
    text-align-last: left;
    text-align: left;
}

/*p.choice:last-child {
    padding-top: -10px;
}*/

p.choice:has(ExSc) {
    /*margin-top: 30px;*/
    margin-bottom: -8px;
}

UnseenColor {
    color: #66CDAA;
    transition: color 0.2s;
}

UnseenColor:hover {
    color: #9DE4CC;
    transition: color 0.2s;
}
