body {
    background-color: #2C3E50;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #34495E;
    color: white;
    padding: 1rem;
    text-align: center;
}

a {
    color: #008cba;
    text-decoration: none;
}

button {
    cursor: pointer;
}

.title {
    font-size: 3rem;
    display: inline;
}
.medium {
    font-size: 1.9rem;
}
.small {
    font-size: 1.2rem;
}
.main_box_background {
    max-width: fit-content;
    max-height: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px/20px;
    background-color: #34495E;
}
.emoji {
    height: 1em;
    width: 1em;
    vertical-align: -0.1em;
}
.header_button:hover {
    background-color:rgb(154, 154, 154);


}
#friends_button:hover {
    background-color:rgb(154, 154, 154);
}

.mini_pfp {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #3F5B76;
    background-color: #3F5B76;
    margin-top: 10px;
    margin-right: 5px
}

.close_button {
    position: relative;
    top: -30px;
    right: -53%;
    margin-bottom: -50px;
}



/* --------------------------- HEADER --------------------------- */
.header_flexbox {
  display: flex;
  justify-content: space-between;
  box-shadow: #2C3E50;
}

#header_logo {
    width: 250px;
}

#home_button {
    border: none;
    background-color: rgba(255, 255, 255, 0);
}


.header_button {
    background-color: #3F5B76;
    font-size: 1.7rem;
    color: white;
    border: none;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    justify-content: center;
    border-radius: 15px/15px;
    font-family: 'Poppins', sans-serif;
}

.header_button:active {
    background-color: #b4bfc9;
    color: black;
}

.header_button:disabled {
    background-color: #404040;
    color: rgb(154, 154, 154);
}

.flexbox_column_center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto
}
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    margin-left: 16px;
    background-color: #e9e9e9;
    min-width: 100px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding-left: 0;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color:rgb(154, 154, 154);border: solid; border-color: black;}
.dropdown-content a:active {color: #3F5B76; background-color: #d9d9d9e6;}
.dropdown:hover .dropdown-content {display: block;}


/* --------------------------- HOMEPAGE --------------------------- */
.cps_button {
    border: none;
    color: black;
    background-color: #d9d9d9;
    padding: 20%;
    padding-top: 26%;
    padding-bottom: 26%;
    font-size: 3vw;
    font-family: 'Poppins', sans-serif;
    border-radius: 25px/25px;
    transition: 0.05s;
}
.cps_button:active {
    color: #3F5B76;
    background-color: #d9d9d9e6;
}

.cps_button:disabled {
    background-color: #404040;
    color: rgb(154, 154, 154);
    border: solid white;
}

#homepage_flexbox {
    display: flex;
    height: 100%;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}

#homepage_left {
    margin-top: 3%;
    width: 50%;
    height: 100%
}

#friends_button {
    background-color: #3F5B76;
    font-size: 3vw;
    color: white;
    border: none;
    padding-left: 15%;
    padding-right: 15%;
    padding-top: 10%;
    padding-bottom: 10%;
    border-radius: 15px/15px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
}

#friends_button:active {
    background-color: #b4bfc9;
    color: black;
}


/*Absolute centre on leaderboards button while the screenspace allows for it*/
@media (min-width: 950px) {
    #leaderboards_button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    }
}

@media (max-width: 949px) {

    #header_logo {
        width: 25vw;
        margin-bottom: 0px;
        padding: none;
        top: 10px;
    }

    .dropdown-content {
        margin-left: 14px;
        min-width: 75px;
    }

    /* Reduce size of header buttons with certain screen size */
    .header_button {
        font-size: 1.2rem;
    }
    /* Allow button font to increase when it is moved */
    #friends_button {
        font-size: 5vw;
    }
    .cps_button {
        font-size: 5vw;
    }
    /* Effectively move the friends button below the click speed test */
    #homepage_flexbox {
        display: inline;
    }
    /* re-center click speed test */
    #homepage_left {
        margin-top: 3%;
        width: 100%;
        height: 100%
    }
    
}


/* --------------------------- LOGIN --------------------------- */
#login_box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    padding: 5%;
    padding-top: 0%;
    padding-bottom: 1%;
    margin-top: 5%;
}

#login_text {
    padding-bottom: 20%;
    margin-bottom: 3%;
}

.confirm_button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 20%;
}

