.content-container {
  --color-gold: rgb(249, 197, 50);
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(var(--width), max-content));
  justify-items: center;
  justify-content: center;

  & .content {
    width: var(--width);
    overflow: hidden;
    position: relative;
    background: var(--streak-background);
    color: var(--color-darkest);
    border-radius: 10px;
    outline: 3px solid transparent;
    display: grid;
    grid-template-rows: 34px 91px 48px;
    cursor: pointer;

    &.complete {
      outline-color: var(--color-gold);
      & .content-header {
        grid-template-columns: auto 1fr auto;
        & .content-cup {
          display: block;
          width: 25px;
          height: 25px;
          fill: gold;
          stroke: goldenrod;
        }
      }
    }

    & .content-header {
      padding: 5px 10px;
      display: grid;
      align-items: center;
      gap: 3px;
      grid-template-columns: 1fr auto;
      overflow: hidden;
      & .content-cup {
        display: none;
      }
      & .content-title {
        font-weight: 500;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        margin: 0;
      }
      & .content-menu-button {
        width: 20px;
        height: 20px;
        fill: var(--color-darkest);
        pointer-events: all;
      }
    }
    & .content-footer {
      padding: 5px 10px;
      display: grid;
      gap: 5px;
      grid-template-columns: 1fr auto;
      align-items: center;
      fill: var(--color-darker);
      &.has-visibility {
        grid-template-columns: 16px 1fr auto;
      }
      & .visibility-icon {
        width: 16px;
        height: 14px;
        display: flex;
        align-items: center;
        & svg {
          width: 100%;
          height: 100%;
        }
      }
      & .visibility-private { fill: var(--color-red, #eb534d); }
      & .visibility-public { fill: var(--color-green, #75d994); }
      & .visibility-group { fill: var(--color-purple, #6d57bb); }
      & .visibility-campaign { fill: var(--color-orange, #eba24d); }
      & .visibility-easyshare { fill: var(--color-blue, #7ac2e8); }
      & .game-type {
        margin: 0;
        font-weight: 400;
        font-size: var(--font-size-xs);
        color: var(--color-darker);
      }
    }
    & .content-main {
      width: 100%;
      height: 100%;
      color: var(--color-darker);
      padding: 5px 10px;
      display: grid;
      gap: 5px;
      overflow: hidden;
      &.with-image {
        grid-template-columns: repeat(2, 1fr);
        & .content-image {
          grid-area: 1/1;
        }
        & .content-main-data {
          grid-area: 1/2;
        }
      }
      &.no-image {
        grid-template-columns: 1fr;
        & .content-image {
          display: none;
        }
      }
      & .content-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
      }
      & .content-main-data {
        display: grid;
        align-content: center;
        justify-items: center;
        overflow: hidden;
        & .content-rating {
          position: relative;
          margin: 2px 0;
          display: flex;
          & .stars {
            display: flex;
            & .star {
              width: var(--star-size);
              height: var(--star-size);
              stroke-width: 1.5;
              stroke: gold;
            }
            &.fill .star {
              fill: gold;
              stroke: goldenrod;
            }
            &.stroke .star {
              fill: var(--color-lighter);
              stroke: var(--color-light);
            }
          }
          & .star-mask {
            display: flex;
            position: absolute;
            top: 0;
            left: 0;
            overflow: hidden;
            width: 0;
            white-space: nowrap;
            height: 100%;
          }
        }
        & .content-creator {
          margin: 0;
          text-align: center;
          font-weight: 450;
          font-size: var(--font-size-small);
          line-height: 1.1;
        }
        & .content-description {
          margin: 0;
          text-align: center;
          font-weight: 300;
          font-size: var(--font-size-xs);
          line-height: 1.1;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }

  & .folder {
    width: var(--width);
    overflow: hidden;
    background: var(--streak-background);
    color: var(--color-darkest);
    border-radius: 10px;
    outline: 3px solid transparent;
    display: grid;
    grid-template-rows: 140px 33px;
    cursor: pointer;

    & .folder-image {
      display: grid;
      place-items: center;
      & svg {
        width: 100%;
        height: 100%;
        fill: var(--color-darker);
      }
    }
    & .folder-name {
      text-align: center;
    }
  }

  & .collection-stack {
    --shadow-size: 4px;
    position: relative;
    width: var(--width);
    z-index: 0;

    & .shadow {
      position: absolute;
      top: var(--shadow-size);
      left: var(--shadow-size);
      width: 100%;
      height: 100%;
      background: var(--color-white);
      border-radius: 10px;
      z-index: 1;
      opacity: 0.5;
      pointer-events: none;
      &.shadow-2 {
        top: calc(2 * var(--shadow-size));
        left: calc(2 * var(--shadow-size));
        z-index: 0;
        opacity: 0.3;
      }
    }
  }

  & .collection {
    width: var(--width);
    overflow: hidden;
    background: var(--streak-background);
    color: var(--color-darkest);
    border-radius: 10px;
    outline: 3px solid transparent;
    display: grid;
    grid-template-rows: 34px 91px 48px;
    cursor: pointer;
    position: relative;
    z-index: 3;

    &.complete {
      outline-color: var(--color-gold);
      & .content-header {
        grid-template-columns: auto 1fr auto;
        & .collection-cup {
          display: block;
          width: 25px;
          height: 25px;
          background-image: url(./images/cup.svg);
        }
      }
    }

    & .collection-header {
      padding: 5px 10px;
      display: grid;
      align-items: center;
      gap: 3px;
      grid-template-columns: 1fr auto;
      overflow: hidden;
      & .collection-cup {
        display: none;
      }
      & .collection-title {
        font-weight: 500;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        margin: 0;
      }
      & .collection-menu-button {
        width: 20px;
        height: 20px;
        fill: var(--color-darkest);
        pointer-events: all;
      }
    }
    & .collection-footer {
      padding: 5px 10px;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      color: var(--color-darker);
      &.has-visibility {
        grid-template-columns: 16px 1fr auto;
      }
      & .visibility-icon {
        width: 16px;
        height: 14px;
        display: flex;
        align-items: center;
        & svg {
          width: 100%;
          height: 100%;
        }
      }
      & .visibility-private { fill: var(--color-red, #eb534d); }
      & .visibility-public { fill: var(--color-green, #75d994); }
      & .visibility-group { fill: var(--color-purple, #6d57bb); }
      & .game-type {
        margin: 0;
        font-weight: 400;
        font-size: var(--font-size-xs);
      }
    }
    & .collection-main {
      width: 100%;
      height: 100%;
      padding: 5px 10px;
      display: grid;
      gap: 5px;
      overflow: hidden;
      &.with-image {
        grid-template-columns: repeat(2, 1fr);
        & .collection-image {
          grid-area: 1/1;
        }
        & .collection-main-data {
          grid-area: 1/2;
        }
      }
      & .collection-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
      }
      & .collection-main-data {
        color: var(--color-darker);
        display: grid;
        align-content: center;
        justify-items: center;
        overflow: hidden;
        & .collection-creator {
          margin: 0;
          text-align: center;
          font-weight: 450;
          font-size: var(--font-size-small);
          line-height: 1.1;
        }
        & .collection-description {
          margin: 0;
          text-align: center;
          font-weight: 300;
          font-size: var(--font-size-xs);
          line-height: 1.1;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }
}

.game-results {
  display: grid;
  gap: 5px;
  grid-auto-flow: column;
  align-items: center;
  height: 100%;
  & .percent-result {
    position: relative;
    display: grid;
    justify-items: center;
    &.crown {
      translate: 0 -2px;
    }
    &:not(.crown) {
      translate: 0 3px;
    }
    & .percent-crown {
      width: 20px;
      height: 20px;
      fill: var(--color-darkest);
      translate: 0 1px;
    }
    & .percent-progress-bar {
      width: 100%;
      height: 6px;
      & .percent-progress-bar-frame {
        width: 33px;
        height: 100%;
        border: 1px solid var(--color-darkest);
        border-radius: 5px;
        overflow: hidden;
        & .percent-progress-bar-fill {
          width: 0%;
          height: 100%;
          background-color: var(--color-darkest);
        }
      }
    }
    & .percent-value {
      margin: 0;
      font-weight: 500;
      text-align: center;
    }
  }
}

.trophy-streak {
  width: 24px;
  height: 24px;
  fill: var(--color-light);
  &.done {
    fill: var(--color-darkest);
  }
}

.content-menu {
  position: absolute;
  z-index: 9999;
  padding: 15px;
  opacity: 0;
  background-color: var(--gradient-green);
  border: 1px solid var(--color-lighter-all);
  border-radius: 10px;
  transition: opacity 0.25s;
  pointer-events: none;

  &.open {
    opacity: 1;
    pointer-events: all;
  }
  & .content-menu-element {
    position: relative;
    padding: 10px;
    margin: 2px 0;
    display: grid;
    gap: 5px;
    align-items: center;
    grid-template-columns: auto 1fr;
    z-index: 1;
    overflow: hidden;
    cursor: pointer;

    & .content-menu-icon {
      width: 20px;
      height: 20px;
      background-repeat: no-repeat;
      background-size: contain;
      background-position: center;
      &.highscores {
        background-image: url("./images/menu_icons/highscores.svg");
      }
      &.edit {
        background-image: url("./images/menu_icons/edit.svg");
      }
      &.copy {
        background-image: url("./images/menu_icons/copy.svg");
      }
      &.statistics {
        background-image: url("./images/menu_icons/statistics.svg");
      }
      &.editors {
        background-image: url("./images/menu_icons/editors.svg");
      }
      &.share {
        background-image: url("./images/menu_icons/share.svg");
      }
      &.export_json {
        background-image: url("./images/menu_icons/export_json.svg");
      }
      &.block {
        background-image: url("./images/menu_icons/block.svg");
      }
      &.delete {
        background-image: url("./images/menu_icons/delete.svg");
      }
    }

    & .content-menu-text {
      white-space: nowrap;
      color: var(--color-white-all);
    }

    &::before {
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      left: -100%;
      top: 0;
      backdrop-filter: brightness(110%);
      transition-duration: 0.25s;
      z-index: -1;
    }
    &:hover {
      &::before {
        left: 0;
      }
    }
  }

  & .separator {
    height: 1px;
    width: 100%;
    background-color: var(--color-mediumgray);
  }
}

.delete-popup {
  & .info {
    font-weight: 300;
    color: var(--color-white-all);
    text-align: center;
  }

  & .buttons {
    display: grid;
    gap: 20px;
    grid-auto-flow: column;
    justify-content: center;
    margin: 20px 0;
  }
}

.editors-popup {
  & .error {
    margin: 10px 0;
    text-align: center;
    font-weight: 300;
    color: var(--color-white-all);
    &:empty {
      display: none;
    }
  }
}
.content-editors {
  display: grid;
  gap: 10px;
}
.content-editor {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 10px;
  border-radius: 5px;
  border: 1px solid var(--color-white-all);
  display: grid;
  gap: 0 10px;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  & .image {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-white-all);
    background-image: url(../images/person.svg);
    background-size: contain;
    border: 1px solid var(--color-white-all);
  }
  & .name {
    color: var(--color-white-all);
    margin: 0;
    font-weight: 400;
    grid-row: 1;
    grid-column: 2;
    font-size: var(--font-size-h6);
    text-align: left;
    align-self: end;
  }
  & .email {
    color: var(--color-white-all);
    margin: 0;
    font-weight: 300;
    grid-row: 2;
    grid-column: 2;
    font-size: var(--font-size-xs);
    text-align: left;
    align-self: start;
  }
  & .remove {
    grid-row: 1 / 3;
    grid-column: 3;
    width: 25px;
    height: 25px;
    background-image: url(./images/menu_icons/delete.svg);
    background-size: contain;
    cursor: pointer;
  }
  & .remove:hover {
    filter: brightness(0%);
  }
}

.share-input {
  font-size: var(--font-size-xs);
}

.block-popup {
  & .textarea {
    width: 100%;
    resize: none;
    height: 125px;
    margin-top: 10px;
  }
}

.skeleton {
  background-color: #f0f0f0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(90deg, transparent, var(--skeleton-background), transparent);
  animation: loading 0.8s infinite;
}

@keyframes loading {
  0% {
    left: -150px;
  }
  100% {
    left: 100%;
  }
}

[theme="dark"] {
  .content-container {
    & .content {
      &.complete {
        & .content-header {
          & .content-cup {
            stroke: none;
          }
        }
      }
      & .content-main {
        & .content-main-data {
          & .content-rating {
            & .stars {
              &.fill .star {
                stroke: none;
              }
            }
          }
        }
      }
    }
  }
}

/* Link másolva toast */
.streak-copy-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--button-background, #2a2d3a);
  color: var(--color-darkest, #fff);
  font-family: var(--main-font, sans-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99999;
  white-space: nowrap;

  &.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
