/* nav */
nav {
  position: fixed;
  /* top: 0; */
  bottom: 0;
  width: 100%;
  /* height: 100vh; */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-top: 3.25rem;
  z-index: 10;
}
nav .top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background-color: rgba(3, 92, 213, 1);
  padding: 10px 20px;
  cursor: pointer;
  transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s;
  transition-delay: 0.25s;
  width: 100%;
  max-width: 120px; /* starting size */
}
nav .top.active {
  transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s;
  /* transition-delay: 0.5s; */
  max-width: 100%; /* final size */
  padding: 10px 14px; /* adjust padding smoothly */
}
nav .top .title {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  color: white;
  font-size: 1rem;
  padding-right: 1rem;
  padding-bottom: 1px;
}
nav .top .title span {
  font-weight: 500;
}
nav .top .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1rem;
}
/* nav content */
nav .content {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgba(247, 247, 247, 1);
  max-height: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}
nav .content.active {
  max-height: 200px;
  padding: 4px 12px;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.1s cubic-bezier(0.4, 0, 0.2, 1) 0s;
  transition-delay: 0.25s;
  overflow-y: scroll;
}
nav .content .country,
nav .content .domain {
  display: flex;
  flex-direction: column;
  margin: 1rem 0;
}
nav .content .country .title,
nav .content .domain .title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: black;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
nav .content .country .title span,
nav .content .domain .title span {
  font-weight: 500;
}
nav .content .country ul,
nav .content .domain ul {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  pointer-events: auto;
  flex-wrap: wrap;
}
nav .content .country ul li,
nav .content .domain ul li {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}
nav .content .country ul li button,
nav .content .domain ul li button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  color: black;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
nav .content .country ul li button.active span,
nav .content .domain ul li button.active span {
  color: white;
}
/* nav .content .country ul li button:hover,
nav .content .domain ul li button:hover,
nav .content .country ul li button:hover span,
nav .content .domain ul li button:hover span {
  background-color: rgba(255, 255, 255, 0.75);
  color: rgba(128, 128, 128, 1);
} */
nav .content .country ul li button.active:hover,
nav .content .domain ul li button.active:hover,
nav .content .country ul li button.active:hover span,
nav .content .domain ul li button.active:hover span {
  background-color: rgba(3, 92, 213, 1);
  color: white;
}

nav .content .country ul li button.active,
nav .content .domain ul li button.active {
  background-color: rgba(3, 92, 213, 1);
  color: white;
}
nav .content .country ul li button img,
nav .content .domain ul li button img {
  width: 20px;
  max-width: 20px;
  height: auto;
  margin-right: 0.5rem;
}
/* when button is active, invert color */
nav .content .domain ul li button.active img {
  -webkit-filter: invert(1);
  filter: invert(1);
}
nav .content .country ul li button span,
nav .content .domain ul li button span {
  font-size: 12px;
  color: black;
}

