@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

:root {
  --body-background: #1a1625;
  --card-background: #2f2b3a;
  --card-element: #46424f;
  --primary-color: #a688fa;
  --secondary-color: #25193b;
  --success-color: green;
  --text-color: white;

  --max-card-height: 600px;

  --max-video-height: var(--max-card-height);
  --max-image-height: calc(var(--max-card-height) - 50px);
  --img-border-radius: 12px;
  --video-border-radius: 12px;
  --card-border-radius: 17px;
  --max-card-width: 800px;
  --comments-max-width: calc(var(--max-card-width) + 50px);
  --comment-font: clamp(16px, 3vw, 20px);
  --title-font: clamp(19px, 2vw, 25px);
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

a {
  color: var(--text-color);
  text-decoration: none;
}

.cursor-pointer:hover {
  cursor: pointer;
}

.wh30 {
  width: 30px;
  height: 30px;
}

* {
  margin: 0;
  padding: 0;
  /* color-scheme: dark; */
  -webkit-tap-highlight-color: transparent;
  color: var(--text-color);
  /* transition: color 1s; */
}

*::after,
*::before {
  display: block;
}

svg {
  fill: var(--text-color);
}

body {
  background: var(--body-background);
  /* font-family: "verdana, helvetica, sans-serif"; */
  /* font-family: "Roboto", sans-serif; */
  font-family: "Poppins", sans-serif;
  /* background: url("/pattern.png");
  background-size: 20px;
  background-blend-mode: overlay;
  background-color: var(--body-background); */
}
li {
  margin-left: 20px;
}

.mobile-search {
  position: absolute;
  background: var(--body-background);
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.banner-data-holder {
  max-width: var(--max-card-width);
  margin: auto;
  width: -webkit-fill-available;
  height: 120px;
  position: relative;
}
.banner-subdata {
  margin-bottom: 5px;
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: end;
  margin-top: 30px;
  flex: 1;
}

.banner-data {
  display: flex;
  position: absolute;
  top: -30px;
  margin-left: 10px;
  gap: 10px;
  width: -webkit-fill-available;
}
.banner-data img {
  border-radius: 100vw;
  border: 8px solid var(--body-background);
  background: white;
}

.sub-banner {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  /* max-width: var(--max-card-width); */
  margin: auto;
  min-height: 200px;
  /* padding-bottom: 75px; */
}

.sub-banner-img {
  width: -webkit-fill-available;
  /* width: 80%; */
  margin: auto;
  /* max-height: 200px; */
  /* margin-inline: 20px; */
}
.sub-banner-img img {
  object-fit: cover;
  height: 100%;
  /* height: ; */
  /* border-radius: var(--img-border-radius); */
  min-height: 50px;
  max-height: 200px;
}

/* .sub-input::before {
  content: "r/";
  font-size: 25px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 10px;
} */

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* flex-wrap: wrap; */
}

.card-footer {
  font-size: clamp(15px, 2vw, 18px);
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.card-header-data {
  font-size: clamp(15px, 2vw, 18px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.active {
  background: var(--success-color) !important;
}

.label {
  gap: 5px;
  padding: clamp(4px, 0.4vw, 5px) clamp(8px, 1vw, 12px);
  border-radius: 100vw;
  background: var(--card-element);
  display: flex;
  /* color: var(--text-color); */
  width: max-content;
  /* flex-direction: column; */
  align-items: center;
  /* box-sizing: border-box; */
}
.clickable:hover {
  cursor: pointer;
  /* background: ; */
  border: 1px solid;
  /* transform: scale(1.01); */
}

.clickable {
  box-sizing: border-box;
  transition: 100ms;

  border: 1px solid transparent;
}

.separator {
  width: 1px;
  margin-inline: 5px;
  height: 18px;
  /* height: 100%; */

  background: grey;
}

.post-title {
  max-width: var(--max-card-width);
  width: -webkit-fill-available;
  padding: 6px 25px;
  background-color: var(--card-element);
  border-radius: var(--card-border-radius);
  margin: 10px;
}

.upvoted {
  svg {
    fill: var(--primary-color);
  }
  animation: animate-up 400ms;
}
.downvoted {
  svg {
    fill: var(--nsfw);
  }
  animation: animate-down 400ms;
}

@keyframes animate-down {
  from {
    transform: translateY(0) scale(-1);
  }
  50% {
    transform: translateY(6px) scale(-1);
  }
  to {
    transform: translateY(0) scale(-1);
  }
}

@keyframes animate-up {
  from {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(0);
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin: 10px;
  /* border: 3px solid; */
  padding: 25px;
  gap: 10px;
  /* max-width: 800px; */
  /* width: 100%; */
  width: -webkit-fill-available;
  max-width: var(--max-card-width);
  /* min-width: 200px; */
  border-radius: var(--card-border-radius);
  font-size: large;
  background: var(--card-background);
  opacity: 0;
}
.card-title {
  font-size: var(--title-font);
  color: var(--text-color);
}

.img-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  border-radius: var(--img-border-radius);
  overflow: hidden;
  height: 100%;
  /* max-height: 400px; */
}

.img-src-holder {
  position: fixed;
  z-index: 6;
  top: 34px;
  left: 0;
  width: 100vw;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* opacity: 0; */
}

.animate-scalein {
  animation: scalein 70ms forwards;
}

.animate-scaleout {
  animation: scaleout 70ms forwards;
}

@keyframes scalein {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}
@keyframes scaleout {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.9);
    opacity: 0;
  }
}
.img-src-holder:hover {
  cursor: zoom-out;
}

.img-src {
  top: 0;
  position: relative;
  /* z-index: 30; */
  width: 90%;
  height: 90%;
  background: var(--card-background);
  border: 1px solid var(--text-color);
}

.cursor-zoom-in:hover {
  cursor: zoom-in;

  /* color: red; */
}

.img-container img {
  /* height: 100%; */
  max-height: var(--max-image-height);
  z-index: 2;
}

.img-bg::before {
  content: "";
  display: block;
  width: inherit;
  height: inherit;
  background-color: rgba(0, 0, 0, 0.552);
  backdrop-filter: blur(8px);
}

.img-bg {
  top: 0;
  background-size: cover;
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 1;
  display: block;
  content: "";
  width: 100%;
  height: 100%;
}

.video-holder {
  border-radius: var(--video-border-radius);
  overflow: hidden;
  max-height: var(--max-video-height);
  width: 100%;
  background-color: #00000038;
}

.video-player > div > video {
  max-height: var(--max-video-height);
}

.video-player {
  height: 100%;
}
.carousel {
  flex: 1 0 100%;
  height: 100%;
  opacity: 1;
  align-self: center;
}
.carousel-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 3px 8px;
  border-radius: 28px;
  font-size: clamp(14px, 2vw, 20px);
  background-color: rgba(0, 0, 0, 0.464);
  backdrop-filter: blur(8px);
  /* color: white; */
}

.carousel-nav > span {
  color: white;
}

.carousel-translate {
  display: flex;
  height: min(100%, var(--max-image-height));
  /* transition: 300ms cubic-bezier(0.4, 0, 0.2, 1); */
}
.arrow {
  opacity: 0.8;
  background: transparent;
  border: none;
  z-index: 3;
  position: absolute;
  top: 40%;
  padding: 5px;
  margin: 10px;
  color: white;
  text-shadow: rgba(0, 0, 0, 0.398) -2px 2px 3px;
  transition: 20ms;
}

.arrow::before {
  z-index: -1;
  content: "";
  background: rgba(0, 0, 0, 0.54);
  position: absolute;
  inset: 0;
  border-radius: 50vh;
}

.arrow:hover {
  background: rgba(128, 128, 128, 0.003);
  cursor: pointer;
}

.left-arrow:active {
  transform: rotate(180deg) scale(1.1);
}
.right-arrow:active {
  transform: scale(1.1);
}

.left-arrow {
  /* left: 10px; */
  text-shadow: black -2px -2px 3px;
  transform: rotate(180deg);
  size: -100%;
}
.right-arrow {
  right: 0;
}
.redirect-link {
  width: -webkit-fill-available;
  position: absolute;
  z-index: 3;
  font-size: clamp(20px, 4vw, 40px);
  font-weight: bolder;
  bottom: 0;
  text-align: end;
  border-top: 2px solid white;
  background: linear-gradient(-90deg, #000000a6, #ffffff80);
  border-radius: 0 0 var(--img-border-radius) var(--img-border-radius);
  text-decoration: none;
  color: white;
  padding: 4px 10px;
}

.comment-upvote-icon {
  width: 26px;
  height: 26px;
}

.comment-back {
  width: 50px;
  height: 50px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  left: -90px;
  top: 30px;
  animation: backdrop-fade 800ms forwards;
}

.comment-back-holder {
  max-width: var(--max-card-width);
  margin: auto;
  position: relative;
  z-index: 6;
}

.comments {
  /* margin-inline: 10px; */
  width: 96%;
  margin: auto;
  max-width: var(--comments-max-width);
  margin-bottom: 40px;
}
.comment-thread {
  height: 100%;
  position: absolute;
  left: -2px;
  top: 0;
  width: 3px;
  /* background: hsl(100, 30%, 40%); */
}
.comment-parent {
  margin: 10px;
  margin-right: 0;
  padding: 10px;
  padding-left: 10px;
  padding-right: 0;
  /* max-height: 10000px; */
  background: var(--card-background);
  position: relative;
  overflow-wrap: break-word;
  margin-bottom: 0;
  padding-bottom: 0;
  /* transition: max-height 400ms; */
  font-size: var(--comment-font);
}
.md a {
  text-decoration: underline;
  color: cornflowerblue;
}
.collapse-reverse {
  animation: comment-show 1s ease-in forwards;
  /* max-height: 40px; */
}
.collapse {
  animation: comment-collapse 300ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  opacity: 0.5;
}

@keyframes comment-collapse {
  from {
    max-height: 20svh;
  }

  to {
    max-height: 40px;
  }
}
@keyframes comment-show {
  from {
    max-height: 40px;
  }

  to {
    max-height: 4000px;
  }
}

.comment-parent img {
  max-width: clamp(200px, 40vw, 400px);
  /* max-width: 200px; */
  height: auto;
  /* display: flex; */
  /* flex-wrap: wrap; */
}
.animate-load {
  animation: fader 800ms forwards;
}

.animate-shared {
  opacity: 0;
  animation: left-right 1s;
}
.search-sub {
  /* position: absolute;
  top: 69px;
  left: calc(50vw + var(--max-card-width) / 2 + 20px); */
  margin-top: 6px;
  margin-inline: 12px;
  min-width: 200px;
  /* min-width: max-content; */
}
.subcard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* width: fit-content; */
  padding: 10px;
  margin-block: 5px;
  border-radius: 12px;
  /* justify-content: flex-start; */
  gap: 10px;
}
.subcard img {
  border-radius: 100vw;
}

/* .search-sub {
  position: absolute;
  top: 50px;
  right: 0;
} */

@keyframes fader {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translate(0);
  }
}

