@font-face {
  font-family: "Sakura";
  src: url("fonts/Sakura.woff2") format("woff2");
  font-display: swap;
}

:root {
  --zyo-cursor: url("cursor.webp");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--zyo-font, "Sakura", "Segoe UI", sans-serif);
  cursor: var(--zyo-cursor) 16 16, auto;
}

html,
body {
  min-height: 100%;
}

body {
  background: #000;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #000 url("background.webp") center / cover no-repeat;
}

#bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--zyo-tint, transparent);
}

#bgfx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---- profile shell ---- */

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: opacity 0.5s ease;
}

body:not(.entered) .stage {
  opacity: 0;
}

.bio-container {
  width: 100%;
  max-width: 730px;
  margin: auto;
  padding: 30px 0;
}

.bio_content_container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.content-container {
  position: relative;
  width: 100%;
  padding: 40px;
  border-radius: var(--borderRadius, 25px);
  overflow: hidden;
}

.content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 650px;
}

/* ---- identity ---- */

.top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top.cardCenter {
  flex-direction: column;
  align-items: center;
}

.img_container {
  position: relative;
  width: 160px;
  height: 160px;
  flex: none;
}

.img_container .img {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: var(--zyo-avatar-radius, 50%);
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.img_effect {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118%;
  height: 118%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  filter: hue-rotate(var(--zyo-hue, 314deg));
}

.flex-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
}

.flex-column .flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.top .header {
  color: var(--zyo-name, #fff);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3em;
  max-width: 400px;
  margin: 0 0 3px 8px;
  overflow-wrap: anywhere;
  text-shadow: var(--nameGlow, none);
}

.top.cardCenter .header,
.top.cardCenter .bio_description {
  text-align: center;
}

.top.cardCenter .svg_container .svg_item,
body.info-column .svg_container .svg_item {
  font-size: 30px;
}

.bio_description {
  font-size: 16px;
  line-height: 1.4em;
  color: var(--zyo-bio, #fff);
  text-shadow: var(--descriptionGlow, none);
  max-width: 400px;
  margin-left: 8px;
  overflow-wrap: anywhere;
}

.bio_description strong {
  font-weight: 700;
}

.bio_description a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bio_description code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
}

.svg_container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg_item {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--zyo-icon, #949494);
  font-size: 22px;
  transition: scale 0.3s, background-color 0.4s, border-radius 0.4s;
}

.svg_item svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

@media (hover: hover) {
  .svg_item:hover {
    scale: 1.1;
  }

  .svg_item.discord:hover {
    background-color: rgba(51, 51, 51, 0.2);
    border-radius: 50px;
  }
}

/* ---- links ---- */

.swiper {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 650px;
  height: 200px;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.swiper::-webkit-scrollbar {
  display: none;
}

.swiper.dragging {
  scroll-snap-type: none;
}

.card {
  position: relative;
  flex: 0 0 calc((100% - 10px) / 2);
  height: 200px;
  border-radius: 25px;
  overflow: hidden;
  scroll-snap-align: start;
  isolation: isolate;
  color: #fff;
  text-decoration: none;
  user-select: none;
}

.card .img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  opacity: var(--zyo-card-op, 1);
  filter: blur(var(--zyo-card-blur, 0px));
  transition: opacity 0.2s, filter 0.2s, scale 0.5s ease;
  -webkit-user-drag: none;
}

.card:hover .img {
  scale: 1.1;
}

.card.no-image {
  background: #0d1420;
}

.card.no-image::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  background: linear-gradient(145deg, #1d2838, #0d1420 55%, #22324a);
  opacity: var(--zyo-card-op, 1);
  filter: blur(var(--zyo-card-blur, 0px));
}

.card .bottom-left {
  position: absolute;
  left: 20px;
  bottom: 10px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0, 0, 0, 0);
  align-items: stretch;
  text-align: left;
}

