
#ys-platforms-embed { --brand: #094baa; --cyan: #2eb9ee; }
#ys-platforms-embed, #ys-platforms-embed * { box-sizing: border-box; }
#ys-platforms-embed { margin: 0; font: 16px/1.75 "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }

/* Break out of the parent container so the module spans the full viewport width */
#ys-platforms-embed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: hidden;
}

#ys-platforms-embed button { font: inherit; }
#ys-platforms-embed .platforms {
  position: relative; overflow: hidden; padding: 128px 0; color: #fff;
  background: radial-gradient(circle at 82% 36%, rgb(46 185 238 / 20%), transparent 28%), linear-gradient(135deg, #05285f, var(--brand) 55%, #075fc3);
}
#ys-platforms-embed .platform-orbit { position: absolute; border: 1px solid rgb(255 255 255 / 10%); border-radius: 50%; pointer-events: none; }
#ys-platforms-embed .orbit-one { top: -280px; right: -220px; width: 760px; height: 760px; }
#ys-platforms-embed .orbit-two { top: -90px; right: -35px; width: 390px; height: 390px; }
#ys-platforms-embed .platform-shell { position: relative; z-index: 1; width: min(1240px, calc(100% - 80px)); margin: auto; }
#ys-platforms-embed .heading-row { display: grid; grid-template-columns: .8fr 1.2fr; align-items: end; gap: 40px; }
#ys-platforms-embed .heading-row h2 { margin: 0; font-size: clamp(36px, 4vw, 58px); font-weight: 520; line-height: 1.3; letter-spacing: -.035em; }
#ys-platforms-embed .heading-row p { max-width: 620px; margin: 0 0 10px; color: rgb(255 255 255 / 70%); font-size: 17px; }
#ys-platforms-embed .platform-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 68px; border-top: 1px solid rgb(255 255 255 / 18%); }
#ys-platforms-embed .platform-tabs button {
  display: flex; min-width: 0; min-height: 112px; align-items: center; gap: 15px; padding: 0 22px;
  color: rgb(255 255 255 / 58%); text-align: left; border: 0; border-right: 1px solid rgb(255 255 255 / 18%);
  background: transparent; cursor: pointer; transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}
#ys-platforms-embed .platform-tabs button:last-child { border-right: 0; }
#ys-platforms-embed .platform-tabs button span { font: 700 20px Arial, sans-serif; }
#ys-platforms-embed .platform-tabs button b { font-size: 20px; font-weight: 600; line-height: 1.5; }
#ys-platforms-embed .platform-tabs button.active, #ys-platforms-embed .platform-tabs button:hover { color: #fff; background: rgb(255 255 255 / 10%); box-shadow: inset 0 3px 0 var(--cyan); }
#ys-platforms-embed .platform-tabs button:focus-visible, #ys-platforms-embed .platform-mobile-controls button:focus-visible, #ys-platforms-embed .platform-stage:focus-visible { outline: 2px solid #a8eaff; outline-offset: -3px; }
#ys-platforms-embed .platform-mobile-controls { display: none; }

/* ============ Card: image fills the entire card, text overlaid on the left ============ */
#ys-platforms-embed .platform-stage {
  position: relative;
  display: block;
  min-height: 530px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 18%);
  background: #05357d; /* fallback background */
}

/* Image layer: absolutely positioned to fill the entire card */
#ys-platforms-embed .platform-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 36%, rgb(46 185 238 / 30%), transparent 60%),
    linear-gradient(135deg, #075fc3, #05357d);
  opacity: 0;
  transition: opacity 480ms ease;
}
#ys-platforms-embed .platform-image.reveal { opacity: 1; }
#ys-platforms-embed .platform-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

/* 45° gradient overlay: #05357d on the far left at 90% opacity to avoid a harsh solid edge */
#ys-platforms-embed .platform-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    108deg,
    rgb(5 53 125 / 90%) 0%,
    rgb(5 53 125 / 88%) 26%,
    rgb(5 53 125 / 82%) 34%,
    rgb(5 53 125 / 74%) 42%,
    rgb(5 53 125 / 60%) 51%,
    rgb(5 53 125 / 44%) 60%,
    rgb(5 53 125 / 27%) 69%,
    rgb(5 53 125 / 13%) 78%,
    rgb(5 53 125 / 5%) 87%,
    rgb(5 53 125 / 0%) 96%
  );
}

/* Text layer: overlaid above the image, aligned left */
#ys-platforms-embed .platform-copy {
  position: relative;
  z-index: 2;
  max-width: 62%;
  padding: 58px 56px;
}
#ys-platforms-embed .platform-copy.reveal { animation: platform-reveal 420ms ease both; }
#ys-platforms-embed .platform-icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 34px; border: 1px solid rgb(255 255 255 / 24%); background: rgb(255 255 255 / 8%); backdrop-filter: blur(6px); }
#ys-platforms-embed .platform-number { margin: 0 0 10px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .2em; }

