@import url("https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@2.0/nanumsquare.css");
@import url("https://fonts.googleapis.com/css2?family=Lobster&family=Nanum+Gothic:wght@400;700;800&display=swap");

*,
html,
*:after,
*:before {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

* {
  font-size: 14px;
}

body {
  /* width: 520px; */
  max-width: 520px;
  width: 100%;
  height: auto;
  -webkit-text-size-adjust: none;
  line-height: normal;
  padding: 0;
  margin: 0 auto;
  background-color: var(--colour-lightblack);
  color: var(--colour-white);
  font-family: "NanumSquare", "Nanum Gothic", sans-serif;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
p,
img {
  margin: 0;
  padding: 0;
}
img {
  border: 0;
  outline: 0;
}
a {
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
a/*, a:active, a:focus, a:visited*/ {
  -webkit-tab-highlight-color: rgba(0, 0, 0, 0.1);
  color: var(--colour-black);
}

:root {
  --colour-lightblack: #1a1919;
  --colour-black: #000;
  --colour-white: #fff;
  --colour-lightgrey: #f8f9fc;
  --colour-grey: #7a7d84;
  --colour-darkgrey: #272729;
  --colour-orange: #ff623a;
  --colour-blue: #4385f6;
  --colour-red: #f95454;
  --colour-green: #54f975;
  --colour-yellow: #f6c043;
  --colour-violet: #6d30f7;

  --xxxxsmall: 14px;
  /* --xxxxsmall: 16px; */
  --xxxsmall: 16px;
  /* --xxxsmall: 20px; */
  --xxsmall: 18px;
  /* --xxsmall: 23px; */
  --xsmall: 20px;
  /* --xsmall: 25px; */
  --small: 30px;
  --medium: 34px;
  --large: 38px;
  --xlarge: 46px;
}

.skelloadpartial {
  *[skel] {
    animation: backFade 2s infinite;
  }
  /* *[skel] {
    animation: backFade 0.4s 1;
  } */
  *[skel1s] {
    animation: backFade 1s 1;
  }
}
@keyframes backFade {
  0% {
    background: linear-gradient(120deg, #e5e5e5 30%, #f0f0f0 38%, #f0f0f0 40%, #e5e5e5 48%);
    border-radius: 55px;
    background-size: 200% 100%;
    background-position: 100% 0;
    color: transparent;
  }
  50% {
  }
  100% {
    background: var(--colour-lightgrey);
    color: var(--colour-lightgrey);
  }
}

.wrap {
  /* width: 520px; */
  max-width: 520px;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

header {
  /* width: 520px; */
  width: 100%;
  max-width: 520px;
  height: 70px;
  background-color: var(--colour-lightblack);
  & .headerwrap,
  .pageheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* width: 520px; */
    width: 100%;
    max-width: 520px;
    height: 70px;
    margin: 0 auto;
    position: fixed;
    top: 0;
    z-index: 1;
    background-color: var(--colour-lightblack);
    padding: 0 20px;
    & h1 {
      font-size: var(--xxsmall);
      & img {
        width: 100px;
        height: auto;
        font-size: var(--xxxxsmall);
        font-weight: 700;
        letter-spacing: 0.05em;
      }
    }
    & span :is(img) {
      display: inline-block;
      width: 20px;
      /* width: 30px; */
      height: 30px;
      /* margin-left: 30px; */
      margin-left: 20px;
    }
    &.pageheader2 {
      gap: 30px;
      justify-content: flex-start;
      & .goback :is(img) {
        width: 30px;
        height: 30px;
        margin: 6px 0 0 0;
      }
      & .chatlist :is(img) {
        width: 40px;
        height: 40px;
        margin-left: 0;
      }
      & .newchat :is(img) {
        width: 40px;
        height: 40px;
        margin-left: 20px;
      }
      & .sidebar :is(img) {
        width: 40px;
        height: 40px;
        margin-left: 0;
      }
      & h1 {
        width: 510px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        & .member {
          font-size: var(--xxsmall);
          color: rgba(255, 255, 255, 0.5);
          margin-left: 15px;
          & img {
            width: 28px;
            height: 28px;
            opacity: 0.5;
            vertical-align: sub;
            margin: 0 3px 0 0;
          }
        }
      }
    }
  }
}

/* nav {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: var(--colour-white);
  position: fixed;
  bottom: 0;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  height: 70px;
  & div {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 70px;
    & button {
      font-family: "NanumSquare", "Nanum Gothic", sans-serif;
      width: 100%;
      text-align: center;
      font-size: var(--xxxxsmall);
      font-weight: 600;
      color: var(--colour-grey);

      background-color: transparent;
      border: none;
      cursor: pointer;
      &.active {
        color: var(--colour-black);
      }
    }
  }
} */

nav {
  position: fixed;
  bottom: 20px;
  /* left: 20px; */
  z-index: 1;
  /* width: 480px; */
  max-width: 520px;
  width: 100%;
  height: 68px;
  padding: 0 20px;
  & div {
    padding: 0 10px;
    border-radius: 60px;
    background-color: var(--colour-lightblack);
    display: flex;
    align-items: center;
    /* width: 445px; */
    width: 100%;
    /* height: 80px; */
    height: 100%;
    /* margin: 0 auto; */
    & button {
      font-family: "NanumSquare", "Nanum Gothic", sans-serif;
      background-color: transparent;
      border: none;
      font-size: var(--xxxxsmall);
      font-weight: 600;
      color: var(--colour-grey);
      width: 20%;
      height: 40px;
      padding: 10px 0;
      text-align: center;
      &.active {
        color: var(--colour-lightblack);
        background-color: var(--colour-lightgrey);
        border-radius: 30px;
      }
      &:first-child:not(.active) {
        color: var(--colour-white);
     }
     &.active img {
  filter: brightness(0) saturate(100%);
}
      & img {
        width: 18px;
        height: 18px;
        vertical-align: middle;
        margin: -2px 5px 0 0;
      }
    }
  }
}

page {
  display: block; /*margin-top:120px;*/
}

& .sectiontitle {
  /* width: 460px; */
  margin: 0 auto 40px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  & h2 {
    /* font-size: var(--xxsmall); */
    font-size: 18px;
    font-weight: 700;
    color: var(--colour-black);
  }
  & span {
    display: none;
    width: 50px;
    text-align: right;
    & img {
      width: 25px;
      height: 25px;
    }
  }
}

.mainpicks,
.account,
.portfolio,
.ai {
  margin: 20px auto 0 auto;
  & .details {
    min-height: 1100px;
    padding: 60px 20px 160px 20px;
    background-color: var(--colour-white);
    color: var(--colour-black);
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    & .sectiontitle & span {
      display: none;
    }
    & .sortby {
      /* width: 460px; */
      margin: 0 auto 20px auto;
      display: flex;
      align-items: center;
      gap: 7px;
      & span {
        & img {
          width: 20px;
          height: auto;
          margin-right: 5px;
        }
        &.btn_sort {
          border: 1px solid red;
          display: block;
          font-size: var(--xxxxsmall);
          background-color: var(--colour-lightgrey);
          border: 1px solid #c0c6db;
          border-radius: 8px;
          padding: 7px 13px;
          color: #7885ac;
          font-weight: 700;
          vertical-align: middle;
        }
      }
    }
    & .list {
      background-color: var(--colour-white);
      color: var(--colour-black);
      margin-bottom: 70px;
      &::-webkit-scrollbar {
        display: none;
      }
      & .table {
        /* width: 460px; */
        margin: 0 auto 50px auto;
        & .standard {
          width: 100%;
          font-size: var(--xxxsmall);
          font-weight: 700;
          text-align: center;
          background-color: var(--colour-orange);
          color: var(--colour-white);
          margin-bottom: 22px;
          padding: 13px 0;
          border-radius: 20px;
        }
        & .thead {
          display: flex;
          align-items: center;
          font-size: var(--xxxsmall);
          font-weight: 700;
          text-align: center;
          margin-bottom: 22px;
          & :nth-of-type(1) {
            width: 140px;
          }
          & :nth-of-type(2) {
            width: 115px;
          }
          & :nth-of-type(3) {
            width: 115px;
          }
          & :nth-of-type(4) {
            width: 90px;
          }
        }
        & .box {
          display: flex;
          align-items: center;
          height: 90px;
          font-size: var(--xxxxsmall);
          font-weight: 700;
          text-align: center;
          border-radius: 25px;
          box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 3px;
          border: 1px solid var(--colour-lightgrey);
          margin-bottom: 15px;
          background-color: var(--colour-lightgrey);
          & :nth-of-type(1) {
            width: 140px;
          }
          & :nth-of-type(2) {
            width: 115px;
          }
          & :nth-of-type(3) {
            width: 115px;
          }
          & :nth-of-type(4) {
            width: 90px;
          }
          & .rate {
            color: var(--colour-red);
            font-weight: 700;
          }
        }
      }
    }
  }
  & .commentarea {
    & > h2 {
      font-size: var(--xxsmall);
      font-weight: 700;
      /* color: var(--colour-black); */
      margin-bottom: 30px;
    }
    & article {
      &[skel] {
        min-height: 200px;
      }
      background-color: var(--colour-darkgrey);
      color: var(--colour-white);

      & .title {
        color: var(--colour-yellow);
      }
    }
  }
}

& .commentarea {
  /* width: 460px; */
  margin: 0 auto 50px auto;
  & article {
    padding: 35px;
    border-radius: 35px;
    background-color: var(--colour-darkgrey);
    margin-bottom: 20px;
    color: var(--colour-white);
    & .title {
      font-size: var(--xxxsmall);
      font-weight: 700;
      display: block;
      margin-bottom: 20px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      color: var(--colour-yellow);
    }
    & .description {
      font-size: var(--xxxxsmall);
      line-height: 1.4em; /*overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; word-wrap:break-word; line-height:1.4em; height:2.8em;*/
    }
  }
}

.analysis {
  margin: 40px auto 0 auto;
  & .sectiontitle {
    padding: 0 20px;
    & h2 {
      color: var(--colour-white);
    }
  }
  & .list {
    min-height: 500px;
    padding: 60px 20px 140px 20px;
    background-color: var(--colour-white);
    color: var(--colour-black);
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    & .table {
      /* width: 460px; */
      margin: 0 auto 40px auto;
      & .thead {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        font-size: var(--xxxxsmall);
        font-weight: 800;
        text-align: center;
        margin-bottom: 22px;

        & > div {
          font-size: 12px;
        }

        & span {
          display: block;
          margin-top: 7px;
          font-size: 12px;
        }
      }
      & .box {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        height: 70px;
        font-size: var(--xxxxsmall);
        font-weight: 700;
        text-align: center;
        border-radius: 25px;
        box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
        border: 1px solid var(--colour-lightgrey);
        margin-bottom: 20px;
        background-color: var(--colour-lightgrey);
        /* & :nth-of-type(1) {
          width: 100px;
        }
        & :nth-of-type(2) {
          width: 90px;
        }
        & :nth-of-type(3) {
          width: 90px;
        }
        & :nth-of-type(4) {
          width: 90px;
        }
        & :nth-of-type(5) {
          width: 90px;
        } */
      }
    }
    & .helpblock {
      /* width: 460px; */
      margin: 0 auto 50px auto;
      & ul {
        & li {
          display: flex;
          align-items: center;
          gap: 10px;
          font-size: 14px;
          font-weight: 600;
          margin-bottom: 5px;
          color: var(--colour-darkgrey);
          & label {
            display: block;
            min-width: 100px;
            text-align: center;
            height: 34px;
            line-height: 34px;
            color: var(--colour-white);
            background-color: var(--colour-violet);
            border-radius: 10px;
          }
          & div {
            word-break: keep-all;
          }
        }
      }
    }
  }

  & #totalComment {
    padding: 0 20px;
    & .description[skel] {
      min-height: 135px;
    }
  }
}

.loader {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: relative;
  animation: rotate 1s linear infinite;
}
.loader::before,
.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.7);
  animation: prixClipFix 2s linear infinite;
}
.loader::after {
  inset: 8px;
  transform: rotate3d(90, 90, 0, 180deg);
  border-color: var(--colour-orange);
}
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes prixClipFix {
  0% {
    clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
  }
  75%,
  100% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
  }
}