.card .header {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3em;
  color: var(--zyo-card, #fff);
}

.card .description {
  font-size: 12px;
  line-height: 1.3em;
  color: #b3b3b3;
}

/* ---- info bar ---- */

.bio_small_infomation {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  bottom: 12px;
  left: 15px;
  z-index: 1;
  user-select: none;
}

.bio_infomation {
  display: flex;
  align-items: center;
  border: 0;
  padding: 0;
  background: none;
  color: var(--zyo-name, #fff);
  font-size: 14px;
}

.bio_infomation svg {
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  color: var(--zyo-name, #fff);
  fill: currentColor;
}

.bio_infomation .text {
  font-size: 14px;
  line-height: 16px;
  color: var(--zyo-name, #fff);
}

.bio_infomation.like-item {
  cursor: pointer;
}

.bio_small_infomation .border {
  width: 2px;
  height: 15px;
  background: hsla(0, 0%, 100%, 0.2);
}

/* ---- floating widgets ---- */

.revealAudioLike {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 5;
  transition: opacity 0.4s ease;
}

body:not(.entered) .revealAudioLike {
  opacity: 0;
}

.audio_control {
  display: flex;
  align-items: center;
  line-height: 0;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background-color: rgba(15, 15, 15, 0.2);
  padding: 15px;
  transition: 0.5s;
  gap: 20px;
  overflow: hidden;
  cursor: pointer;
}

.audio_control:hover {
  width: 180px;
  padding-right: 25px;
}

.audio_control .volumeIcon {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--zyo-audio, #fff);
}

.audio_control .volumeIcon.active {
  animation: bounce 0.3s ease;
}

.audio_control .volumeIcon.unactive {
  animation: bounceRepeat 0.3s ease;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 8px;
  min-width: 0;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  touch-action: none;
}

.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 8px;
  width: 80%;
  border-radius: 4px;
  background: #fff;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: -4px;
  left: calc(80% - 4px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}

.like_button {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 10px;
  background-color: rgba(15, 15, 15, 0.2);
  padding: 15px;
  transition: 0.5s;
  gap: 20px;
  overflow: hidden;
  cursor: pointer;
}

.like_button .likeIcon {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--zyo-audio, #fff);
}

.like_button.liked .likeIcon {
  color: #c50b2b;
}

.like_button.pulse .likeIcon {
  animation: bounce 0.3s ease;
}

/* ---- gate ---- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fafafa;
  transition: opacity 0.45s ease;
}

.enter_screen_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  max-width: min(90vw, 660px);
  padding: 0 22px;
  text-align: center;
}

.enter_screen_icon {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.45));
}

.enter_screen_title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.enter_screen_subtitle {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.72;
}

.gate.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.gate:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -6px;
}

/* ---- tooltip / toast ---- */

.zyo-tip {
  position: fixed;
  z-index: 40;
  padding: 4px 8px;
  border-radius: 15px;
  background: rgba(21, 21, 23, 0.68);
  border: 0;
  color: #fff;
  font-size: 15px;
  line-height: 17px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.9);
  transform-origin: 50% 100%;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.zyo-tip.show {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.zyo-tip.place-bottom {
  transform: translate(-50%, 0) scale(0.92);
  transform-origin: 50% 0;
}

.zyo-tip.place-bottom.show {
  transform: translate(-50%, 0) scale(1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 30;
  transform: translate(-50%, 12px);
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- keyframes ---- */

@keyframes bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes bounceRepeat {
  0% { transform: scale(1); }
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.desc-wave .wave-word {
  display: inline-block;
  white-space: nowrap;
}

.desc-wave .wave-char {
  display: inline-block;
  animation: waveChar 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 55ms);
}

@keyframes waveChar {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* ---- focus ---- */

.card:focus-visible,
.svg_item:focus-visible,
.like_button:focus-visible,
.like-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

/* ---- preferences ---- */

body.no-cursor,
body.no-cursor * {
  cursor: auto;
}

body.no-cursor a,
body.no-cursor button,
body.no-cursor input,
body.no-cursor label {
  cursor: pointer;
}

body.hide-clouds .img_effect {
  display: none;
}

body.no-name-glow .top .header {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

body.icon-glow .svg_item svg,
body.icon-glow .bio_infomation svg,
body.icon-glow .like_button svg,
body.icon-glow .audio_control svg {
  filter: drop-shadow(0 0 6px currentColor);
}

body.cards-center .card .bottom-left {
  left: 5%;
  align-items: center;
  text-align: center;
}

body.info-column .bio_small_infomation {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

body.info-column .bio_small_infomation .border {
  display: none;
}

body.info-column .bio_infomation {
  justify-content: center;
}

body.wide .bio_description {
  max-width: 100%;
}

body.no-like .like-item,
body.no-like .like_button {
  display: none;
}

body.no-volume .slider-container {
  display: none;
}

body.no-volume .audio_control:hover {
  width: 58px;
  padding-right: 15px;
}

body.single-icon-color .bio_infomation svg {
  color: var(--zyo-icon, #949494);
}

body.big-link .card {
  flex-basis: 100%;
}

body.big-link .card .header {
  font-size: 22px;
}

/* ---- banner ---- */

.banner {
  position: relative;
  width: 100%;
  height: var(--zyo-banner-h, 120px);
  margin-bottom: 22px;
  border-radius: 22px;
  overflow: hidden;
  background: #0d1420;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--zyo-banner-fade, 0%)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--zyo-banner-fade, 0%)), transparent 100%);
}

.banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-container.banner-float .banner {
  margin-bottom: -64px;
}

.content-container.banner-float .img_container {
  z-index: 3;
}

/* ---- compact link layout ---- */

body.link-compact .swiper {
  flex-direction: column;
  gap: 8px;
  height: auto;
  overflow: visible;
  scroll-snap-type: none;
}

body.link-compact .card {
  flex: none;
  width: 100%;
  height: 88px;
  border-radius: 18px;
}

body.link-compact .card .img {
  inset: 0 auto 0 0;
  width: 88px;
  height: 88px;
  border-radius: 14px;
}

body.link-compact .card .bottom-left {
  left: 104px;
  right: 16px;
  top: 50%;
  bottom: auto;
  width: auto;
  transform: translateY(-50%);
}

/* ---- responsive ---- */

@media (max-width: 767px) {
  .stage {
    padding: 0 12px;
  }

  .bio-container {
    width: 95vw;
    padding: 20px 0;
  }

  .content-container {
    padding: 15px 15px 40px;
  }

  .card {
    flex-basis: 100%;
  }

  .bio_small_infomation {
    bottom: 12px;
    left: 15px;
  }
}

@media (max-width: 640px) {
  .top .header {
    font-size: 32px;
  }
}

@media (max-height: 680px) {
  .bio-container {
    padding: 12px 0;
  }

  .img_container,
  .img_container .img {
    width: 140px;
    height: 140px;
  }
}

html.preview-mode,
body.preview-mode {
  scrollbar-width: none;
}

html.preview-mode::-webkit-scrollbar,
body.preview-mode::-webkit-scrollbar {
  display: none;
}
