.ypn-plugin {
  --ypn-bg: #eaf7f5;
  --ypn-text: #242224;
  --ypn-muted: rgba(36, 34, 36, 0.72);
  --ypn-accent: #14b8b1;
  --ypn-ring: rgba(36, 34, 36, 0.14);
  box-sizing: border-box;
  width: 100%;
  min-height: 455px;
  padding: 54px clamp(14px, 4vw, 56px) 64px;
  background: var(--ypn-bg);
  color: var(--ypn-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.ypn-plugin[data-theme="yellow"] {
  --ypn-bg: #eaf7f5;
}

.ypn-plugin[data-theme="dark"] {
  --ypn-bg: #171717;
  --ypn-text: #ffffff;
  --ypn-muted: rgba(255, 255, 255, 0.72);
  --ypn-accent: #14b8b1;
  --ypn-ring: rgba(255, 255, 255, 0.2);
}

.ypn-plugin * {
  box-sizing: border-box;
}

.ypn-heading {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.ypn-heading:empty {
  display: none;
}

.ypn-status {
  max-width: 680px;
  margin: 76px auto;
  padding: 22px;
  border: 1px solid var(--ypn-ring);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ypn-text);
  text-align: center;
}

.ypn-stage {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  gap: 20px;
  align-items: center;
  width: min(1060px, 100%);
  min-height: 285px;
  margin: 40px auto 0;
}

.ypn-track {
  position: relative;
  height: clamp(225px, 22vw, 300px);
  overflow: visible;
}

.ypn-card {
  --offset: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(270px, 32vw, 445px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 16px 38px rgba(24, 39, 42, 0.18);
  transform: translate(calc(-50% + (var(--offset) * min(30vw, 350px))), -50%) scale(0.84);
  transition: transform 260ms ease, opacity 260ms ease, filter 260ms ease, box-shadow 260ms ease;
}

.ypn-card.is-active {
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 20px 46px rgba(24, 39, 42, 0.22);
}

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

.ypn-card:not(.is-active) {
  opacity: 0.46;
  filter: saturate(0.86);
}

.ypn-card:hover,
.ypn-card:focus-visible {
  outline: none;
}

.ypn-card.is-active:hover,
.ypn-card.is-active:focus-visible {
  transform: translate(-50%, -50%) scale(1.025);
}

.ypn-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1d1d1d;
}

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

.ypn-card:not(.is-active) .ypn-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(234, 247, 245, 0.5);
}

.ypn-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111111;
}

