* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue,
    Fira Sans, Ubuntu, Oxygen, Oxygen Sans, Cantarell, Droid Sans,
    Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Lucida Grande, Helvetica,
    Arial, sans-serif;
  background-color: #000000;
  color: #ddd;
  margin: 0;
  padding: 0;
}

#nav {
  position: relative;
  display: flex;
  background-color: #1b1f23;
  width: 100%;
  height: 50px;
  align-items: center;
  border-bottom: 1px solid #333;
  padding: 0 15px;
  z-index: 99;
}

#nav .logo {
  font-size: 24px;
  color: #ddd;
  font-weight: 600;
}

#nav #version {
  font-style: italic;
  margin-top: 8px;
  margin-inline: 5px;
  color: #da7333;
}

.profile-container {
  width: 50%;
  margin: 20px auto;
  background-color: #1b1f23;
  border: 1px solid #222;
  color: #e9e9e9;
  border-radius: 8px;
  overflow: hidden;
  z-index: 1;
}

.header {
  position: relative;
  height: 200px;
}

.cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-picture {
  position: absolute;
  bottom: -48px;
  left: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #1b1f23;
}

.profile-info {
  text-align: left;
  padding: 60px 20px 20px;
  position: relative;

  & h1 {
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
  }

  & aside {
    position: absolute;
    top: 20px;
    right: 20px;

    & svg {
      width: 24px;
      height: 24px;
      fill: #f8c77e;
      cursor: pointer;
    }
  }

  & .left-panel-item {
    margin: 10px 0;
    display: inline-flex;

    & img {
      width: 45px;
      height: 45px;
      border-radius: 100%;
    }

    & p {
      margin-left: 10px;
      font-size: 13px;
      font-weight: 500;
      transform: translateY(-1px);
    }
  }
}

.profile-info .verified {
  margin-top: 3px;
  margin-left: 6px;
  width: 22px;
  height: 22px;
}

.verified path {
  stroke: #0073b1;
  stroke-width: 1px;
}

.profile-info .title {
  color: #666;
  margin: 10px 0;
  display: flex;

  & span {
    font-size: 12px;
  }
}

.profile-info .geo-location {
  color: #666;
  width: 12px;
  height: 12px;
  transform: translateY(1px);
}

.contact-btn {
  background-color: #0073b1;
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: default;
}

.contact-btn:hover {
  opacity: 0.9;
  outline: 1px solid #0073b1;
  outline-offset: 2px;
  transition: 0.1s ease-in-out;
}

.contact-btn i {
  margin-right: 8px;
}

.additional-info {
  position: relative;
  display: flex;
  justify-content: space-around;
  padding: 20px;
  border-top: 1px solid #ddd;

  & button {
    background-color: #e6f0f3;
    color: #0073b1;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;

    & svg {
      margin-right: 5px;
    }
  }

  .more-btn-container {
    display: none;
    position: absolute;
    right: 23px;
    bottom: 77px;
    padding: 10px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 8px;

    & ul {
      margin: 0;
      padding: 0;

      & li {
        list-style: none;
        margin: 10px 0;
        padding: 0;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;

        &:hover {
          color: #0073b1;
        }

        & svg {
          margin-inline: 5px;
          transform: translateY(3px);
        }
      }
    }

    &::before {
      content: "";
      position: absolute;
      bottom: -10px;
      right: 45px;
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-top: 10px solid #eee;
      filter: drop-shadow(0 0.5px #ccc);
    }
  }
}

#email {
  color: #666;
  text-decoration: none;
  color: #0073b1;

  &:hover {
    text-decoration: underline;
  }
}

.additional-info > button:hover {
  outline: 1px solid #72b9df;
  transition: 0.3s all;
}

.additional-info i {
  margin-right: 8px;
}

footer {
  margin-top: 30px;
  width: 50%;
  margin: 20px auto;
  color: #e9e9e9;
  border-radius: 8px;
  cursor: default;

  &:hover {
    color: #da7333;
  }
}

copy {
  cursor: pointer;

  & svg {
    transform: translateY(2px);

    &:hover {
      fill: tomato;
    }
  }
}

.fetch-form {
  overflow: hidden;
  text-align: center;
  width: 52%;
  justify-content: center;
  margin: 0 auto;

  & .notice {
    width: fit-content;
    margin: 0 15px;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 12px;
    padding: 10px;
    background-color: #1b1f23;

    & span {
      color: #0073b1;
    }
  }

  & form {
    width: 50%;
    display: grid;
    margin: 20px auto;
    justify-content: center;
    gap: 10px;

    & input {
      display: grid;
      justify-content: center;
      margin: 5px auto;
      width: 100%;
      border: 1px solid #ddd;
      outline: none;
      padding: 10px;
      border-radius: 8px;
      box-sizing: border-box;
    }

    & button {
      width: fit-content;
      margin: 0 auto;
    }
  }
}

.pre {
  position: relative;
  display: flex;
  width: 70%;
  justify-content: center;
  margin: 50px auto;
  overflow: hidden;
  text-wrap: balance;

  & small {
    width: 1em;
    user-select: none;
    opacity: 0.5;
    text-align: right;
    margin-right: 1.3em;
  }

  & span {
    position: absolute;
    top: 10px;
    right: 10px;

    & svg {
      fill: orange;
    }
  }

  & #title-pre {
    position: relative;
    color: #000000;
  }

  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #bec4c6;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }

  &::before {
    content: "";
    position: absolute;
    top: 11px;
    right: 15px;
    width: 18px;
    height: 18px;
    background-color: #fe5f5a;
    border-radius: 50%;
    z-index: 99;
  }

  & .header-pre {
    position: absolute;
    font-size: 14px;
    top: -4px;
    left: 10px;
    z-index: 99;

    & #title-pre {
      font-weight: 400;

      & a {
        color: #000000;
      }
    }
  }

  & #pre {
    width: 100%;
    padding: 50px 15px;
    border-radius: 8px;
    background-color: #1b1f23;
    color: #9999fa;
    overflow: hidden;
    overflow-x: auto;

    &::after {
      content: "";
      position: absolute;
      top: 11px;
      right: 40px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background-color: #ffbc29;
      z-index: 99;
    }

    &::before {
      content: "";
      position: absolute;
      top: 11px;
      right: 65px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background-color: #2fc53d;
      z-index: 99;
    }
  }
}

@media (width <= 760px) {
  main {
    width: 100%;
    padding-top: 55px;
  }
  #nav {
    position: fixed;
    top: 0;
  }
  .profile-container {
    width: 100%;
    border: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 0;
  }
}

@media (width <= 900px) {
  .fetch-form {
    text-wrap: balance;
    width: 90%;

    & .notice {
      width: auto;
      font-size: 11px;
      overflow: hidden;
      overflow-x: auto;
    }
  }

  .pre {
    width: 90%;
    &::before {
      content: "";
      position: absolute;
      top: 11px;
      right: 15px;
      width: 15px;
      height: 15px;
    }

    & .header-pre {
      position: absolute;
      max-width: 250px;
      top: -1px;
      left: 10px;
      z-index: 99;

      & #title-pre {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-weight: 500;
        font-size: 12px;
      }
    }

    & #pre {
      overflow: hidden;
      overflow-x: auto;

      &::after {
        content: "";
        position: absolute;
        top: 11px;
        right: 40px;
        width: 15px;
        height: 15px;
      }

      &::before {
        content: "";
        position: absolute;
        top: 11px;
        right: 65px;
        width: 15px;
        height: 15px;
      }
    }
  }
}