.helptext {
    padding-block: 1px;
    padding-inline: 2px;
    font-size: 0.8rem;
    font-style: italic;
}



/* --------------------------- SESSION --------------------------- */
#game_info_flexbox {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 50px;
    padding-top: 25px;
    margin-bottom: 25px;
}

#sharelink_text {
    font-size: 1.5rem;
    padding-top: 2%;
    margin-bottom: 0%;
}

#pregame_box {
    position: relative;
    padding-bottom: 2%;
    padding-left: 2%;
    padding-right: 2%;
    margin-top: 2%;
    border-radius: 5%/10%;
    min-width: 900px;
}

#copy_link_button {
    margin-top: 0%;
    font-size: 1.2rem;
    z-index: 1;
}

#start_game {
    font-size: 1.2rem;
}

#start_game_button_div {
    display: flex;
    justify-content: center;
    margin-top: 0.5%;
}

#game_link {
    margin-left: 3px;
    font-size: 1rem;
    z-index: -1;
    width: 65%;
    padding-top: 1.2%;
    padding-bottom: 1.1%;
    border-radius: 2%/30%;
    background-color: black;
    color: white;
    opacity: 60%;
    border: none;
}

.secondary_box_background {
    max-width: fit-content;
    max-height: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2%;
    padding-right: 2%;
    border-radius: 5%/20%;
    background-color: #3F5B76;
}

#joined_players_div {
    border-radius: 15%/15%;
    min-width: 200px;
    margin-right: 0px;
}
#gamemode_info_div {
    width: 250px;
    margin-left: 75px;
    border-radius: 6%/9%;
}

.little_box_title {
    display: flex;
    justify-content: center;
    margin: 0%
}

@media (max-width: 950px) {
    #gamemode_info_div {
        display: none;
    }
    #pregame_box {
        min-width: 200px;
    }
}

/* --------------------------- GAMEPLAY --------------------------- */
#player_info_flexbox {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    text-align: center;
    gap: 200px;
}

.gameplay_player_name {
    font-size: large;
    width: 120px;
    height: 30px
}

.player_progress_div_bg {
    width: 8rem;
    height: 18rem;
    background-color: #697DBE;
}

.player_progress_div {
    width: 100%;
    height: 100%; /* 90% = player progress is 10% */
    background-color: #D9D9D9;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    }

.popup {
    background: #34495E;
    color: rgb(255, 255, 255);
    padding: 30px 50px;
    border-radius: 10px;
    text-align: center;
    font-size: 2em;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }

/* Hide by default */
.overlay {
    display: none; /* Change to flex */
    }


/* --------------------------- PROFILE --------------------------- */
#banner_image {
    max-width: 100%;
    height: auto;
    display: block;
    border: 6px solid #3F5B76;
}

#profile_image {
    position: absolute;
    bottom: -100px;
    left: 15%;
    transform: translateX(-50%);
    width: 20%;
    height: 60%;
    border-radius: 50%;
    border: 4px solid #3F5B76;
    background-color: #3F5B76;
}

.banner_pfp_div {
    position: relative;
    max-width: 70%;
    margin: 0 auto;
}

.center_div {
    margin-top: 3%;
    display: flex;
    justify-content: center;
}

#user_info_flexbox {
    margin-top: -1%;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
}

#profile_user_info_left {
    margin-left: 20%;
}

#profile_user_info_right {
    margin-right: 18%;
}

#username_div {
    margin-left: 35%;
    margin-bottom: -5%;
    padding-bottom: 7%;
    width: 470px;
    height: 50px;
    overflow: hidden;
    text-wrap: nowrap;
    text-overflow: ellipsis;
}

#bio_div {
    margin-top: 4%;
    width: 600px;
    height: 200px;
    text-wrap: pretty;
    overflow: hidden;
    text-overflow: ellipsis;
}

.horizontal_thin_bar {
    margin-left: 5%;
    width: 90%;
    height: 10px;
    background-color: #34495E;
}

.vertical_thin_bar_light {
    margin-top: 3%;
    height: 130px;
    width: 10px;
    background-color: #3F5B76;
}

#game_history_text {
    margin-left: 7%;
}

#game_history {
    margin-left: 12%;
    margin-right: 4%;
}

