.os-rail-system {
  --rail-step: 8.4s;
  min-height: 560px;
  padding: 84px 34px 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 30px;
  background:
    radial-gradient(circle at 48% 38%, rgba(92, 247, 187, 0.095), transparent 34%),
    radial-gradient(circle at 74% 30%, rgba(118, 185, 252, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 34px 110px rgba(0, 0, 0, 0.2);
}

.os-rail-system::before {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    radial-gradient(70% 58% at 50% 42%, rgba(31, 38, 170, 0.22), transparent 70%);
  background-size: 44px 44px, 44px 44px, auto;
  opacity: 0.78;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, #000 64%, transparent 92%);
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 64%, transparent 92%);
}

.os-rail-system::after {
  inset: 19% 10% 18%;
  background: radial-gradient(ellipse at center, rgba(92, 247, 187, 0.13), rgba(0, 103, 244, 0.09) 42%, transparent 73%);
  opacity: 0.78;
}

.os-rail-line {
  position: absolute;
  top: 183px;
  left: 62px;
  right: 62px;
  z-index: 1;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(118, 185, 252, 0.12), rgba(92, 247, 187, 0.3), rgba(118, 185, 252, 0.12));
  box-shadow: 0 0 20px rgba(92, 247, 187, 0.08);
}

.os-rail-line span {
  position: absolute;
  top: -1px;
  left: -18%;
  width: 18%;
  height: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(92, 247, 187, 0.9), rgba(118, 185, 252, 0.56), transparent);
  filter: blur(0.4px) drop-shadow(0 0 10px rgba(92, 247, 187, 0.42));
  animation: osRailPulse var(--rail-step) cubic-bezier(0.55, 0, 0.25, 1) infinite;
}

.os-rail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.os-stage {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 248px;
  padding: 18px 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.034)),
    rgba(5, 8, 36, 0.66);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.072), 0 18px 58px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(1.1);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.os-stage::before {
  position: absolute;
  top: 100px;
  left: 50%;
  z-index: 3;
  width: 12px;
  height: 12px;
  content: "";
  border: 2px solid rgba(2, 2, 13, 0.78);
  border-radius: 999px;
  background: #5cf7bb;
  box-shadow: 0 0 0 7px rgba(92, 247, 187, 0.08), 0 0 22px rgba(92, 247, 187, 0.38);
  transform: translate(-50%, -50%);
}

.os-stage::after {
  position: absolute;
  inset: -1px;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: radial-gradient(circle at 50% 12%, rgba(92, 247, 187, 0.2), transparent 54%);
  opacity: 0;
  animation: osStageActivate var(--rail-step) ease-in-out infinite;
  animation-delay: var(--stage-delay);
}

.os-stage:hover {
  border-color: rgba(92, 247, 187, 0.24);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 22px 68px rgba(0, 0, 0, 0.24), 0 0 34px rgba(92, 247, 187, 0.075);
  transform: translateY(-3px);
}

.os-stage-primary {
  min-height: 280px;
  border-color: rgba(92, 247, 187, 0.18);
  background:
    radial-gradient(circle at 20% 0%, rgba(92, 247, 187, 0.13), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.094), rgba(255, 255, 255, 0.044)),
    rgba(6, 8, 42, 0.74);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 24px 78px rgba(0, 0, 0, 0.24), 0 0 42px rgba(92, 247, 187, 0.055);
}

.stage-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 26px;
  margin-bottom: 84px;
  border-radius: 999px;
  background: rgba(92, 247, 187, 0.14);
  color: #5cf7bb;
  font-size: 11px;
  font-weight: 900;
}

.os-stage h3 {
  margin: 0;
  color: var(--white);
  font-size: 17px;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.os-stage p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.48;
}

.os-stage > small {
  display: block;
  margin-top: 14px;
  color: rgba(92, 247, 187, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stage-utility {
  position: relative;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(92, 247, 187, 0.12), transparent 44%),
    rgba(2, 3, 24, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 18px 46px rgba(0, 0, 0, 0.18);
  animation: osUtilitySignal var(--rail-step) ease-in-out infinite;
  animation-delay: var(--stage-delay);
}

.stage-utility::before {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 1px;
  height: 17px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(92, 247, 187, 0.36));
}

.stage-utility small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stage-utility strong {
  display: block;
  margin-top: 6px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.stage-utility div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.2;
}

.stage-utility b {
  color: var(--white);
  font-weight: 800;
}

@keyframes osRailPulse {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  8%,
  84% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(650%);
  }
}

@keyframes osStageActivate {
  0%,
  8%,
  100% {
    opacity: 0;
  }
  13%,
  22% {
    opacity: 0.78;
  }
}

@keyframes osUtilitySignal {
  0%,
  9%,
  100% {
    border-color: rgba(255, 255, 255, 0.105);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 18px 46px rgba(0, 0, 0, 0.18);
  }
  14%,
  24% {
    border-color: rgba(92, 247, 187, 0.22);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 20px 52px rgba(0, 0, 0, 0.21), 0 0 22px rgba(92, 247, 187, 0.08);
  }
}

@media (max-width: 1199px) {
  .os-rail-system {
    min-height: auto;
    padding: 28px;
  }

  .os-rail-line {
    display: none;
  }

  .os-rail {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .os-stage,
  .os-stage-primary {
    min-height: auto;
  }

  .os-stage::before {
    top: 27px;
    left: 25px;
  }

  .stage-number {
    margin-bottom: 26px;
    margin-left: 24px;
  }
}

@media (max-width: 809px) {
  .os-rail-system {
    padding: 20px;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .os-rail-line span,
  .os-stage::after,
  .stage-utility {
    animation: none !important;
  }
}
