/* FONTS */
@font-face {
    font-family: "Public Pixel";
    src: url(./assets/fonts/public_pixel.ttf);
}

/* VARIABLES */
:root {
    --primary-color: rgb(225, 30, 65);
    --secondary-color: rgb(180, 24, 53);
    --text-color: rgb(250, 250, 250);
    --background-color: rgb(2, 2, 2);
}

/* RESET CSS */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    scroll-behavior: smooth;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    display: none;
}

/* LOADER */
#page-loader {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Public Pixel";
    background: #000;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.loader-box {
    text-align: center;
}

.loading-text {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--text-color);
}

.progress-container {
    width: 250px;
    height: 25px;
    padding: 5px;
    border: 5px solid var(--text-color);
}

.progress-bar {
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.1s ease;
}

/* GENERAL */
html,
body {
    overflow-x: hidden;
}

body {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--background-color);
    text-align: justify;
}

section a {
    color: var(--primary-color)
}

section a:hover {
    text-decoration: underline;
    color: var(--secondary-color)
}

h2 {
    display: none;
}

h3 {
    margin-bottom: 3rem;
    font-family: "Public Pixel";
    font-size: 1.25rem;
}

.text-align-center {
    text-align: center;
}

/* Move to top button */
#move-to-top-button {
    position: fixed;
    right: 3rem;
    bottom: -3rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* HEADER */
header {
    width: 100%;
    padding: 0.5rem 3rem;
    position: fixed;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: "Public Pixel";
    font-size: 0.75rem;
    background-color: rgba(2, 2, 2, 0.75);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 999;
}

#holberton-survivors-brand {
    height: 3rem;
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

/* Navigation menu */
nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#nav-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.nav-item {
    margin-left: 3rem;
}

.nav-link {
    position: relative;
    text-transform: uppercase;
    color: white;
}

.nav-link::after {
    width: 5px;
    height: 5px;
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    content: "";
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.nav-link.active::after {
    opacity: 1;
}

/* Download button */
#download-nav-button {
    margin-left: 3rem;
    padding: 0.5rem 0.75rem;
    display: block;
    font-family: "Public Pixel", sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: white;
    border: 2px solid white;
    border-radius: 0.5rem;
    background-color: transparent;
    transition: all 0.1s ease-in-out;
    cursor: pointer;
}

#download-nav-button:hover {
    background-color: var(--primary-color);
}

.download-nav-button-active {
    background-color: var(--primary-color) !important;
}

/* Hamburger icon */
#hamburger-icon {
    position: relative;
    width: 1.5rem;
    height: 2rem;
    display: none;
    cursor: pointer;
}

.bar {
    width: 100%;
    height: 3px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    border-radius: 0.5rem;
    background-color: white;
}

#hamburger-icon .bar:nth-last-child(1) {
    top: 25%;
}

#hamburger-icon .bar:nth-last-child(3) {
    top: 75%;
}

#hamburger-icon.active .bar:nth-last-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

#hamburger-icon.active .bar:nth-last-child(2) {
    opacity: 0;
}

#hamburger-icon.active .bar:nth-last-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* DOWNLOAD SECTION */
#download-section {
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 5rem;
    background-image: url(./assets/images/background-download.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#holberton-survivors-logo {
    height: 200px;
    transform: translateY(-30px);
}

/* Download buttons */
#download-buttons-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20rem;
}

.download-button {
    padding: 0.5rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: "Public Pixel";
    color: white;
    border: 2px solid white;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.download-button:hover {
    color: black;
    background-color: rgba(255, 255, 255, 0.8);
}

.download-button img {
    width: 25px;
}

.text-button-container {
    display: flex;
    flex-direction: column;
}

.os-text {
    font-family: monospace;
    text-align: right;
}

/* Scroll down button */
#scroll-down-link {
    position: absolute;
    bottom: 0rem;
}

#scroll-down-button {
    width: 75px;
    height: 75px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Scroll down button animation */
