@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/fortnite.otf') format('woff2'),
         url('../fonts/fortnite.woff') format('woff'),
         url('../fonts/fortnite.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'CustomFont', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: url('../images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: rgb(255, 255, 255);
}

.loading-bar {
    width: 50vw; /* Relative to viewport width */
    height: 5vh; /* Relative to viewport height */
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 7px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-bar-progress {
    height: 100%;
    width: 0;
    background-color: #61dafb;
    border-radius: 7px;
    transition: width 1s linear;
}

h1, h2, #countdown, #milliseconds-container, p {
    position: fixed;
    transform: translate(-50%, -50%);
}

h1 {
    color: rgba(0, 0, 0, 0.641);
    top: 2%;
    left: 5%;
    font-size: 2vw; /* Relative to viewport width */
}

h2 {
    top: 30%;
    left: 50%;
    font-size: 5vw; /* Relative to viewport width */
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 1vw; /* Relative to viewport width */
    top: 60%;
    left: 46%;
}

#milliseconds-container {
    display: flex;
    justify-content: center;
    gap: 1vw; /* Relative to viewport width */
    top: 60%;
    left: 62%;
}

#milliseconds, #countdown div {
    font-size: 2vw; /* Relative to viewport width */
}

p {
    font-size: 1.5vw; /* Relative to viewport width */
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2vh; /* Relative to viewport height */
    font-weight: 1;
    letter-spacing: 0.5vw; /* Relative to viewport width */
    top: 90%;
    left: 50%;
    white-space: nowrap;
}

/* Media Queries for Different Devices */

/* Styles for larger screens */
@media (min-width: 1024px) {
    h1 {
        font-size: 2vw;
    }

    h2 {
        font-size: 5.7vw;
    }

    #countdown, #milliseconds-container {
        gap: 1.5vw;
    }

    #milliseconds, #countdown div {
        font-size: 2.5vw;
    }

    p {
        font-size: 1.7vw;
        margin-bottom: 1.5vh;
        letter-spacing: 0.1vw;
    }
}

/* Styles for tablets and smaller laptops */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5vw;
    }

    h2 {
        font-size: 5.2vw;
    }

    #countdown, #milliseconds-container {
        gap: 1.5vw;
    }

    #milliseconds, #countdown div {
        font-size: 2.5vw;
    }

    p {
        font-size: 2vw;
        margin-bottom: 2vh;
        letter-spacing: 0.1vw;
    }
}

/* Styles for mobile devices */
@media (max-width: 768px) {
    h1 {
        font-size: 4vw;
    }

    h2 {
        font-size: 6vw;
    }

    #countdown, #milliseconds-container {
        gap: 1vw;
    }

    #milliseconds, #countdown div {
        font-size: 2.5vw;
    }

    p {
        font-size: 2.2vw;
        margin-bottom: 3vh;
        letter-spacing: 0.1vw;
    }
}

/* Styles for very small screens, like mobile phones */
@media (max-width: 480px) {
    h1 {
        font-size: 6vw;
    }

    h2 {
        font-size: 6vw;
    }

    #countdown, #milliseconds-container {
        gap: 2vw;
        
    }

    #milliseconds, #countdown div {
        font-size: 5vw;
    }

    p {
        font-size: 4vw;
        margin-bottom: 4vh;
        letter-spacing: 1.5vw;
    }
}
