
body{    
    background-image: linear-gradient(rgba(0, 0, 0, 0.2),rgba(0, 0, 0, 0.2)), url("../../images/cattheme.png");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}



.home {
    position: absolute;
    top: calc(50% + 25px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    height: 80vh;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--main-dark);
    z-index: 1;
    padding: 1px 0;
    border-bottom: 2px solid var(--purple);
}

.homebar{
    background-color: var(--main-dark);
    width: fit-content;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.homebar a{
    color: var(--main-light);
    padding: 8px 12px;

    text-align: center;
}

.extblocklist{
    justify-content: center;
    column-gap: 16px;
}

.fakebotbar{
    background-color: var(--main-dark);
    width: 100%;
    height: 30px;
    position: fixed;
    bottom: 0%;
    border-top: 2px solid var(--purple);
}

.main, .logmenu{
    height: 88%;
}

.main{
    position: relative;
    width: 70%;
}


.logmenu{
    width: 30%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
}

.logmenu h2{
    margin-left: 20px;
}


.logmenu {
    background-color: rgba(0, 0, 0, 0.7);
    width: 30%;
    max-width: 320px;
    height: 88%;
    padding: 0;
    border: ridge 4px var(--purple);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.logmenu h2 {
    color: var(--main-light);
    margin: 0;
    padding: 12px 20px;
    background-color: var(--main-dark);
    border-bottom: 2px solid var(--purple);
    font-family: "dos", monospace;
    font-size: 1.6em;
}

.visit-counter {
    padding: 8px 20px;
    font-family: "dos", monospace;
    font-size: 1em;
    color: var(--main-light);
    background-color: rgba(0, 0, 0, 0.4);
    border-bottom: 1px dashed var(--purple);
    display: flex;
    align-items: center;
    gap: 8px;
}

.visit-counter-eyeball {
    color: var(--purple);
    display: inline-flex;
    line-height: 0;
    flex-shrink: 0;
}

.visit-counter-eyeball svg {
    display: block;
}

.visit-count-num {
    font-variant-numeric: tabular-nums;
    min-width: 1.5em;
}

.logbox {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    font-size: 0.9em;
    flex-grow: 1;
    overflow-y: auto;
    font-family: monospace;
    scrollbar-color: var(--purple) var(--main-dark);
}

.logbox ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.logbox ul li {
    padding: 8px 0;
    color: var(--main-light);
    list-style-type: square;
}

.logbox ul li strong {
    color: var(--purple);
}

.logbox ul li.changelog-latest strong {
    color: var(--orange);
    text-shadow: 0 0 8px rgba(197, 140, 101, 0.7), 0 0 16px rgba(197, 140, 101, 0.4);
}

.explorer-window {
    position: relative;
    background-color: var(--main-dark);
    border: ridge 3px var(--purple);
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    will-change: transform;
}

.explorer-titlebar {
    background-color: var(--purple);
    border-bottom: 2px solid color-mix(in srgb, var(--purple) 70%, black);
    font-family: "dos", monospace;
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
    padding: 0 10px;
    font-size: 1.06em;

}

.folder-up-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20px;
    margin-right: 9px;
    padding: 0;
    border: none;
    background: none;
}

.windowbuttons{
    display: flex;
    gap: 3.9px;
    margin-right: auto;
    order: 1;
}


.windowbuttons img{

    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: 
    brightness(0) saturate(100%) 
    invert(89%) 
    sepia(15%) 
    hue-rotate(230deg)
    saturate(400%);
    
    
}

.folder-up-icon {

    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: 
    brightness(0) saturate(100%) 
    invert(89%) 
    sepia(15%) 
    hue-rotate(230deg)
    saturate(400%);
    pointer-events: none;
}

.windowbuttons img:hover{
    filter: none; 
}


.folder-up-button:hover .folder-up-icon {
    filter: none;
    background: none;
    background-color: transparent !important;
}


.explorer-titlebar > span {
    flex-grow: 1;
    letter-spacing: 0.4px;
}

.explorer-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.explorer-window::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.folder-row {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.folder-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--main-light);
    text-decoration: none;
    width: 120px;
    position: relative;
    z-index: 1;
    padding: 7px;
    box-sizing: border-box;
    border: 3px solid transparent;
    margin: -3px;
}


.folder-icon span {
    font-size: 1em;
    margin-bottom: 5px;
}


.folder-icon-img {
    width: 64px;
    height: 64px;
    margin-bottom: 5px;
    image-rendering: pixelated;
    filter: invert(42%) sepia(16%) saturate(1520%) hue-rotate(225deg) brightness(86%) contrast(87%);
    
}


.folder-icon:hover .folder-icon-img {
    filter: invert(42%) sepia(16%) saturate(1520%) hue-rotate(225deg) brightness(86%) contrast(87%);
}


.folder-icon span:first-child {
    display: none;
}


.folder-icon:hover {
    background-color: #2e223b;
    border: solid 3px;
    border-color: var(--purple);
    
    
}

.ver{
    font-size: 18px;
    font-weight: 300;
}


.webbuttons{
    letter-spacing: -10px;
}



.explorer-window .frontitle pre{
    font-size: 1vw;
    font-family: "dos";
    letter-spacing: 1px;
    
    padding: 20px 50px;

    display: inline-block;
    text-align: center;


    color: var(--purple);
    border: ridge 5px var(--purple);
}

.noscriptwarning{
    background-color: var(--main-dark);
}