.chevron {
    width: 25px;
    height: 5px;
    position: absolute;
    top: 0;
    opacity: 0;
    transform: scale3d(0.5, 0.5, 0.5);
    animation: move 3s ease-out infinite;
}

.chevron:first-child {
    animation: move 3s ease-out 1s infinite;
}

.chevron:nth-child(2) {
    animation: move 3s ease-out 2s infinite;
}

.chevron:before,
.chevron:after {
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    content: "";
    background: white;
}

.chevron:before {
    left: 0;
    transform: skew(0deg, 30deg);
}

.chevron:after {
    width: 50%;
    right: 0;
    transform: skew(0deg, -30deg);
}

@keyframes move {
    25% {
        opacity: 1;
    }

    33% {
        opacity: 1;
        transform: translateY(30px);
    }

    67% {
        opacity: 1;
        transform: translateY(40px);
    }

    100% {
        opacity: 0;
        transform: translateY(55px) scale3d(0.5, 0.5, 0.5);
    }
}

@keyframes pulse {
    to {
        opacity: 1;
    }
}

/* Particles.js */
#particles-js {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* ABOUT SECTION */
#about-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* About */
#about-container {
    width: 75%;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#about-container p {
    width: 75%;
}

#about-container img {
    margin-bottom: 3rem;
    max-height: 300px;
}

/* Trailer */
#trailer-container {
    width: 75%;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

#trailer-container span {
    font-family: "Public Pixel";
    font-size: 1.5em;
    color: var(--primary-color);
}

#video-container {
    width: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
}

#video-container video {
    width: 100%;
}

#video-player {
    border-radius: 15px;
}

#video-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    font-family: "Public Pixel";
    border-radius: 15px;
    background-color: rgba(224, 29, 63, 0.8);
    z-index: 999;
}

#play-video-button {
    height: 15%;
    cursor: pointer;
    opacity: 0.9;
}

/* Screenshots */
#screenshots-container {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

#screenshots-container p {
    width: 75%;
}

#screenshots {
    width: 85%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 2rem;
}

#screenshots-container img {
    width: 100%;
    padding: 0.5rem;
    object-fit: cover;
    background-color: rgb(255, 255, 255);
    cursor: pointer;
}

#screenshot-overlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 9999;
}

#screenshot-overlay.hidden-overlay {
    display: none;
}

#screenshot-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.screenshot-wrapper {
    padding: 0.5rem;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screenshot-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    color: rgb(255, 255, 255);
    cursor: pointer;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-button:hover {
    background-color: transparent;
}

#prev-button {
    left: 1rem;
}

#next-button {
    right: 1rem;
}

/* LEADERBOARD SECTION */
#leaderboard-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#leaderboard-container {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: "Public Pixel";
}

.dreamloLBTable {
    min-width: 275px;
    border-collapse: collapse;
    text-align: center;
}

.dreamloLBTable th {
    padding: 12.5px;
    color: #e01d3f;
    border-bottom: solid 2px white;
}

.dreamloLBTable td {
    padding: 12.5px;
    border-bottom: solid 2px white;
}

/* THANKS SECTION */
#thanks-section {
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#thanks-container {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

#thanks-container p {
    width: 75%;
}

#thanks-links-container {
    width: 85%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5rem;
}

#graphical-assets-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    text-align: center;
}

#graphical-assets-container img {
    border-radius: 15px;
}

#music-assets-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.75rem;
    text-align: center;
}

.music-assets-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* PARALLAX EFFECT */
#parallax {
    height: 300px;
    background-image: url(./assets/images/parallax-background.webp);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* CONTACT SECTION */
#contact-section {
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#contact-container {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: justify;
}

#contact-container p {
    width: 75%;
}

/* Contact form */
#contact-form-container {
    width: 85%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

form {
    width: 100%;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid white;
    resize: none;
}

textarea {
    width: 100%;
    height: 6rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid white;
    resize: none;
}

