.ct-flow-player {
  --ct-green: #39ff14;
  --ct-green-soft: rgba(57,255,20,.18);
  --ct-panel: rgba(4,7,6,.82);
  --ct-line: rgba(255,255,255,.14);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  overflow: hidden;
  border-radius: 14px;
  background: #020403;
  border: 1px solid var(--ct-line);
  box-shadow: 0 18px 45px rgba(0,0,0,.38), 0 0 0 1px rgba(57,255,20,.04) inset;
  isolation: isolate;
}

.ct-flow-player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(57,255,20,.05) 48%, transparent 54%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.015) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.ct-flow-stage,
.ct-flow-media-layer,
.ct-flow-blur-layer {
  position: absolute;
  inset: 0;
}

.ct-flow-stage {
  z-index: 1;
  background: #020403;
}

.ct-flow-blur-layer {
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(24px) brightness(.34) saturate(.85);
  transform: scale(1.12);
  opacity: 0;
  transition: opacity .35s ease;
}

.ct-flow-player.is-story .ct-flow-blur-layer {
  opacity: 1;
}

.ct-flow-media-layer {
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ct-flow-media-layer img,
.ct-flow-media-layer video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ct-flow-player.is-story .ct-flow-media-layer img,
.ct-flow-player.is-story .ct-flow-media-layer video {
  width: auto;
  max-width: 48%;
  height: 94%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 16px 42px rgba(0,0,0,.58), 0 0 28px rgba(57,255,20,.11);
}

.ct-flow-player.is-landscape .ct-flow-media-layer img,
.ct-flow-player.is-landscape .ct-flow-media-layer video {
  animation: ctFlowBreath 12s ease-in-out infinite alternate;
}

@keyframes ctFlowBreath {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

.ct-flow-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.14) 58%, rgba(0,0,0,.76) 100%);
}

.ct-flow-player.is-story .ct-flow-overlay {
  background:
    linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.26) 43%, transparent 58%, rgba(0,0,0,.12));
}

.ct-flow-brand {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.48);
  border: 1px solid rgba(57,255,20,.23);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.ct-flow-brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ct-green);
  box-shadow: 0 0 12px rgba(57,255,20,.9);
}

.ct-flow-content {
  position: absolute;
  z-index: 7;
  left: 22px;
  right: 22px;
  bottom: 42px;
  max-width: 82%;
  pointer-events: auto;
}

.ct-flow-player.is-story .ct-flow-content {
  top: 50%;
  bottom: auto;
  width: 42%;
  max-width: 42%;
  transform: translateY(-50%);
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(2,5,4,.88), rgba(6,14,10,.66));
  border: 1px solid rgba(57,255,20,.2);
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
}

.ct-flow-category {
  display: inline-flex;
  padding: 6px 10px;
  margin-bottom: 9px;
  border-radius: 999px;
  color: var(--ct-green);
  background: rgba(57,255,20,.1);
  border: 1px solid rgba(57,255,20,.28);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.ct-flow-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.15rem, 2.6vw, 2rem);
  line-height: 1.08;
  text-shadow: 0 3px 14px rgba(0,0,0,.85);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ct-flow-description {
  margin: 9px 0 0;
  color: #d9dedb;
  font-size: clamp(.76rem, 1.4vw, .94rem);
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ct-flow-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 13px;
  padding: 9px 14px;
  border-radius: 12px;
  color: #001508;
  background: var(--ct-green);
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(57,255,20,.2);
  pointer-events: auto;
}

.ct-flow-controls {
  position: absolute;
  z-index: 9;
  left: 18px;
  right: 18px;
  bottom: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.ct-flow-nav {
  display: flex;
  gap: 6px;
}

.ct-flow-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(7px);
}

.ct-flow-button:hover,
.ct-flow-button:focus-visible {
  color: var(--ct-green);
  border-color: rgba(57,255,20,.45);
  outline: none;
}

.ct-flow-progress {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.ct-flow-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00d084, var(--ct-green));
  box-shadow: 0 0 12px rgba(57,255,20,.65);
}

.ct-flow-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.ct-flow-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  cursor: pointer;
}

.ct-flow-dot.is-active {
  width: 20px;
  border-radius: 999px;
  background: var(--ct-green);
  box-shadow: 0 0 10px rgba(57,255,20,.65);
}

.ct-flow-scan {
  position: absolute;
  z-index: 15;
  top: -10%;
  bottom: -10%;
  left: -35%;
  width: 28%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-12deg);
  background: linear-gradient(90deg, transparent, rgba(57,255,20,.08), rgba(235,255,229,.62), rgba(57,255,20,.12), transparent);
  filter: blur(2px);
}

.ct-flow-player.is-transitioning .ct-flow-scan {
  animation: ctFlowScan .66s ease-in-out both;
}

.ct-flow-player.is-transitioning .ct-flow-stage {
  animation: ctFlowPulse .66s ease-in-out both;
}

@keyframes ctFlowScan {
  0% { left: -35%; opacity: 0; }
  18% { opacity: .95; }
  100% { left: 112%; opacity: 0; }
}

@keyframes ctFlowPulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  48% { filter: brightness(.58) saturate(.72) blur(1px); }
  62% { filter: brightness(1.16) saturate(1.18); }
}

.ct-flow-empty,
.ct-flow-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #b9c0bc;
  font-size: 13px;
}

.ct-flow-loading::before {
  content: "";
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--ct-green);
  animation: ctFlowSpin .8s linear infinite;
}

@keyframes ctFlowSpin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .ct-flow-player {
    min-height: 330px;
    aspect-ratio: 4 / 5;
  }

  .ct-flow-player.is-story .ct-flow-media-layer img,
  .ct-flow-player.is-story .ct-flow-media-layer video {
    max-width: 64%;
    height: 58%;
    align-self: start;
    margin-top: 14px;
  }

  .ct-flow-player.is-story .ct-flow-content {
    top: auto;
    bottom: 48px;
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 14px;
  }

  .ct-flow-content {
    left: 15px;
    right: 15px;
    bottom: 48px;
    max-width: none;
  }

  .ct-flow-title {
    font-size: 1.2rem;
  }

  .ct-flow-description {
    font-size: .78rem;
    -webkit-line-clamp: 2;
  }

  .ct-flow-controls {
    left: 12px;
    right: 12px;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-flow-player *,
  .ct-flow-player *::before,
  .ct-flow-player *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