/* Title: allow wrapping for longer English titles */
#ys-platforms-embed .platform-copy h3 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(25px, 2.1vw, 33px);
  font-weight: 520;
  line-height: 1.35;
  white-space: normal;
}
#ys-platforms-embed .platform-description { margin: 34px 0 0; color: rgb(255 255 255 / 84%); font-size: 16px; line-height: 1.85; }
#ys-platforms-embed .platform-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
#ys-platforms-embed .platform-tags span { padding: 7px 12px; color: #d9f5ff; border: 1px solid rgb(108 219 255 / 28%); background: rgb(18 139 208 / 20%); font-size: 13px; backdrop-filter: blur(4px); }

/* Grid decoration layer */
#ys-platforms-embed .image-grid {
  position: absolute; inset: 0; z-index: 2; opacity: .18;
  background-image: linear-gradient(rgb(255 255 255 / 18%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 18%) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(108deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(108deg, transparent 30%, #000);
  pointer-events: none;
}

@keyframes platform-reveal { from { opacity: .45; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1020px) {
  #ys-platforms-embed .platform-copy { padding: 42px 36px; max-width: 68%; }
  #ys-platforms-embed .platform-copy h3 { font-size: clamp(23px, 2.6vw, 30px); }
  #ys-platforms-embed .platform-tabs button { padding: 0 12px; }
  #ys-platforms-embed .platform-tabs button span { font-size: 20px; }
  #ys-platforms-embed .platform-tabs button b { font-size: 20px; }
}
@media (max-width: 760px) {
  #ys-platforms-embed .platforms { padding: 76px 0; }
  #ys-platforms-embed .platform-shell { width: min(100% - 36px, 620px); }
  #ys-platforms-embed .heading-row { grid-template-columns: 1fr; gap: 15px; }
  #ys-platforms-embed .heading-row h2 { font-size: clamp(34px, 9vw, 48px); }
  #ys-platforms-embed .heading-row p { margin: 0; font-size: 15px; line-height: 1.7; }
  #ys-platforms-embed .platform-tabs { grid-template-columns: repeat(5, 148px); margin-top: 34px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
  #ys-platforms-embed .platform-tabs::-webkit-scrollbar { display: none; }
  #ys-platforms-embed .platform-tabs button { min-height: 82px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 10px 18px; scroll-snap-align: start; }
  #ys-platforms-embed .platform-tabs button span { font-size: 20px; }
  #ys-platforms-embed .platform-tabs button b { font-size: 20px; }
  #ys-platforms-embed .platform-mobile-controls { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: rgb(255 255 255 / 60%); font: 700 13px Arial, sans-serif; letter-spacing: .1em; }
  #ys-platforms-embed .platform-mobile-controls span b { color: #fff; font-size: 18px; }
  #ys-platforms-embed .platform-mobile-controls > div { display: flex; gap: 8px; }
  #ys-platforms-embed .platform-mobile-controls button { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; border: 1px solid rgb(255 255 255 / 30%); background: rgb(255 255 255 / 7%); font-size: 23px; line-height: 1; cursor: pointer; }
  #ys-platforms-embed .platform-mobile-controls button:hover { background: rgb(255 255 255 / 16%); }

  /* Mobile: image as top background, text overlaid below; fade from top to bottom */
  #ys-platforms-embed .platform-stage { min-height: 0; }
  #ys-platforms-embed .platform-copy {
    max-width: none;
    padding: 240px 26px 38px;
  }
  #ys-platforms-embed .platform-copy h3 { white-space: normal; font-size: clamp(24px, 6.4vw, 32px); }
  #ys-platforms-embed .platform-image::after {
    background: linear-gradient(
      180deg,
      rgb(5 53 125 / 0%) 0%,
      rgb(5 53 125 / 0%) 32%,
      rgb(5 53 125 / 12%) 45%,
      rgb(5 53 125 / 38%) 58%,
      rgb(5 53 125 / 68%) 70%,
      rgb(5 53 125 / 90%) 82%,
      #05357d 94%
    );
  }
  #ys-platforms-embed .platform-icon { width: 48px; height: 48px; margin-bottom: 22px; }
  #ys-platforms-embed .platform-description { margin-top: 25px; }
  #ys-platforms-embed .platform-tags { margin-top: 26px; }
  #ys-platforms-embed .image-grid { mask-image: linear-gradient(180deg, #000 30%, transparent 75%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 75%); }
}
@media (max-width: 380px) {
  #ys-platforms-embed .platform-tabs { grid-template-columns: repeat(5, 132px); }
  #ys-platforms-embed .platform-copy { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #ys-platforms-embed .platform-copy.reveal { animation: none; }
  #ys-platforms-embed .platform-tabs button { transition: none; }
  #ys-platforms-embed .platform-image { transition: none; }
}
