.dope-video-gallery {
  --dg-card-bg: transparent;
  --dg-border: transparent;
  --dg-title: #111827;
  --dg-subtitle: #4b5563;
  --dg-accent: #ef4444;
  --dg-gap: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dg-gap);
}

.dope-video-gallery--featured {
  display: flex;
  flex-direction: column;
}

.dope-video-featured-shell {
  --dg-side-card-min-height: 155px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  min-height: calc((3 * var(--dg-side-card-min-height)) + (2 * var(--dg-gap)));
  gap: var(--dg-gap);
  align-items: stretch;
}

.dope-video-sidebar {
  display: grid;
  grid-template-rows: repeat(3, minmax(var(--dg-side-card-min-height), 1fr));
  gap: var(--dg-gap);
  min-height: 100%;
}

.dope-video-extras-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dg-gap);
}

.dope-video-card {
  background: var(--dg-card-bg);
  border: 1px solid var(--dg-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.dope-video-card.is-selected {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.dope-video-thumb-wrap {
  position: relative;
  background: #f3f4f6;
}

.dope-video-gallery button.dope-video-thumb {
  all: unset;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 100%;
  display: block;
  border: 0 !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  text-decoration: none;
  background: #111827 !important;
  color: inherit;
  box-shadow: none !important;
  outline: none;
  border-radius: 0 !important;
}

.dope-video-gallery button.dope-video-thumb::before,
.dope-video-gallery button.dope-video-thumb::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
}

.dope-video-gallery button.dope-video-thumb:hover,
.dope-video-gallery button.dope-video-thumb:focus,
.dope-video-gallery button.dope-video-thumb:focus-visible,
.dope-video-gallery button.dope-video-thumb:active {
  border: 0 !important;
  background: #111827 !important;
  color: inherit;
  text-decoration: none;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.dope-video-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.dope-video-thumb:hover img,
.dope-video-thumb:focus img {
  opacity: 1;
}

.dope-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 44px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background-color: var(--dg-accent);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
}

.dope-video-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #ffffff;
}

.dope-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.dope-video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.dope-video-thumb-static {
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
}

.dope-video-invalid-label {
  font-size: 14px;
  line-height: 1.4;
  color: #6b7280;
  padding: 0 12px;
  text-align: center;
}

.dope-video-content {
  padding: 16px;
}

.dope-video-label {
  display: inline-flex;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dg-accent);
}

.dope-video-title {
  margin: 0 0 8px;
  color: var(--dg-title);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.dope-video-subtitle {
  margin: 0;
  color: var(--dg-subtitle);
  font-size: 15px;
  line-height: 1.65;
}

.dope-video-label.is-hidden,
.dope-video-title.is-hidden,
.dope-video-subtitle.is-hidden {
  display: none;
}

.dope-video-featured {
  position: relative;
  border-radius: 20px;
  min-height: 100%;
}

.dope-video-featured .dope-video-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.dope-video-featured.is-active .dope-video-thumb-wrap::after {
  display: none;
}

.dope-video-featured .dope-video-thumb img,
.dope-video-featured .dope-video-thumb-static {
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
}

.dope-video-featured .dope-video-thumb,
.dope-video-featured .dope-video-thumb-wrap {
  height: 100%;
}

.dope-video-featured .dope-video-player {
  height: 100%;
  aspect-ratio: auto;
}

.dope-video-featured .dope-video-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.65) 55%,
    rgba(0, 0, 0, 0.9) 100%
  );
  pointer-events: none;
}

.dope-video-featured.is-active .dope-video-featured-content {
  display: none;
}

.dope-video-featured .dope-video-label {
  background: var(--dg-accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 12px;
}

.dope-video-featured .dope-video-title {
  color: #ffffff;
  font-size: clamp(24px, 2.4vw, 46px);
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(2, 6, 23, 0.4);
}

.dope-video-featured .dope-video-subtitle {
  color: #e5e7eb;
  font-size: clamp(15px, 1.1vw, 30px);
  text-shadow: 0 2px 20px rgba(2, 6, 23, 0.4);
}

.dope-video-side-card {
  display: flex;
  align-items: stretch;
}

.dope-video-side-card .dope-video-thumb-wrap {
  flex: 0 0 42%;
  max-width: 42%;
}

.dope-video-side-card .dope-video-thumb img,
.dope-video-side-card .dope-video-thumb-static {
  height: 100%;
  min-height: 155px;
  aspect-ratio: auto;
}

.dope-video-side-card .dope-video-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dope-video-side-card .dope-video-title {
  margin-bottom: 6px;
  font-size: 24px;
}

.dope-video-side-card .dope-video-subtitle {
  font-size: 15px;
  line-height: 1.4;
}

.dope-video-extra-card .dope-video-title {
  font-size: 18px;
}

.dope-video-gallery--mixed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.dope-video-gallery--mixed .dope-mixed-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.dope-video-gallery--mixed .dope-video-thumb-wrap {
  border-radius: 0;
  overflow: hidden;
  background: #111827;
}

.dope-video-gallery--mixed .dope-video-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 1;
}

