html {
    background: url(TZ_static_bg.svg) no-repeat fixed;
    background-size: cover;
    font-family: "SpaceMono-Regular";
}

@font-face {
    font-family: 'SpaceMono-Regular';
    src: url("font/SpaceMono-Regular.ttf");
    font-weight: normal;
}

body {
    color: whitesmoke;
}

@media (min-width: 1600px) { /* Desktop */
    header #hamburgerMenu, header .icon, header ul {
        display: none;
    }
    header nav {
        gap: 10px;
        display: flex;
        flex-wrap: wrap;
        width: fit-content;
        justify-content: flex-end;
        white-space: nowrap;
        height: fit-content;
        align-self: center;
        margin-left: auto;
    }
    header h2{
        font-size: 1.5rem;
        align-self: center;
    }
    .factionContent{
        display:flex;
        flex-direction:column;
        flex:1;
        position:relative;
        border-radius: 35px;
        corner-shape: bevel;
        overflow:hidden;
        padding:1rem;
        cursor:pointer;
        transition:
            flex 0.6s ease,
            transform 0.6s ease;
    }
    .factionContent.active{
        flex:8;
    }

    .factionContent.closed{
        flex:1;
    }
    .factionsCardsHolder{
        display: flex;
        height: 100%;
        gap: 3rem;
        overflow: hidden;
    }
    .coalition .factionBG {
        width: 110%;
        height: 110%;
    }
    .heretic .factionBG {
        top: -25%;
        width: 180%;
        height: 150%;
    }
    .factionButtons{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        overflow-y: auto;
        overflow-x: none;
        opacity:0;
        transform:translateX(20px);
        transition:
            opacity 0.15s ease,
            transform 0.15s ease;
    }
    .factionButtons a {
        text-decoration: none;
        aspect-ratio: 1 / 1;
        width: 250px;
        padding: 1rem;
        margin: 1rem;
        text-align: center;
        word-wrap: break-word;
        transition:
            background 0.1s ease,
            transform 0.1s ease;
    }

}

@media (max-width: 1600px) { /* Mobile */
    header h2, header .icon{
        font-size: 18px;
    }
    header nav{
        display: none;
    }
    header #hamburgerMenu {
        position: absolute;
        top: 60px;
        right: 10px;
        text-align: right;
    }
    header #hamburgerMenu ul {
        list-style-type: none;
    }
    header #hamburgerMenu li {
        margin-bottom: 30px;
    }
    header #hamburgerMenu a {
        font-size: 12px;
    }
    header .icon {
        align-self: center;
        margin-left: auto;
    }
    header a {
        padding: 5px;
        color: whitesmoke;
        background-color: rgba(14, 59, 117, 0.938);
        border: 2px solid rgb(0, 110, 255);
        text-decoration: none;
    }
    .factionContent{
        display:flex;
        flex-direction:column;
        flex:1;
        position:relative;
        border-radius: 35px;
        corner-shape: bevel;
        overflow:hidden;
        padding:1rem;
        margin-bottom: 5px;
        cursor:pointer;
        transition:
            flex 0.6s ease,
            transform 0.6s ease;
    }
    .factionsCardsHolder{
        display: block;
        height: 100%;
        gap: 3rem;
        overflow: hidden;
    }
    .coalition .factionBG {
        width: auto;
        height: 110%;
        top: 1%;
    }

    .heretic .factionBG {
        top: -25%;
        width: auto;
        height: 150%;
    }
    .factionButtons{
        display: grid;
        grid-template-rows: 1fr 1fr; 
        grid-auto-flow: column; 
        grid-auto-flow: column dense; 
        gap: 10px;
        align-items: center;
        overflow-y: auto;
        overflow-x: none;
        opacity:0;
        transform:translateX(20px);
        transition:
            opacity 0.15s ease,
            transform 0.15s ease;
    }
    .factionButtons a {
        text-decoration: none;
        color: whitesmoke;
        aspect-ratio: 1 / 1;
        width: 100px;
        height: auto;
        padding: 1rem;
        margin: 1rem;
        text-align: center;
        word-wrap: break-word;
        transition:
            background 0.1s ease,
            transform 0.1s ease;
    }
}