@media only screen and (orientation: portrait){
    nav {
        position: relative;
        padding: 5px 0;
    }
    
    .home {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        height: auto;
        margin-top: 20px;
        flex-direction: column;
    }
    
    .explorer-window, .logmenu {
        width: 50%;
        max-width: none;
        margin: 15px auto;
    }

    .main{
        width: 95%;
        margin: auto;
    }

    .maincenter{
        position: inherit;
        top: 0%;
        left: 0%;
        transform: none;
        height: 100%;
        width: 100%;
    }

    .logmenu {
        width: 95%;
        max-width: none;
        height: auto;
        margin: 20px auto;
    }
    
    .home {
        flex-direction: column;
    }
    
    .main, .logmenu {
        width: 65%;
    }

    .homebar a{
        padding: 10px 20px;
    } 
    
}

.mainwindow{
    border-color: var(--purple);
}

.fact-box {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    background-color: var(--main-dark);
    border-top: ridge 3px var(--purple);
    margin: auto;
    max-width: 600px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    height: 175px;
    overflow: hidden;
}

.fact-image {
    flex: 0 0 150px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-right: 2px solid var(--purple);
}

.fact-image img {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    border: 1px solid var(--purple);
}

.fact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fact-titlebar {
    background-color: var(--purple);
    color: var(--main-light);
    padding: 5px 10px;
    font-family: "dos", monospace;
    font-size: 1.1em;
}

.fact-text {
    padding: 15px;
    font-family: monospace;
    color: var(--main-light);
    flex-grow: 1;
}

.fact-text p {
    margin: 0 0 10px 0;
}

.fact-source {
    color: var(--purple);
    font-style: italic;
    text-align: right;
    margin-top: 10px;
}

@keyframes shake {
    0%, 24% { transform: translateX(0); }
    25%, 49% { transform: translateX(-6px); }
    50%, 74% { transform: translateX(6px); }
    75%, 99% { transform: translateX(-6px); }
    100% { transform: translateX(0); }
}


@keyframes hard-blink {
    0%, 40%, 80% { opacity: 0; }
    20%, 60%, 100% { opacity: 1; }
}


.explorer-window {
    position: relative;
    opacity: 0;
    animation: hard-blink 0.2s steps(1) forwards;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


.explorer-titlebar {
    opacity: 0;
    animation: hard-blink 0.6s 0.3s steps(1) forwards;
}

.explorer-content {
    opacity: 0;
    animation: hard-blink 0.6s 0.5s steps(1) forwards;
}

.fact-box {
    opacity: 0;
    animation: hard-blink 0.6s 0.6s steps(1) forwards;
    pointer-events: none;
}


.fact-image img,
.fact-content {
    opacity: 0;
    animation: hard-blink 0.6s 0.6s steps(1) forwards;
    pointer-events: none;
}



.folder-row:nth-child(1) * {
    opacity: 0;
    animation: hard-blink 0.4s 0.7s steps(1) forwards;
}

.folder-row:nth-child(2) * {
    opacity: 0;
    animation: hard-blink 0.4s 0.9s steps(1) forwards;
}



.logmenu,
.logmenu * {
    opacity: 0;
    animation: hard-blink 0.2s 0.7s steps(1) forwards;
}

.logbox,
.logbox *{
    opacity: 0;
    animation: hard-blink 0.2s 1.3s steps(1) forwards;
}

.explorer-window {
    pointer-events: none; 
    
    
}
.fact-image {
    position: relative;
    overflow: hidden;
}


.fact-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.15) 3px,
        rgba(0, 0, 0, 0.15) 4px
    );
    animation: scanlines-anim 0.7s linear infinite;
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: multiply;
}

@keyframes scanlines-anim {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 4px;
    }
}



.explorer-window.ready,
.explorer-window.ready .fact-box,
.explorer-window.ready .fact-image img,
.explorer-window.ready .fact-content *{
    pointer-events: auto;
    opacity: 1;
    animation: none;
}

body.transitioning #overlay {
    position: fixed;
    background: white;
    mix-blend-mode: difference;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: blinkTransition 0.5s steps(2, end) forwards;
    pointer-events: none;
}

@keyframes blinkTransition {
    0% { opacity: 1; }
    100% { opacity: 0; }
}


img.folder-icon-img.disabled {
    opacity: 0.3 !important
}

/* Niko leave easter egg: only the fact-box glitches out (Niko leaves), rest of page stays */
.explorer-window.ready .fact-box.niko-leaving,
.fact-box.niko-leaving {
  transform-origin: center center;
  animation: fact-box-glitch-out 420ms steps(2, end) forwards;
}

.fact-box.niko-left .fact-image,
.fact-box.niko-left .fact-content .fact-titlebar {
  display: none;
}

.fact-box.niko-left .fact-content {
  padding: 15px;
  display: block;
  text-align: center;
}

.fact-box.niko-left .fact-text p {
  margin: 0;
}

.fact-box.niko-left .fact-source {
  margin-top: 8px;
  text-align: center;
}

.fact-box.niko-left {
  opacity: 1;
  min-height: 80px;
}

@keyframes fact-box-glitch-out {
  0%   { opacity: 1; transform: scale(1); filter: brightness(1) contrast(1); }
  50%  { opacity: 1; transform: scale(0.98) scaleY(0.92) skewX(-6deg); filter: brightness(1.2); }
  100% { opacity: 0; transform: scale(1.14) scaleY(0.04); filter: brightness(2.2) contrast(1.2); }
}