/* home */
.home {
  flex: 1;
  padding-bottom: 40px;
}
.home-title {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.home-title img {
  height: auto;
  width: 100%;
  min-height: 32px;
}

/* fade Overlay */
.fade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  pointer-events: none;
  transition: background-color 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.fade-overlay.active {
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
  background-color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  transition: background-color 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 1.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media screen and (min-width: 768px) {
  .fade-overlay {
    display: none;
  }
}

/* minigame */
.game-text-desktop {
  align-items: center;
  display: flex;
  flex-direction: column;
}
.minigame {
  max-width: 425px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* padding: 0 1rem; */
  margin: auto 1rem 0;
  border-bottom: 2px solid black;
}
.minigame * {
  font-weight: 500;
}
.window {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0);
  border-radius: 5px;
  width: 100%;
  height: 200px;
}
.window canvas {
  width: 100%;
  height: 100%;
}
/* overlay */
.interface {
  position: absolute;
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.75rem 1.5rem;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.interface.active {
  pointer-events: auto;
}
.score {
  width: 100%;
  height: fit-content;
}
.score span {
  font-size: 16px;
  text-decoration: none;
  color: black;
}
.main-text {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  margin-bottom: auto;
  color: black;
  display: none;
}
.main-text.active {
  display: flex;
}
.main-text h1 {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.main-text h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: black;
  text-decoration: none;
}
.reset-button {
  width: 20px;
  max-width: 20px;
  height: auto;
  display: none;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}
.interface.active .reset-button {
  display: flex;
}
.reset-button img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* paragraph */
.paragraph {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.paragraph p {
  font-weight: 500;
  font-size: 20px;
  font-weight: 500;
  text-align: left;
  line-height: 26px;
}
.paragraph .bt {
  font-weight: 500;
  color: white;
  background-color: rgba(3, 92, 213, 1);
  padding: 0 2px;
}

/* donate list */
.masonry {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  padding-top: 0;
}
.donate-list {
  width: 50%;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}
.donate-list:nth-child(odd) {
  margin-right: 1rem;
}
.donate-list li {
  height: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgba(231, 231, 231, 1);
  border-radius: 0;
  height: fit-content;
  padding: 0.5rem 0.35rem;
  text-decoration: none;
  color: black;
}
.card .tags {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 100%;
  margin-bottom: 1rem;
}
.card .tags .flags,
.card .tags .others {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
.card .tags .tag {
  max-width: fit-content;
  max-height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 1);
  padding: 0.24rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}
.card .tags .tag img {
  width: 20px;
  max-width: 20px;
  height: auto;
  max-height: 20px;
  margin-right: 4px;
}
.card .tags .tag span {
  font-size: 12px;
}
.card .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.card .content h1 {
  font-size: 21px;
  font-weight: 500;
  line-height: 25.64px;
  margin-bottom: 0.25rem;
}
/* small screen width */
@media screen and (max-width: 350px) {
  .card .content h1 {
    font-size: 19px;
    line-height: 21.5px;
  }
}
.card .content span {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  font-size: 14px;
  text-decoration: underline;
  margin-bottom: 1.5rem;
  word-break: break-word;
}
.card .content span div {
  padding-left: 5px;
  opacity: 0;
}
.card:hover .content span div {
  opacity: 1;
}
.card:hover .content span div svg path {
  fill: rgba(3, 92, 213, 1);
}
.card:hover .content span {
  color: rgba(3, 92, 213, 1);
}
.card .content p {
  font-size: 14px;
}

/* submit org button */
.submit-button-container {
  padding: 0 1rem 1rem;
  width: 100%;
}

.submit-org-button {
  align-items: center;
  background-color: #e7e7e7;
  border: none;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  gap: 20px;
  justify-content: center;
  padding: 0.8rem 0.4rem;
  width: 100%;
}

.submit-org-button img {
  height: 18px;
  width: 18px;
}

.submit-org-button span {
  font-weight: 400;
}

.submit-org-button:hover {
  background-color: #eee;
}

/* submit org modal */
.form-group {
  margin-bottom: 20px;
}

.form-group input {
  border: 2px solid #e7e7e7;
  font-family: inherit;
  font-size: 16px;
  padding: 12px;
  width: 100%;
}

.form-group input:focus-visible {
  border-color: #000;
  outline: none;
}

.form-group label {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.modal {
  max-height: 90vh;
  max-width: 500px;
  opacity: 0;
  overflow-y: auto;
  transition-delay: 0s;
  transition-duration: 0.75s;
  transition-property: background-color, opacity, visibility, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  width: 90%;
}

.modal-close {
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  opacity: 0;
  position: absolute;
  top: 1rem;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  right: 1rem;
}

.modal-overlay.active .modal-close {
  opacity: 1;
  transition-delay: 0.35s;
}

.modal-close svg {
  height: 36px;
  width: 36px;
}

.modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 36px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 500;
}

.modal-overlay {
  -webkit-backdrop-filter: blur(0);
  align-items: center;
  backdrop-filter: blur(0);
  background-color: rgba(255, 255, 255, 0);
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  opacity: 0;
  position: fixed;
  top: 0;
  transition-delay: 0.375s;
  transition-duration: 0.75s;
  transition-property: background-color, opacity, visibility, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  width: 100%;
  z-index: 1000;
}

.modal-overlay.active {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}

.modal-overlay.active .modal {
  opacity: 1;
  transition-delay: 0.375s;
  visibility: visible;
}

.submit-button {
  background-color: #035cd5;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 1rem 0.5rem;
  transition: background-color 0.2s ease;
  width: 100%;
}

.submit-button[disabled] {
  background-color: #e7e7e7;
  pointer-events: none;
}

/* desktop */
.desktop-filters {
  display: none;
}
@media screen and (min-width: 768px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  main {
    height: 100dvh;
  }

  nav {
    display: none;
  }
  .home {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    /* align-items: center; */
    padding: 0;
  }
  .left {
    /* height: 100%; */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 50%;
    max-width: 400px;
  }
  .right {
    flex: 1;
    /* height: 100%; */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* align-items: flex-start; */
  }
  .right .masonry {
    height: 100%;
    max-height: 100dvh;
    /* max-width: 1200px; */
    overflow-y: scroll;
    padding: 0;
    padding-left: 0;
    padding-right: 1rem;
    padding-top: 1rem;
  }
  /* .right .masonry .donate-list li .card .content {
    margin-bottom: 1rem;
  } */

  .game-text-desktop {
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
  }
  .minigame .interface {
    width: 400px;
  }

  .desktop-filters {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
  }
  .desktop-filters .content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(247, 247, 247, 1);
    max-height: 0;
    padding: 0;
  }

  .desktop-filters .country,
  .desktop-filters .domain {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
    margin-bottom: 0.5rem;
  }

  .desktop-filters .country .title,
  .desktop-filters .domain .title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: black;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .desktop-filters .country .title span,
  .desktop-filters .domain .title span {
    font-weight: 500;
    font-size: 16px;
  }

  .desktop-filters .country ul,
  .desktop-filters .domain ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    pointer-events: auto;
    flex-wrap: wrap;
  }

  .desktop-filters .country ul li,
  .desktop-filters .domain ul li {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .desktop-filters .country ul li button,
  .desktop-filters .domain ul li button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: 0;
    padding: 0.45rem;
    cursor: pointer;
  }
  .desktop-filters .country ul li button.active,
  .desktop-filters .domain ul li button.active {
    background-color: rgba(3, 92, 213, 1);
    color: white;
  }
  .desktop-filters .country ul li button img,
  .desktop-filters .domain ul li button img {
    width: 20px;
    max-width: 20px;
    height: auto;
    margin-right: 0.5rem;
  }
  /* when button is active, invert color */
  .desktop-filters .domain ul li button.active img {
    -webkit-filter: invert(1);
    filter: invert(1);
  }
  .desktop-filters .country ul li button span,
  .desktop-filters .domain ul li button span {
    font-size: 0.85rem;
  }
  .desktop-filters .country ul li button.active span,
  .desktop-filters .domain ul li button.active span {
    color: white;
  }
  .desktop-filters .country ul li button:hover,
  .desktop-filters .domain ul li button:hover,
  .desktop-filters .country ul li button:hover span,
  .desktop-filters .domain ul li button:hover span {
    background-color: rgba(255, 255, 255, 0.75);
    color: rgba(128, 128, 128, 1);
  }
  .desktop-filters .country ul li button.active:hover,
  .desktop-filters .domain ul li button.active:hover,
  .desktop-filters .country ul li button.active:hover span,
  .desktop-filters .domain ul li button.active:hover span {
    background-color: rgba(3, 92, 213, 1);
    color: white;
  }

  .paragraph {
    padding-top: 0;
  }
}

/* mobile */
@media (max-width: 767px) {
  .submit-button-container {
    order: 3;
  }
}