header {
    display: flex;
    z-index: 998;
    top: 0;
    position: sticky;
    background: url("TZ_banner.png");
    text-shadow: 2px 3px 3px rgba(0, 217, 255, 0.884);
    padding-left: 2%;
    padding-right: 2%;
    border-bottom: 2px solid rgba(0, 200, 255, 0.3);
    backdrop-filter: blur(6px);
    height: 8vh;
}

header #hamburgerMenu {
    display: none;
}

header button, .anomalyArticle button, .timelineSideBar button, .compendiumSearchBar button, .triangleContent button{
    color: whitesmoke;
    background-color: rgba(0, 110, 255, 0.192);
    border: 3px solid rgb(0, 110, 255);
    border-radius: 5px;
    corner-shape: bevel;
    font-size: clamp(0.5rem, 1vw, 1rem);
    transition: all 0.2s ease;
    font-family: "SpaceMono-Regular";
}

header p {
    display: block;
}

header .p1{
    display: block;
}

header .p2{
    display: none;
}

header h2:hover .p1{
    display: none;
}

header h2:hover .p2{
    display: block;
    color: orange;
    text-shadow: 5px 5px 3px rgba(255, 166, 0, 0.541);
}

header #activePage {
    pointer-events: none;
    color: orange;
    border: 2px solid orange;
}

.mainSection{
    top: 25px;
    height:80vh;
    padding:1rem;
}

footer {
    width: 97vw;
    text-align: center;
    background-color: rgba(0, 110, 255, 0.192);
    border-top: 2px solid rgba(0, 200, 255, 0.3);
}

button:hover {
    cursor: pointer;
    background-color: rgba(0, 110, 255, 0.753);
}

article {
    background-color: rgba(0, 0, 0, 0.548);
    border: 5px solid rgb(0, 110, 255);
    border-left: 20px solid rgba(0, 110, 255, 0.192);
}

@keyframes bgScroll {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 5821px;
    }
}

.grid {
    opacity: 0.02;
    background: url("Grid_pattern.svg");
    background-size: cover;
    background-repeat: repeat;
    animation: bgScroll 155s linear infinite;
}

.grid2 {
    opacity: 0.3;
    background: url("TZ_bg_map.svg");
    background-size: cover;
    background-repeat: repeat;
    animation: bgScroll 155s linear infinite;
}

.grid, .grid2 {
    top: 0;
    left: 0;
    position: fixed;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.factionContent.closed .factionButtons a{
    display: none;
}

.cardTitle{
    font-size:2rem;
    font-weight:bold;
    transition:all 0.5s ease;
    white-space:nowrap;
    margin:auto;
    text-align:center;
}

.factionContent.active .cardTitle{
    transform:none;
    margin:0;
    font-size:1.8rem;
}

.factionContent.active .factionButtons{
    opacity:1;
    transform:translateX(0);
}

.factionButtons a:hover{
    background:rgba(7, 67, 122, 0.18);
    border:3px solid rgb(255, 158, 48);
}

.factionBG {
    z-index: -1;
    align-self: center;
    position: absolute;
    opacity: 1;
    filter: blur(0px);
    transition:
        opacity 0.3s ease,
        filter 0.05s ease;
}

.factionContent.active .factionBG{
    opacity: 0.4;
    filter: blur(10px);
}

.heretic{
    background:
    linear-gradient(
        180deg,
        rgba(255,0,0,0.35),
        rgba(70,0,0,0.9)
    );

    border:3px solid red;
}

.heretic:hover {
    color: rgb(255, 57, 57);
}

.coalition{
    background:
    linear-gradient(
        180deg,
        rgba(0, 153, 255, 0.35),
        rgba(0, 12, 80, 0.9)
    );

    border:3px solid rgb(48, 155, 255);
}

.coalition:hover {
    color: rgb(48, 155, 255);
}

.independent{
    background:
    linear-gradient(
        180deg,
        rgba(220,220,220,0.18),
        rgba(40,40,40,0.95)
    );

    border:3px solid rgb(209, 209, 209);
}

.independent:hover .cardTitle{
    text-decoration: underline;
}

#pending {
    pointer-events: none;
    border: 3px solid rgba(255, 0, 0, 0.856);
}