/* Colour palette 

Main Blue:     #5c8ecb
Offwhite:      #f0f0ef
White:         #ffffff
Black:         #191919
Dark Grey:     #505053
Light Grey:    #9d9fa4
*/

* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif, Arial, Helvetica, sans-serif
}

body {
  font-family: 'Poppins';
  margin: 0;
  background: #f0f0ef;
}

.factblocked-nav {
  top: 0;
  position: sticky;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  height: 70px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 999;
  margin: 0;
}

/* Sections */
.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}

/* Logo */
.nav-logo {
  width: 180px;
  cursor: pointer;
}

/* Center nav icons */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  color: #505053;
  cursor: pointer;
  padding: 10px 30px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  text-decoration: none;
}

.nav-icon:hover {
  transition: .3s ease;
  background-color: #f0f0ef;
  color: #5c8ecb;
}

.nav-icon.active {
  color: #5c8ecb;
}


.nav-icon::before {
  content: attr(data-tooltip);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);

  background-color: #5c8ecb;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.nav-icon:hover::before,
.nav-icon.active::before {
  opacity: 1;
}

.profile-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  color: #505053;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  text-decoration: none;
}

.logo {
  width: 240px;
  margin-right: 45px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-user-icon img {
  width: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.online {
  position: relative;
}

.online::after {
  content: '';
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #41db51;
  position: absolute;
  top: 0;
  right: 0;
}

.nav-gap {
  margin: 25px;
  font-style: italic;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  color: #5c8ecb;
}

/* Game Page */
.quiz-container {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  position: relative;
  margin: 40px auto;
}

h1 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 30px;
}

/* Progress Bar */
.progress-bar {
  height: 12px;
  background: #ddd;
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: #5c8ecb;
  width: 0%;
  transition: width 0.3s;
}

/* Question */
.question {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
  font-size: 22px;
}

.question img {
  max-width: 100%;
  max-height: 250px;
  margin-top: 15px;
  border-radius: 8px;
}

/* Options Grid */
.options {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.option {
  padding: 15px;
  background: #f0f0ef;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s, transform 0.2s;
}

.option:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

/* Correct/Incorrect Option Styling */
.option.correct {
  background: #66b553;
  color: white;
}

.option.wrong {
  background: #eb4242;
  color: white;
}

/* Final Score in center */
#result-container {
  display: none;
  text-align: center;
  font-size: 40px;
  font-weight: bold;
  margin-top: 40px;
}

#result-container p {
  margin-bottom: 20px;
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  background: #5c8ecb;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
  margin-top: 40px;
}

.btn:disabled {
  background: #9d9fa4;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  background: #9d9fa4;
}

#rules-container {
  margin-top: 30px;
  text-align: center;
  margin-bottom: 20px;
}

#rules-container h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

#rules-container ul {
  list-style: none;
  padding: 0;
}

#rules-container li {
  margin: 10px 0;
  font-size: 16px;
}


/*--------------------------------------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------- Mobile View ---------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------------------------------*/



@media (max-width: 900px) {

  .add-post-links a img {
    width: 2rem;
    margin-right: 10px;
  }


  .nav-center {
    display: none;
  }

  .profile-photo {
    display: none;
  }

  .cover-img {
    grid-area: cover;
  }

  .profile-details {
    flex-wrap: wrap;
  }

  .add-post-links {
    align-items: center;
  }

  nav {
    flex-wrap: wrap;
  }

  .logo {
    width: 110px;
    margin-right: 20px;
  }

  .nav-left ul li img {
    width: 20px;
    margin: 0 8px;
  }

  nav-user-icon img {
    width: 30px;
  }

  .nav-user-icon {
    margin-left: 0;
  }


  .nav-profile-mobile {
    display: none;
  }

  .profile-info {
    flex-direction: column;
  }

  .info-col {
    width: 100%;
  }

  .post-col {
    width: 100%;
  }

  .quiz-container {
    margin: 25px;
  }
}

@media (min-width: 900px) {
  .dropdown-menu {
    display: none;
  }

  .nav-profile-desktop {
    display: none;
  }

  .profile-icon:hover {
    transition: .3s ease;
    background-color: #f0f0ef;
    color: #5c8ecb;
  }

  .profile-icon.active {
    color: #5c8ecb;
  }

  .profile-icon::before {
    content: attr(data-tooltip);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);

    background-color: #5c8ecb;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
  }

  .profile-icon:hover::before,
  .profile-icon.active::before {
    opacity: 1;
  }
}

.dropdown-menu {
  display: none;
  position: sticky;
  top: 5.5rem;
  width: 100%;
  z-index: 1;
  border-bottom: 1px solid #9d9fa4;
  height: calc(100vh - 4rem);
  background-color: #ffffff
}

.dropdown-menu-item {
  display: flex;
  padding: 2rem 2rem 2rem 2rem;
  border-bottom: 1px solid #9d9fa4;
  color: #5c8ecb;
  text-decoration: none;
  font-weight: 600;
}

.dropdown-menu-item:last-of-type {
  border: none;
}

#close-icon {
  display: none;
}