.ypn-play::before {
  content: "";
  width: clamp(50px, 5vw, 64px);
  height: clamp(50px, 5vw, 64px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.ypn-play::after {
  content: "";
  position: absolute;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid #111111;
}

.ypn-playlist-name {
  display: block;
  min-height: 56px;
  padding: 16px 18px 18px;
  overflow: hidden;
  background: #ffffff;
  color: #242224;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ypn-count {
  display: none;
}

.ypn-card:not(.is-active) .ypn-playlist-name,
.ypn-card:not(.is-active) .ypn-count,
.ypn-card:not(.is-active) .ypn-play {
  display: none;
}

.ypn-arrow {
  position: relative !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 58px !important;
  min-width: 64px !important;
  min-height: 58px !important;
  padding: 0 !important;
  border: 4px solid #ffffff !important;
  border-radius: 999px !important;
  background: #14b8b1 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  line-height: 1 !important;
  box-shadow: 0 12px 28px rgba(20, 184, 177, 0.24) !important;
}

.ypn-arrow:hover,
.ypn-arrow:focus {
  background: #0fa7a1 !important;
  color: #ffffff !important;
  outline: none !important;
}

.ypn-arrow svg {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  stroke: currentColor !important;
  stroke-width: 3.5 !important;
}

.ypn-arrow svg polyline {
  stroke: currentColor !important;
}

@media (max-width: 760px) {
  .ypn-plugin {
    min-height: 390px;
    padding: 42px 10px 50px;
  }

  .ypn-stage {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 8px;
    min-height: 240px;
    margin-top: 32px;
  }

  .ypn-track {
    height: 230px;
  }

  .ypn-card {
    width: 76vw;
    transform: translate(calc(-50% + (var(--offset) * 63vw)), -50%) scale(0.8);
  }

  .ypn-card.is-active:hover,
  .ypn-card.is-active:focus-visible {
    transform: translate(-50%, -50%) scale(1);
  }

  .ypn-arrow {
    width: 44px;
    height: 44px;
  }

  .ypn-arrow svg {
    width: 27px;
    height: 27px;
  }

  .ypn-playlist-name {
    min-height: 50px;
    padding: 13px 14px 15px;
    font-size: 16px;
  }
}

.ypn-trending {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  min-height: 620px;
  padding: 62px clamp(18px, 5vw, 80px) 70px;

  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ypn-trending * {
  box-sizing: border-box;
}

.ypn-trending-title {
  margin: 0 0 42px;
  color: #ffffff;
  text-align: center;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;display: none;
}

.ypn-trending-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(280px, 460px);
  gap: clamp(44px, 6vw, 90px);
  align-items: center;
  justify-content: center;
}

.ypn-tv-main,
.ypn-tv-mini {
  text-align: center;
}

.ypn-tv-frame,
.ypn-tv-mini-frame {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.ypn-tv-frame {
  padding: 18px;
  border: 3px dashed rgba(36, 34, 36, 0.38);
  border-radius: 34px;
}

.ypn-tv-frame::before,
.ypn-tv-frame::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff7a7;
}

.ypn-tv-frame::before {
  left: -20px;
}

.ypn-tv-frame::after {
  right: -20px;
}

.ypn-tv-frame iframe,
.ypn-tv-mini-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  background: #111111;
}

.ypn-tv-main h3,
.ypn-tv-mini h3 {
  margin: 22px 0 0;
  color: #fff;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900;
  line-height: 1.15;
}

.ypn-tv-stand {
  width: 150px;
  height: 58px;
  margin: -2px auto 0;
  background:
    linear-gradient(65deg, transparent 48%, #111111 50%, transparent 52%) left / 50% 100% no-repeat,
    linear-gradient(-65deg, transparent 48%, #111111 50%, transparent 52%) right / 50% 100% no-repeat;
}

.ypn-tv-side {
  display: grid;
  gap: 38px;
}

.ypn-tv-mini {
  width: min(340px, 100%);
}

.ypn-tv-mini-offset {
  justify-self: end;
}

.ypn-tv-mini-frame {
  padding: 5px;
  border: 4px solid #ffffff;
  border-radius: 9px;
}

.ypn-tv-mini h3 {
  margin-top: 16px;
  font-size: clamp(21px, 2.2vw, 30px);
}

.ypn-tv-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-weight: 900;
}

.ypn-tv-error {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: -18px auto 28px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #242224;
  font-weight: 800;
  text-align: center;
}

.ypn-doodle {
  position: absolute;
  pointer-events: none;
  opacity: 0.72;
}

.ypn-doodle-sun {
  top: 145px;
  right: 20%;
  width: 74px;
  height: 74px;
  border: 8px solid #ffc0a7;
  border-radius: 50%;
}

.ypn-doodle-sun::before {
  content: "";
  position: absolute;
  inset: -35px;
  background:
    linear-gradient(#ffc0a7, #ffc0a7) center top / 7px 24px no-repeat,
    linear-gradient(#ffc0a7, #ffc0a7) center bottom / 7px 24px no-repeat,
    linear-gradient(90deg, #ffc0a7, #ffc0a7) left center / 24px 7px no-repeat,
    linear-gradient(90deg, #ffc0a7, #ffc0a7) right center / 24px 7px no-repeat;
}

.ypn-doodle-heart {
  bottom: 160px;
  right: 38%;
  width: 44px;
  height: 34px;
  border: 7px solid #ffc0a7;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 14px 0;
  transform: rotate(38deg);
}

.ypn-doodle-plane {
  top: 195px;
  right: 12%;
  width: 66px;
  height: 66px;
  border-top: 4px solid #ff9d90;
  border-right: 4px solid #ff9d90;
  transform: rotate(28deg) skew(-16deg);
}

@media (max-width: 900px) {
  .ypn-trending-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .ypn-tv-side {
    grid-template-columns: 1fr 1fr;
  }

  .ypn-tv-mini,
  .ypn-tv-mini-offset {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .ypn-trending {
    padding: 44px 14px 52px;
  }

  .ypn-trending-title {
    margin-bottom: 30px;
  }

  .ypn-tv-frame {
    padding: 10px;
    border-radius: 22px;
  }

  .ypn-tv-side {
    grid-template-columns: 1fr;
  }

  .ypn-tv-mini {
    width: 100%;
  }

  .ypn-doodle {
    display: none;
  }
}