button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5px;
    font-family: "Public Pixel";
    color: white;
    background-color: #e01d3f;
    transition: 0.2s ease-in-out;
    cursor: pointer;
}

button:hover {
    background-color: var(--secondary-color);
}

/* FOOTER */
footer {
    width: 100%;
    padding-bottom: 3rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-family: "Public Pixel";
    font-size: 0.75rem;
}

#fabien,
#yoann {
    width: calc(100% / 5);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#holberton-seahorse-logo {
    height: 3rem;
    transition: transform 0.2s ease-in-out;
}

#holberton-seahorse-logo:hover {
    transform: scale(1.1);
}

.social-media-icon {
    height: 2rem;
    transition: transform 0.2s ease-in-out;
}

.social-media-icon:hover {
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 1200px) {

    /* General */
    h3 {
        font-size: 0.75rem;
    }

    /* Header */
    header {
        padding: 0.5rem 1rem;
    }

    #nav-menu {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100svh - 4rem);
        padding: 5rem 0;
        flex-direction: column;
        justify-content: space-around;
        transition: all 0.2s ease-in-out;
    }

    #responsive-menu-background {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.75);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
        transition: all 0.2s ease-in-out;
        z-index: 99;
    }

    #nav-menu.show {
        left: 0;
    }

    #responsive-menu-background.show {
        left: 0;
    }

    .nav-item {
        margin-left: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .nav-link::after {
        display: none;
    }

    #download-nav-button {
        display: none;
    }

    #hamburger-icon {
        display: block;
    }

    /* Download section*/
    #holberton-survivors-logo {
        height: 125px;
        margin-bottom: 24rem;
        transform: translateY(0px);
    }

    #download-buttons-container {
        display: none;
    }

    /* About section */
    #about-container {
        width: 100%;
    }

    #about-container p {
        width: 90%;
    }

    #about-container img {
        margin-bottom: 2rem;
        max-height: 250px;
    }

    #trailer-container {
        width: 100%;
    }

    #trailer-container span {
        font-size: 1em;
    }

    #video-container {
        width: 90%;
    }

    #screenshots-container {
        width: 100%;
    }

    #screenshots-container p {
        width: 90%;
    }

    #screenshots {
        width: 90%;
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    #screenshots-container img {
        padding: 0.25rem;
        pointer-events: none;
    }

    /* Leaderboard section */
    #leaderboard-container {
        width: 100%;
        font-size: 0.75em;
    }

    /* Thanks section */
    #thanks-section {
        padding-bottom: 0rem;
    }

    #thanks-container {
        width: 100%;
    }

    #thanks-container p {
        width: 90%;
    }

    #thanks-links-container {
        width: 90%;
        flex-direction: column;
        gap: 3rem;
    }

    #music-assets-container {
        grid-template-columns: 1fr;
    }

    /* Parallax effect */
    #parallax {
        display: none;
    }

    /* Contact section */
    #contact-container {
        width: 100%;
    }

    #contact-container p {
        width: 90%;
    }

    #contact-form-container {
        width: 90%;
    }

    /* Footer */
    footer {
        gap: 3rem;
    }

    /* Move to top button */
    #move-to-top-button {
        display: none;
    }
}

/* GLOBAL PAGE ANIMATION */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transition: all 0.5s;
}

.show {
    opacity: 1;
    filter: blur(0);
}

.hidden-top {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(-20%);
    transition: all 0.50s;
}

.show-top {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.hidden-right {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(100%);
    transition: all 0.5s;
}

.show-right {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

.hidden-bottom {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20%);
    transition: all 0.50s;
}

.show-bottom {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.hidden-left {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-100%);
    transition: all 0.5s;
}

.show-left {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

@media(prefers-reduced-motion) {
    .hidden {
        transition: none;
    }

    .hidden-top {
        transition: none;
    }

    .hidden-right {
        transition: none;
    }

    .hidden-bottom {
        transition: none;
    }

    .hidden-left {
        transition: none;
    }
}