* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  color: #606060;
  font-family: "Open Sans", "Tahoma", sans-serif;
}
p {
  font-size: 1rem;
  line-height: 1.6em;
}
a {
  color: #5e387c;
  text-decoration: none;
  transition: 0.4s ease;
}
a:hover {
  color: #957ac1;
}

label {
  display: block;
}

nav a {
  display: inline-block;
  margin: 1em;
}

.flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
button {
  padding: 1em 2em;
  background-color: #5e387c;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: block;
  font-family: 'Gill Sans', 'Gill Sans MT', 'Lato', 'Tahoma', sans-serif;
  font-size: 1rem;
  font-weight: 10;
  justify-content: center;
  line-height: 1;
  outline: none;
  padding: 1rem 1.2rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.4s ease;
}
button:hover {
  background-color: #9d7fba;
}

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

/*** Navbar ***/
.logo {
  height: 32px;
}
.menu-links .menu-item {
  color: #5e387c;
}
.nav-link {
  color: #5e387c;
}
h1 {
  color: #5e387c;
  font-family: "Gill Sans", "Gill Sans MT", "Lato", "Tahoma", sans-serif;
  font-size: 3rem;
  line-height: 1.5;
}
h2 {
  color: #5e387c;
  line-height: 1.25;
}

/*** Footer ***/
.footer {
  background-color: #5e387c;
  color: #FFFFFF;
  padding: 3em 0;
}
.footer-content {
  text-align: center;
  width: 1200px;
  margin: auto;
}
.footer .logo {
  width: 400px;
  height: initial;
  margin: 0 auto 1.5rem;
}
.footer img {
  width: 100%;
}
.footer .libraries {
  margin-top: 60px;
}

/*** Homepage ***/
.hero {
  background: url("/images/hero-background.png");
  background-size: cover;
  font-family: "Gill Sans", "Gill Sans MT", "Lato", "Tahoma", sans-serif;
  font-weight: 700;
  height: 80vh;
  position: relative;
  z-index: 1;
}
.hero-text {
  text-align: center;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  width: 950px;
  margin: auto;
}
.homepage h1 {
  color: #ffffff;
  font-size: 3em;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 1em;
}
.homepage h2 {
  color: #5e387c;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 1rem;
}
.homepage h3 {
  color: #5e387c;
  font-weight: bold;
  margin: 1rem 0;
}
.homepage p {
  font-size: 0.9rem;
}
.button-start {
  font-family: "Open Sans", "Tahoma", sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 0.75em 2em;
  background-color: #f0f0f0;
  border: none;
  border-radius: 6px;
  color: #5e387c;
  margin: 1rem auto;
  transition: 0.4s ease;
  cursor: pointer;
}
.button-start:hover {
  background-color: #e5d4f9;
}
.row {
  width: 1200px;
  margin: 90px auto;
}
.row-color {
  background-color: #5e387c;
}
.column-3 {
  text-align: center;
  width: 30%;
}
.column-3 img {
  max-height: 120px;
  max-width: 200px;
}
.column-4 {
  width: 25%;
  padding: 1rem 0.5rem;
}
.column-4 img {
  width: 100%;
}
.homepage .column-left {
  width: 50%;
  padding-right: 40px;
}
.homepage .column-right {
  width: 50%;
}
.homepage .bottom {
  text-align: center;
}
.homepage .bottom h2 {
  margin-bottom: 1em;
}

/*** Explore page ***/
.explore h1 {
  margin-bottom: 1rem;
}
.explore h2 {
  font-size: 1.75em;
}
.explore input, .explore select {
  margin: 0.5em 0;
}
.explore .column-left {
  width: 360px;
  padding: 1.5rem;
}
.explore .column-right {
  max-width: 75%;
}
.explore button {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  margin: 1em 0;
}
.explore .fields {
  margin-top: 1rem;
}

/*** Messenger ***/
.messenger{
  height: calc(100vh - 70px);
  display: flex;
}