.game_flexbox {
    padding-left: 10%;
    padding-right: 10%;
    margin-top: 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    margin-right: 7%;
    background-color: #34495E;
    border-radius: 15px/20px;
    
}
.win_text {
    font-weight: bold;
    color: #00FF00;
    font-family: 'Pixelify Sans';
    font-size: 500%;
    padding: 0px;
    margin: 0px;
    padding-top: 25%;
}


.history_column_div {
    text-align: center;
    padding-left: 0px;
    padding-right: 0px;
}

.history_title {
    font-weight: bold;
}

#edit_button {
    position: absolute;
    top: 100px;
    right: 30px;
}
.helper_text {
    font-size: 1rem;
    margin: 0px;
    padding: 0px;
    margin-bottom: 12px;
}


@media (min-width: 1800px) {
    #username_div {
        margin-left: 42%;
    }

}

@media (min-width: 2000px) {
    #username_div {
        margin-left: 50%;
    }

}


@media (min-width: 2300px) {
    #username_div {
        margin-left: 75%;
    }

}

@media (max-width: 750px) {
    #bio_div {
        width: 250px;
    }
}

@media (max-width: 1350px) or (min-width: 2500px) {
    #user_info_flexbox {
    flex-direction: column;
    margin-top: 9%;
    margin-left: 10%;
    }
    #profile_user_info_left {
        margin-left: 15%;
    }
    #profile_user_info_right {
        margin-left: 15%;
    }
    #username_div {
        padding-top: 0%;
        padding-bottom: 2%;
        margin-left: 0%;
        margin-top: -10%;
        margin-bottom: 0%;
    }

    #bio_div {
        margin-top: 0;
        margin-bottom: 0%;
        height: auto;
        text-wrap: wrap;
    }
    #profile_image {
    bottom: -20px;
}
}

@media (max-width: 990px) {
    #game_history_text {
        display: none;
    }

    #game_history {
        display: none;
    }

    .game_flexbox {
        display: none;
        
    }
    .win_text {
        display: none;
    }

    .history_column_div {
        display: none;
    }

    .history_title {
        display: none;
    }

    .horizontal_thin_bar {
        display: none;
    }

    #username_div {
        padding-bottom: 5%;
    }
}


/* --------------------------- LEADERBOARD --------------------------- */

#leaderboard_list {
    padding-left: 70px;
}

#leaderboard_titles {
    padding-left: 70px;
    display: flex;
    flex-direction: row;
    font-weight: bold;

}

.leaderboard_item {
    display: flex;
    flex-direction: row;
}

.pos_item {
    min-width: 200px;
}

.speed_item {
    min-width: 250px;
}

.user_item {
    width: 350px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#leaderboard_main_box {
    margin-top: 3%;
    padding-left: 50px;
    padding-top: 20px;
    padding-bottom: 30px;
    border-radius: 15px/15px;
    min-height: 610px;
}

.horizontal_thin_dark_bar {
    width: 100%+120px;
    height: 1px;
    background-color: #00000078;
    margin-left: -120px;
    margin-top: -10px;
}

.pagination_button {
    background-color: #3F5B76;
    color: white;
    font-size: larger;
    padding: 0.7rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    text-align: center;
    margin-left: 7px;
    margin-right: 7px;
    border: none;
    border-radius: 30%/30%;
    font-weight: bolder;
}

.pagination_button:hover {
    background-color:rgb(154, 154, 154);
}
.pagination {
    margin: auto;
    width: 50%;
    margin-top: 30px;
}

.pagination_button:active {
    background-color: #b4bfc9;
    color: black;
}

.pagination_button:disabled {
    background-color: #404040;
    color: rgb(154, 154, 154);
}


@media (max-width: 775px) {
    #leaderboard_main_box {
    border-radius: 12%/7%;
    }

    #leaderboard_list {
    padding-left: 10px;
    }

    #leaderboard_titles {
        padding-left: 10px;
    }

    .pos_item {
        min-width: 80px;
    }

    .speed_item {
        min-width: 100px;
    }

    .user_item {
        width: 125px;
    }

    .horizontal_thin_dark_bar {
    width: 100%+60px;
    margin-left: -60px;
    margin-top: -10px;
    }
    .pagination {
    margin: auto;
    width: 100%;
    margin-right: 25px;
    margin-left: -25px;
    margin-top: 30px;
    }
}