@keyframes left-right {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  40% {
    opacity: 1;
    transform: translate(0);
  }
  80% {
    opacity: 1;
    transform: translate(0);
  }
  to {
    opacity: 0;
    transform: translateX(10px);
  }
}

::-webkit-scrollbar {
  width: 13px;
}
::-webkit-scrollbar-track {
  border-radius: 100vw;
  background: var(--card-background);
  margin-block: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--body-background);
  border-radius: 100vw;
  min-height: 50px;
  border: 1px solid var(--card-background);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
  border: 2px solid var(--card-background);
}

@media only screen and (max-width: 600px) {
  :root {
    --max-video-height: 400px; /* Change this value as needed */
  }
  .img-bg {
    /* opacity: 0; */
    display: none;
  }
  /* .banner-data-holder {
    height: 120px;
  } */
  .card {
    padding: 10px;
  }
  .comment-back {
    width: 30px;
    height: 30px;
    padding: 4px;
    position: relative;
    left: 10px;
    top: 4px;
  }
  .comment-back-holder {
    height: 35px;
  }

  .img-src-holder {
    top: 20px;
  }
  .arrow {
    padding: 0;
  }
  .wh30 {
    width: 25px;
    height: 25px;
  }
  .comment-upvote-icon {
    width: 18px;
    height: 18px;
  }
  .search-sub {
    position: relative;
    left: auto;
    top: auto;
  }
}