.chatMenu{
  flex: 2;
  border-right: 1px solid #999999;
}
.chatMenuName{
  color: black;
}
.chatMenuInput{
  width: 90%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid grey;

}
.chatBox{
  flex: 5.5;
}
.chatBoxWrapper{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.chatBoxTop{
  height: 100%;
  overflow-y: scroll;
  padding-right: 10px;
}
.chatBoxBottom{
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chatMessageInput{
  width: 80%;
  height: 90px;
  padding: 10px;
  font-size: large;
}
.chatSubmitButton{
  width: 70px;
  height: 40px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #5e387c;
  color: white;
}
.chatOnline{
  flex: 3
}
.chatOnlineFriend{
  display: flex;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
}
.chatOnlineImgContainer{
  position: relative;
  margin-right: 10px;
}
.chatOnlineImg{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid white;
}
.chatOnlineBadge{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: limegreen;
  position: absolute;
  top: 2px;
  right: 2px;
}
.chatMenuWrapper,
.chatBoxWrapper,
.chatOnlineWrapper {
  padding: 10px;
  height: 100%;
}
.conversation{
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  /* margin-top: 20px; */
}
.conversation:hover{
  background-color: rgb(242, 229, 251);
}
.conversationImg{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 20px;
}
.conversationName{
  font-weight: bold;
}
.noConversationText{
  position: absolute;
  top: 10%;
  font-size: 50px;
  color: gray;
  text-align: center;
  cursor: default;
  margin-left: 3rem;
}
.message{
  display: flex;
  flex-direction: column;
  margin-top: 20px; 
}
.messageTop{
  display: flex;
}
.messageBottom{
  font-size: 12px;
}
.message.own{
  align-items: flex-end;
}
.message.own  .messageText{
  background-color: rgb(238, 234, 234);
  color: black;
}
.messageImg{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}
.messageText{
  padding: 10px;
  border-radius: 20px;
  background-color: rgb(108, 37, 159);
  color: white;
  max-width: 300px;
}

/*** Search ***/
.search {
  width: 100%;
}
.search-input {
  width: 100%;
  padding: 0.5rem;
}

/*** Authform ***/
.authform.flex-container {
  align-items: normal;
}
.authform .column-left {
  width: 50%;
}
.authform .column-right {
  background: url('/images/login-background.jpg');
  background-size: cover;
  background-position: center;
  width: 50%;
}
.login {
  margin-left: calc(50% + 5px);
  transform: translateX(-50%);
  padding: 25vh 0;
}
.login button {
  text-transform: uppercase;
  width: 100%;
}
.login button:hover {
  background-color: #e5d4f9;
  box-shadow: 0 4px 12px 0 rgba(0,0,0,0.1), 0 6px 20px 0 rgba(0,0,0,0.1);
}
.login button.google {
  background-color: transparent;
  border: 1px solid #757575;
  color: #757575;
  display: flex;
  align-items: center;
  padding: 0 1em 0 0.25em;
  width: initial;
}
input,
select,
textarea {
	color: #606060;
	font-family: 'Open Sans', Tahoma, sans-serif;
	font-size: .875em;
	border: 1px solid #8d8d8d;
	border-radius: 4px;
	box-sizing: border-box;
	padding: 0.75em 0.75em;
	width: 100%
}
label, input {
  margin: 4px auto;
}
.field-row {
  display: block;
  margin: 1em 0;
}

/*** Leaderboard ***/
.leaders.flex-container {
  justify-content: center;
}
.leaders img {
  display: block;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
}
.leader {
  margin: 0 2rem;
}
.leader span {
  font-size: 1.5rem;
}
.leader img {
  margin-bottom: 1rem;
}
.first {
  order: 2;
  text-align: center;
}
.first img {
  border: 6px solid gold;
  width: 300px;
  height: 300px;
}
.second {
  order: 1;
  text-align: center;
}
.second img {
  border: 6px solid silver;
}
.third {
  order: 3;
  text-align: center;
}
.third img {
  border: 6px solid brown;
}
.leaderboard h2 {
  margin: 1em auto;
}
.rankings-table {
  display: flex;
  justify-content: space-around;
  position: relative;
}
.leaderboard .filter {
  position: absolute;
  left: 0;
}
.leaderboard table {
  font-size: 1rem;
}
.leaderboard table img {
  border-radius: 60px;
  width: 60px;
  height: 60px;
  object-fit: cover;
}

/*** Challenges ***/
.challenges h2 {
  margin-bottom: 1em;
}
.challenges .anchor-links.flex-container {
  justify-content: center;
}
.challenges .anchor-links button {
  margin: 0 2rem;
}
.challenge-card {
  box-shadow: 0 4px 12px 0 rgba(0,0,0,0.1), 0 6px 20px 0 rgba(0,0,0,0.1);
}
.challenge-card img {
  display: block;
  width: 100%;
  height: 200px;
}
.card-text {
  padding: 24px;
}
.challenges .flex-grid {
  display: grid;
  grid-template-columns: repeat(3, 30%);
  justify-content: space-between;
  row-gap: 2rem;
}
.challenges hr {
  border-top: 2px solid #9d7fba;
  margin-bottom: 2rem;
}
#add-challenge .box {
  border: 1px solid #999999;
  width: 560px;
  margin: 0 auto;
  padding: 3rem;
}
.challenges .box input, .challenges .box select {
  margin: 0.5em 0;
}
.challenges .box button {
  margin-top: 0.5em;
}

/*** Single Challenge ***/
.challenge .row.top {
  text-align: left;
}
.challenge .row:first-child {
  background-color: #ffffff;
  border: 1px solid #999999;
}
.challenge .row.flex-container, .challenge .row .flex-container {
  align-items: flex-start;
}
.challenge .top h2 {
  margin-top: 4rem;
  margin-bottom: 2rem;
}
.challenge .top .column-left {
  width: 32%;
  padding: 2rem;
}
.challenge .top .column-right {
  width: 65%;
}
.challenge .top .image-container {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 35px;
  height: 0;
  overflow: hidden;
}
.challenge .top img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.challenge button {
  font-size: 0.875rem;
  text-align: left;
  margin: 1rem 0 0;
}
.challenge .creator {
  margin: 3em 0 0;
}
.challenge .difficulty {
  border: 2px solid #5e387c;
  border-radius: 2rem;
  color: #5e387c;
  font-size: 14px;
  font-weight: 600;
  padding: 0.5em 1em;
}
.challenge .row {
  margin: 60px auto;
}
.challenge .description .column-left {
  width: 65%;
}
.challenge .description .column-right {
  width: 32%;
  border: 1px solid #999999;
  padding: 0 2rem 2rem;
}
.challenge h2 {
  margin-top: 2rem;
}
.challenge .description li {
  list-style-type: none;
  height: 40px;
  margin-top: 1em;
}
.challenge .description img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-right: 1rem;
  vertical-align: middle;
}
.challenge .description-text p {
  margin-top: 24px;
}

