@import url('https://fonts.googleapis.com/css2?family=Slabo+27px&display=swap');

:root {
    --color-bg: #111;
    --color-text: #eee;
    --color-section-bg: #222;
    --color-accent: #ff6b35;
    --color-accent-hover: #ff8c66;
    --color-border: #444;
    --color-button-bg: #333;
    --color-button-hover: #444;
    --color-button-text: #000;
    --color-card-bg: #1e1e1e;
    --color-card-hover: #2a2a2a;
}


body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--color-bg);
}

body::before {
    content: "";
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background-image: url(resources/img/vault.webp);
    background-repeat: no-repeat;
    background-position: 40% 65%;
    background-size: 30%;
    transform: rotate(0deg);
    opacity: 0.2;
    z-index: -1000;
    pointer-events: none;
}

.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
    min-height: 100vh;
    gap: 2rem;
}

.container>p {
    width: 50%;
    text-align: center;
}

.container>h1 {
    width: 100%;
    text-align: center;
}

* {
    font-family: 'Slabo 27px', serif;
    color: var(--color-text);
}

a:not(.btn-link) {
    color: var(--color-accent);
    text-decoration: none;
}

a:not(.btn-link):hover {
    color: var(--color-accent-hover);
}

.btn-link {
    background-image: url("../resources/img/button.webp");
    filter: hue-rotate(var(--color-btn-hue-rotate, 0deg));
    background-repeat: no-repeat;
    background-size: 100% 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 5rem;
    font-size: clamp(1rem, 3vw, 1.5rem);
    text-decoration: none;
    color: black;
    padding: 0.5rem 2rem;
    white-space: nowrap;
    box-sizing: border-box;
    width: 100%;
    scale: 1;
    cursor: pointer;
    transition: scale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    padding: 0.5rem 1rem;
    color: var(--color-button-text);
    border-radius: 5px;
    text-decoration: none;
    min-width: 50%;
    width: fit-content;
}

.btn-link:hover {
    animation: scale-easeOutBounce 0.4s forwards;
}

.btn-link:active {
    scale: 0.9;
}

.btn-link.active-tab {
    filter: hue-rotate(var(--color-btn-hue-rotate, 50deg));
}

button {
    background-color: transparent;
    border: none;
}

.section {
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.section:hover {
    backdrop-filter: blur(32px);
    background-color: rgba(0, 0, 0, 0.5);
}


.section:last-child {
    border-bottom: none;
}

.section-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: fit-content;
}

.section img {
    max-width: 75%;
    height: auto;
    margin-bottom: 1rem;
}

.popover:popover-open {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 3rem;
    border-radius: 5px;
    box-shadow: 0 0 10px var(--color-border);
    backdrop-filter: blur(10px);
    text-align: left;
}

.popover::backdrop {
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.popover .popover-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popover ul {
    line-height: 1.5rem;
    font-size: 1rem;
}

.popover h2,
.popover h3 {
    margin-bottom: 0;
}

.popover * {
    width: fit-content;
}

.popover .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    background-color: var(--color-button-bg);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.popover .close-btn:hover {
    background-color: var(--color-button-hover);
}

.active-link {
    background-color: var(--color-accent-hover);
    color: var(--color-button-text) !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    border-bottom: 4px dashed var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    width: 90%;
}

.timeline-vertical {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    padding: 0 2rem;
    max-width: 1200px;
}

.timeline-vertical img {
    height: 200px;
    width: auto;
    object-fit: contain;
}

.timeline-item-left,
.timeline-item-right {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-content {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 3rem 5rem;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    backdrop-filter: blur(16px);
    background-color: rgba(0, 0, 0, 0.5);
    scale: 1.1;
}

.timeline-item-left .timeline-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    text-align: left;
}

.timeline-item-left .timeline-content:hover {
    margin: 1rem 0;
    transform: translateY(-1rem) perspective(1000px) rotateY(10deg);
}

.timeline-item-right .timeline-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 1rem;
    text-align: right;
}

.timeline-item-right .timeline-content:hover {
    margin: 1rem 0;
    transform: translateY(-1rem) perspective(1000px) rotateY(-10deg);
}

.timeline-content-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-content-details * {
    margin: 0;
    width: 100%;
    padding: 0;
}

.game-wrappers {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 90%;
}

.game-wrapper {
    margin: 0;
    padding: 0;
    width: 50%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.game-wrapper iframe {
    width: 100%;
    height: 100%;
}


@keyframes scale-easeOutBounce {
    0% {
        transform: scale(1);
    }

    12% {
        transform: scale(1.033);
    }

    24% {
        transform: scale(1.132);
    }

    36% {
        transform: scale(1.294);
    }

    54% {
        transform: scale(1.225);
    }

    74% {
        transform: scale(1.294);
    }

    82% {
        transform: scale(1.282);
    }

    92% {
        transform: scale(1.297);
    }

    96% {
        transform: scale(1.294);
    }

    100% {
        transform: scale(1.3);
    }
}

@media (max-width: 768px) {
    .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 1.5rem;
        box-sizing: border-box;
    }

    .container>p {
        width: 100%;
        margin-top: 0;
    }

    .container>h1 {
        width: 100%;
        margin-bottom: 0;
    }

    .container>h2 {
        margin: 0;
    }

    nav {
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .btn-link {
        height: 3.5rem;
        padding: 0.5rem 1rem;
        min-width: unset;
        width: 100%;
        max-width: 300px;
    }

    .section-list {
        width: 100%;
    }

    .section {
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .section img {
        max-width: 90%;
    }

    .timeline-vertical {
        padding: 0 0.5rem;
        gap: 1.5rem;
    }

    .timeline-item-left,
    .timeline-item-right {
        width: 100%;
    }

    .timeline-item-left .timeline-content,
    .timeline-item-right .timeline-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .timeline-content:hover,
    .timeline-item-left .timeline-content:hover,
    .timeline-item-right .timeline-content:hover {
        scale: 1;
        transform: none;
        margin: 0;
    }

    .timeline-vertical img {
        height: auto;
        max-height: 160px;
        max-width: 100%;
    }

    .game-wrappers {
        flex-direction: column;
        width: 100%;
    }

    .game-wrapper {
        width: 100%;
    }

    .popover:popover-open {
        padding: 2rem 1.25rem;
        width: 90vw;
        max-height: 85vh;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .popover * {
        width: revert-layer;
    }

    body::before {
        background-size: 75%;
        background-position: center 60%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .btn-link {
        font-size: 1rem;
        height: 3rem;
    }
}