@font-face {
    font-family: "Univers";
    src: url("/resources/fonts/UniversRegular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "OCR-B";
    src: url("/resources/fonts/OCR-B.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "TexGyre";
    src: url("/resources/fonts/tg-adventor-bold.otf") format("opentype");
    font-weight: bold;
    font-style: normal;
}

body {
    background: black;
    color: white;
    font-family: "Univers";
    margin: 20px;
    padding: 0;
    line-height: 1.4;
}

.wrapper, .container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.wrapper {
    display: block;
    position: relative;
}

.container {
    border: 3px solid white;
    padding: 20px;
    background: black;
}

.header, .sidebar p.small, .footer .small, p:last-child {
    margin: 0;
}

.logo {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
}

hr {
    border: none;
    border-top: 2px dotted #444;
    margin: 20px 0;
}

h1 {
    font-family: "TexGyre";
    letter-spacing: 0.8px;
    font-size: 2rem;
    margin: 5px 0 10px 0;
    font-weight: bold;
}

h2 {
    font-family: "OCR-B";
    font-size: 1rem;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    display: inline-block;
    font-weight: normal;
    letter-spacing: -0.5px;
    word-spacing: -3px;
}

p {
    margin: 0 0 15px 0;
}
.small {
    font-size: 0.7rem;
    color: #999;
}

.bullet {
    margin-right: 8px;
}

a {
    color: white;
    text-decoration: underline;
}

a:hover, .nav a:hover, .tooltip.active {
    background: white;
    color: black;
}

.nav {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 2px solid white;
    border-bottom: 2px solid white;
    text-align: center;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-right: 32px;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.nav a:last-child {
    margin-right: 0;
}

.sticky {
    position: sticky;
    top: 0;
    background: black;
    z-index: 100;
    margin: 0 -20px;
    padding: 0 20px;
}


.main {
    display: block;
    margin: 5px 0;
    overflow: visible;
}

.main::after {
    content: "";
    display: table;
    clear: both;
}

.content {
    width: 100%;
}

.content p:first-of-type {
    margin: -8px 0 15px 0;
}

.sidebar {
    float: right;
    width: 350px;
    margin: 25px 0 20px 40px;
    background: #111;
    padding: 20px 20px 10px 20px;
    border: 2px solid white;
    box-sizing: border-box;
    height: fit-content;
}
.sidebar iframe {
    display: block;
    margin-bottom: 10px;
}

.footer {
    border-top: 2px solid white;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 0.7rem;
    text-align: center;
    color: #999;
}

/* tooltip */
.tooltip {
    cursor: pointer;
    border-bottom: 1px dotted #AAAAAA;
    position: relative;
}

.tooltip-popup {
    position: absolute;
    background: #222222;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    padding: 15px 30px 15px 15px;
    z-index: 1000;
    font-size: 0.85rem;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    font-family: monospace;
    letter-spacing: normal;
}

.tooltip-popup img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tooltip-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 5px;
    color: #CCCCCC;
}

.tooltip-close:hover {
    color: #FFFFFF;
}

.tooltip-caption {
    display: block;
    margin-top: 8px;
}
.tooltip.active {
    border-bottom-style: solid;
}

/* display: none */
.logo-mobile, .scroll-indicator, .dot {
    display: none;
}

.nounderline {
    text-decoration: none;
}


/* fag text */
@keyframes scroll-rainbow {
    0% { background-position: 0 50%; }
    100% { background-position: 1000% 50%; }
}

.rainbow-scroll {
    background: linear-gradient(90deg, red, orange, yellow, lime, cyan, magenta, hotpink, red, orange, yellow, lime, cyan, magenta, hotpink, red, orange, yellow, lime, cyan, magenta, hotpink, red);
    background-size: 1000% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: scroll-rainbow 120s linear infinite;
}

@media (max-width: 768px) {
    html, body {
        margin: 0;
        padding: 0;
    }
    
    .wrapper {
        padding: 0;
    }
    
    .container {
        border: none;
        padding: 15px;
        max-width: 100%;
    }
    
    .main {
        margin: 5px 0 0 0;
    }
    
    .logo {
        display: none;
    }
    
    .logo-mobile {
        display: block;
        max-width: 85%;
        height: auto;
        margin: 0 auto 15px auto;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .nav {
        display: flex;
        align-items: center;
        gap: 24px;
        overflow-x: auto;
        white-space: nowrap;
        z-index: 101;
        padding: 5px 0;
        border-top: 1px solid white;
        border-bottom: 1px solid white;
        margin: 0 0 8px 0;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav br, .nav span:not(.dot) {
        display: none;
    }
    
    .nav a {
        display: inline-block;
        font-size: 0.9rem;
        margin: 0;
        flex-shrink: 0;
    }
    
    .sticky {
        position: sticky;
        top: 0;
        background: black;
        z-index: 100;
        margin: 0 -15px;
        padding: 0 15px;
        width: calc(100% + 30px);
        box-sizing: border-box;
    }
    
    .sidebar {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
        float: none;
        display: block;
        box-sizing: border-box;
        border: 1px solid white;
    }
    
    .sidebar iframe {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 350px;
    }
    
    .footer {
        font-size: 0.6rem;
    }
    
    .dot {
        display: inline-block;
        margin: 0;
        flex-shrink: 0;
    }
    
    .scroll-indicator {
        display: block;
        text-align: right;
        font-size: 0.7rem;
        color: #666;
        margin: 5px 0 0 0;
        line-height: 1;
        white-space: nowrap;
    }
}