/*** Users ***/
.users h2 {
  text-align: center;
  margin: 2rem 0;
}
.user img {
  border-radius: 90px;
  width: 90px;
  height: 90px;
  object-fit: cover;
  margin-right: 1rem;
  vertical-align: middle;
}
.user .user-card {
  border: 1px solid #999999;
  width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
}
.user .username {
  font-size: 1.25rem;
  font-weight: 600;
}
.user.user-profile .user-card {
  width: 100%;
  border: none;
  padding: 0;
}
.user.user-profile img {
  border-radius: 200px;
  width: 200px;
  height: 200px;
}
.user .box-container {
  border: 1px solid #999999;
  padding: 2rem;
}
.user table {
  margin-top: 1rem;
}
.user table td {
  padding: 1em;
}
.user table tr td:nth-child(2) {
  font-weight: bold;
  font-size: 1.25rem;
}

/*** Libraries ***/
.libraries img {
  border: none;
  width: 20%;
}


/*** Responsive ***/
@media (max-width: 1280px) {
  .row, .footer-content {
    width: 80%;
  }
}
@media (max-width: 980px) {
  .row {
    width: 80%;
  }
  .row .flex-container {
    flex-direction: column;
  }
  .homepage .column-left, .homepage .column-right, .column-3, .column-4 {
    width: 90%;
  }
  .column-right {
    margin-top: 1.5em;
  }
  .column-right img {
    width: 100%;
  }
  .hero-text {
    width: 90%;
  }
  .challenges .flex-grid {
    grid-template-columns: repeat(2, 47.5%);
  }
}
@media (max-width: 768px) {
  .challenges .flex-grid {
    grid-template-columns: 100%;
  }
}

/*** Profile ***/
.profile .row.top {
  margin-bottom: 40px;
}
.profile-card{
  display:flex; 
  justify-content: center; 
  align-items: center;
  width: 50%;
  height: 250px;
  margin: auto; 
  padding: 5px;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: solid 1px rgb(231, 227, 227);
}
.profile-info{
  font-size: 16;
  font-weight: normal;
  line-height: 1;
  margin-bottom: 1em;
}
.update-form {
  width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.update-field{
  width: 250px
}
.update-form button {
  text-align: center;
  padding: 1rem 2rem;
  margin: auto;
}

/*** Friends ***/
.flex-grid{
  display: grid;
  grid-template-columns: repeat(3, 30%);
  justify-content: space-between;
  row-gap: 2rem;
}
.friend-card{
  border: solid 1px rgb(231, 227, 227);
}

/*** Friend Requests ***/
.request-list{
  padding-top: 10px;
  padding-bottom: 10px;
}
.friend-request{
  display:flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  height: 50px;
  width: 30%;
  padding: 2.5rem;
  border: solid 1px rgb(231, 227, 227)
}
.friend-request:hover{
  background-color: #ece2f7;
}
.friend-req-button{
  margin: 10px 10px 0 10px;
  padding: .25rem;
}
.friend-requests button.decline {
  background-color: #957ac1;
  margin-top: 1em;
}

.user.friend-requests .flex-container {
  flex-flow: row wrap;
}
.user.friend-requests .user-card {
  border: 1px solid #999999;
  width: 48%;
  margin-left: initial;
  margin-right: initial;
  margin-bottom: 2rem;
  padding: 2rem;
}