.graph {
  /* width: 460px; */
  margin: 0 auto 50px auto;
  overflow: hidden;
  & .svg_item {
    width: 70%;
    margin: 0 auto;
    animation: donutfade 1s;
    & .donut_ring {
      stroke: var(--colour-darkgrey);
    }
    & .donut_segment2 {
      stroke: var(--colour-red);
      animation: donut1 3s;
      stroke-linecap: round;
    }
    & .donut_text1 {
      fill: var(--colour-red);
    }
    & .donut_percent {
      animation: donutfadelong 1s;
      font-size: 0.4em;
      transform: translateY(0.5em);
      font-weight: 700;
    }
  }
}
@keyframes donutfadelong {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes donut1 {
  0% {
    stroke-dasharray: 0, 100;
  }
  100% {
    /* stroke-dasharray: 69, 31; */
  }
}
@keyframes donutfade {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

/*
& .tcontainer {
    width:460px; margin:0 auto; display:grid; grid-template-rows:repeat(4, 60px); grid-template-columns:repeat(2, 1fr); grid-column-gap:2px; border-radius:25px; grid-row-gap:2px; box-shadow:rgba(0, 0, 0, 0.16) 0px 1px 3px;
    & .item {
        box-sizing:border-box; padding:20px; background-color:var(--colour-lightgrey); font-weight:600;
        &.item:nth-child(1) {grid-column:1 / 3; text-align:center; background-color:var(--colour-darkgrey); color:var(--colour-white); font-weight:400; font-size:var(--xxxsmall); border-top-left-radius:25px; border-top-right-radius:25px;}
        &.item:nth-child(6) {grid-column:1 / 3; text-align:center; border-bottom-left-radius:25px; border-bottom-right-radius:25px; padding-bottom:30px;}
        & label {display:inline-block; width:90px; font-weight:400;}
        & .value {
            &.up {color:var(--colour-red);}
            &.down {color:var(--colour-blue);}
        }
        &.opi {
            & span {
                display:inline-block; margin-left:10px; color:var(--colour-white); font-size:var(--xxxxsmall); border-radius:15px; padding:3px;
                &.hold {background-color:var(--colour-grey); width:60px;}
                &.sl {background-color:var(--colour-violet); width:60px;}
                &.tp {background-color:var(--colour-orange); width:60px;}
            }
        }
    }
}
*/

.tcontainer {
  /* width: 460px; */
  margin: 0 auto 40px auto;
  display: grid;
  grid-template-rows: repeat(4, 60px);
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: 2px;
  border-radius: 25px;
  grid-row-gap: 2px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 3px;
  & .item {
    box-sizing: border-box;
    padding: 20px;
    background-color: var(--colour-lightgrey);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0 16px;
    &.item:nth-child(1) {
      grid-column: 1 / 3;
      text-align: center;
      background-color: var(--colour-darkgrey);
      color: var(--colour-white);
      font-weight: 400;
      font-size: var(--xxxsmall);
      border-top-left-radius: 25px;
      border-top-right-radius: 25px;
    }
    & label {
      display: inline-block;
      /* width: 90px; */
      font-weight: 400;
      word-break: keep-all;
      text-align: center;
    }
    & .value {
      &.up {
        color: var(--colour-red);
      }
      &.down {
        color: var(--colour-blue);
      }
    }
    &.opi {
      & span {
        display: inline-block;
        color: var(--colour-white);
        font-size: var(--xxxxsmall);
        border-radius: 15px;
        padding: 3px;
        text-align: center;
        font-weight: 400;
        &.hold {
          background-color: var(--colour-grey);
          width: 54px;
        }
        &.sl {
          background-color: var(--colour-violet);
          width: 54px;
        }
        &.tp {
          background-color: var(--colour-orange);
          width: 54px;
        }
      }
    }
    & .yn {
      display: inline-block;
      border-radius: 8px;
      background-color: var(--colour-grey);
      padding: 2px 7px;
      color: var(--colour-white);
      &.blue {
        background-color: var(--colour-blue);
      }
      &.orange {
        background-color: var(--colour-orange);
      }
    }
  }
}

.account {
  & .details {
    & .list {
      & .tcontainer {
        grid-template-rows: repeat(4, 60px);
        grid-template-columns: repeat(2, 1fr);
        & .item {
          &.item:nth-child(6) {
            grid-column: 1 / 3;
            text-align: center;
            border-bottom-left-radius: 25px;
            border-bottom-right-radius: 25px;
          }
        }
      }
    }

    & .commentarea {
      & .description {
        /* white-space: pre-line; */
        &[skel] {
          min-height: 135px;
        }
      }
    }
  }
}

.portfolio {
  & .details {
    & .list {
      & .tcontainer {
        grid-template-rows: repeat(4, 60px);
        grid-template-columns: repeat(2, 1fr);
        & .item {
          &.item:nth-child(6) {
            grid-column: 1 / 2;
            /* text-align: left; */
            border-bottom-left-radius: 25px;
            border-bottom-right-radius: 0;
          }
          &.item:nth-child(7) {
            border-bottom-right-radius: 25px;
          }
        }
      }
    }
    & .commentarea {
      display: flex;
      flex-direction: column;

      &[data-show="step1"] {
        & .card_portfolio {
          &:last-child {
            order: -1;
          }
        }
      }

      &[data-show="step2"] {
        & .card_portfolio {
          &:first-child {
            order: 1;
          }
        }
      }

      & article {
        /* & .title {
          &:has(.loader) {
            display: flex;
            align-items: center;
            justify-content: center;
          }

          & .loader {
            width: 30px;
            height: 30px;
          }
        } */

        & .description:has(.port-load-ment) {
          white-space: normal;
        }
        & .port-load-ment {
          display: block;
          text-align: center;
          line-height: 24px;
        }
      }

      & .card_portfolio {
        & .title {
          &[skel] {
            min-height: 24px;
          }
        }
        & .description {
          /* white-space: pre-line; */
          /* word-break: keep-all; */

          &[skel] {
            min-height: 135px;
          }
        }
      }
    }
  }
}

.ai {
  & .details {
    & .list {
      & .tcontainer {
        grid-template-rows: repeat(4, 60px);
        grid-template-columns: repeat(2, 1fr);
        border-radius: 25px;
        overflow: hidden;
        /* & .item {
          &.item:nth-child(2) {
            text-align: center;
          }
          &.item:nth-child(7) {
            text-align: center;
            border-bottom-left-radius: 25px;
            border-bottom-right-radius: 25px;
          }
        } */
      }
    }
    & .commentarea {
      & article {
        & .description {
          min-height: 135px;
        }
      }
    }
  }
}

/* .mainpicks {
  & .commentarea {
    & article {
      & .description {
        white-space: pre-line;
      }
    }
  }
} */

.markdown-box {
  white-space: pre-line;

  & h1 {
    font-size: 20px;
    font-weight: 900;
    line-height: 28px;
  }
  & h2 {
    font-size: 18px;
    font-weight: 900;
    line-height: 28px;
  }
  & h3 {
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
  }
  & h4 {
    font-size: 14px;
  }

  & ul {
    list-style: disc;
    padding-left: 16px;
    /* display: flex;
    flex-direction: column;
    gap: 16px; */
  }

  & ol {
    list-style: auto;
    padding-left: 16px;
    /* display: flex;
    flex-direction: column;
    gap: 16px; */
  }

  & table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    & th,
    td {
      border: 1px solid var(--colour-grey);
      padding: 4px 6px;
    }
  }
}

.hide {
  display: none;
}

@media (max-width: 420px) {
  & .commentarea {
    & article {
      padding: 36px 28px;
    }
  }

  & .tcontainer {
    & .item {
      padding: 14px;
    }

    & .item {
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      text-align: center;
      gap: 6px;

      &.item:nth-child(1) {
        font-size: 16px;
        justify-content: center;
      }

      & label {
        /* width: 68px; */
      }
    }
  }

  & .aitable {
    & .item {
      &:nth-child(2) {
        justify-content: center;
      }
      &:last-child {
        justify-content: center;
      }
    }
  }

  & .accounttable {
    & .item {
      &.opi {
        justify-content: center;
      }
    }
  }

  & .markdown-box {
    & h1 {
      font-size: 18px;
      font-weight: 900;
      line-height: 28px;
    }
    & h2 {
      font-size: 16px;
      font-weight: 900;
      line-height: 28px;
    }
    & h3 {
      font-size: 14px;
      font-weight: 800;
      line-height: 24px;
    }
    & h4 {
      font-size: 12px;
    }

    & ul {
      padding-left: 14px;
    }

    & ol {
      padding-left: 14px;
    }

    & table {
      & th,
      td {
        padding: 4px 6px;
      }
    }
  }

  .analysis {
    & .list {
      & .helpblock {
        & ul {
          & li {
            margin-bottom: 20px;
          }
        }
      }
    }
  }
}

.spinner {
  position: fixed;
  max-width: 520px;
  width: 100%;
  height: 100vh;
  background-color: #000000b3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  padding: 20px;

  & .load-ment {
    text-align: center;
    line-height: 24px;
  }
}