.dope-video-gallery--mixed .dope-video-content {
  padding: 14px 4px 0;
}

.dope-video-gallery--mixed .dope-video-title {
  margin: 0;
  font-size: clamp(28px, 2.2vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dope-video-gallery--mixed .dope-video-subtitle {
  margin-top: 8px;
}

.dope-video-gallery--mixed .dope-video-label {
  margin-bottom: 8px;
}

.dope-video-gallery--masonry {
  --dg-masonry-columns: 3;
  --dg-masonry-gap: 16px;
  display: block;
  column-count: var(--dg-masonry-columns);
  column-gap: var(--dg-masonry-gap);
}

.dope-video-gallery--masonry .dope-video-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--dg-masonry-gap);
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.dope-video-gallery--masonry .dope-video-thumb-wrap {
  border-radius: 0;
  overflow: hidden;
}

.dope-video-gallery--masonry .dope-video-content {
  display: none;
}

.dope-video-gallery--masonry .dope-video-thumb img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
}

.dope-video-gallery--masonry .dope-video-thumb-static,
.dope-video-gallery--masonry .dope-video-post-placeholder {
  min-height: 180px;
}

.dope-card--video .dope-video-play {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #ff2d2d;
}

.dope-card--video .dope-video-play::before {
  border-top-width: 8px;
  border-bottom-width: 8px;
  border-left-width: 13px;
}

.dope-video-post-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dope-mixed-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.dope-mixed-modal.is-open {
  display: block;
}

.dope-mixed-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.84);
}

.dope-mixed-modal__dialog {
  position: relative;
  max-width: min(1100px, calc(100% - 40px));
  margin: 44px auto;
  z-index: 2;
}

.dope-mixed-modal__content {
  background: #000000;
}

.dope-mixed-modal__content .dope-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.dope-mixed-modal__image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  background: #000000;
}

.dope-mixed-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
}

@media (max-width: 1024px) {
  .dope-video-gallery:not(.dope-video-gallery--featured) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dope-video-featured-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dope-video-sidebar {
    grid-template-rows: none;
    min-height: 0;
  }

  .dope-video-featured .dope-video-thumb-wrap,
  .dope-video-featured .dope-video-thumb,
  .dope-video-featured .dope-video-player {
    height: auto;
  }

  .dope-video-featured .dope-video-thumb img,
  .dope-video-featured .dope-video-thumb-static,
  .dope-video-featured .dope-video-player {
    min-height: 360px;
    aspect-ratio: 16 / 9;
  }

  .dope-video-gallery--mixed .dope-video-title {
    font-size: clamp(24px, 5vw, 42px);
  }

  .dope-video-gallery--masonry {
    --dg-masonry-columns: 2;
  }
}

@media (max-width: 767px) {
  .dope-video-gallery:not(.dope-video-gallery--featured) {
    grid-template-columns: 1fr;
  }

  .dope-video-featured .dope-video-content {
    padding: 18px;
  }

  .dope-video-featured .dope-video-title {
    font-size: 28px;
  }

  .dope-video-featured .dope-video-subtitle {
    font-size: 15px;
  }

  .dope-video-side-card {
    flex-direction: column;
  }

  .dope-video-side-card .dope-video-thumb-wrap {
    flex-basis: auto;
    max-width: none;
  }

  .dope-video-side-card .dope-video-thumb img,
  .dope-video-side-card .dope-video-thumb-static {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .dope-video-gallery--mixed .dope-video-title {
    font-size: clamp(32px, 10vw, 46px);
  }

  .dope-video-gallery--masonry {
    --dg-masonry-columns: 1;
  }

  .dope-mixed-modal__dialog {
    max-width: calc(100% - 20px);
    margin: 56px auto;
  }
}
