@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.bacajuga-wrap {
  width: 100%;
  margin: 36px 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  container-type: inline-size;
}

.bj-divider {
  height: 1px;
  background: #e5e7eb;
  border: none;
  display: block;
}
.bacajuga-label + .bj-divider { margin-bottom: 14px; }
.bj-dots + ul + .bj-divider,
.bj-dots + .bj-divider { margin-top: 14px; }

.bacajuga-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
  padding-left: 2px;
}

.bacajuga-viewport {
  position: relative;
  overflow: hidden;
  padding: 6px 0 18px;
}

.bacajuga-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  will-change: transform;
  padding-bottom: 2px;
}
.bacajuga-track::-webkit-scrollbar { display: none; }
.bacajuga-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.bj-card {
  flex: 0 0 min(340px, 82vw);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bj-card-bg, #1a1f00);
  border-radius: 40px;
  padding: 10px 18px 10px 10px;
  min-height: 72px;
  text-decoration: none !important;
  color: inherit;
  scroll-snap-align: start;
  transition: background .18s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(229,255,17,.08);
  user-select: none;
}
.bj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(229,255,17,.04);
  opacity: 0;
  transition: opacity .18s;
}
.bj-card:hover::before,
.bj-card:focus-visible::before { opacity: 1; }
.bj-card:focus-visible { outline: 2px solid rgba(229,255,17,.6); outline-offset: 2px; }
.bj-card:active { transform: scale(.98); }

.bj-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  overflow: visible;
  background: #252c00;
  position: relative;
  z-index: 1;
}
.bj-thumb-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.bj-thumb-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bj-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.bj-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bj-title {
  display: -webkit-box;
  font-size: 13px;
  font-weight: 700;
  color: var(--bj-title-color, #e5ff11);
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
}
.bj-excerpt {
  display: -webkit-box;
  font-size: 11px;
  color: rgba(255,255,255,.45);
  line-height: 1.4;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
}

.bj-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(229,255,17,.7);
  transition: transform .18s;
}
.bj-card:hover .bj-arrow { transform: translateX(3px); }
.bj-arrow svg { width: 14px; height: 14px; }

.bj-mobile-stack .bacajuga-viewport { overflow: visible; }
.bj-mobile-stack .bacajuga-track    { overflow: visible; cursor: default; }
.bj-mobile-stack .bj-card           { scroll-snap-align: unset; will-change: transform, opacity; touch-action: none; }

.bj-dots-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 4px;
  filter: url(#bj-gooey);
}
.bj-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bj-dot {
  height: 6px;
  width: 20px;
  border-radius: 99px;
  background: rgba(0,0,0,0.32);
  transition: width .5s cubic-bezier(0.34,1.5,0.64,1),
              background .3s;
  flex-shrink: 0;
}

.bj-dot-active {
  width: 6px;
  background: rgba(0,0,0,0.62);
}

[data-theme="dark"] .bj-dot {
  background: rgba(255,255,255,0.28);
}
[data-theme="dark"] .bj-dot-active {
  background: rgba(255,255,255,0.75);
}

@container (min-width: 600px) {
  .bacajuga-viewport { display: none; }
  .bj-dots           { display: none; }

  .bacajuga-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 0;
    list-style: none;
  }
  .bacajuga-list-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
  }
  .bj-star {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    color: #d97706;
    position: relative;
    top: 1px;
  }

  .bacajuga-viewport::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to left, var(--bj-page-bg, #fff) 0%, transparent 100%);
    pointer-events: none;
  }

  .bj-card { flex: 0 0 300px; }

  .bacajuga-list-item a {
    background: linear-gradient(
      90deg,
      #374151 0%,
      #374151 38%,
      #b86e14 49%,
      #c8d800 51%,
      #374151 62%,
      #374151 100%
    );
    background-size: 500% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
    font-weight: 500;
    animation: bj-aurora linear infinite;
  }
  .bacajuga-list-item a:hover { opacity: .75; }
  .bacajuga-list-item:nth-child(1) a { animation-duration: 90s;  animation-delay:   0s; }
  .bacajuga-list-item:nth-child(2) a { animation-duration: 120s; animation-delay: -47s; }
  .bacajuga-list-item:nth-child(3) a { animation-duration: 105s; animation-delay: -73s; }
  .bacajuga-list-item:nth-child(4) a { animation-duration: 135s; animation-delay: -29s; }
  .bacajuga-list-item:nth-child(5) a { animation-duration: 115s; animation-delay: -88s; }
  .bacajuga-list-item:nth-child(6) a { animation-duration: 98s;  animation-delay: -61s; }

  [data-theme="dark"] .bacajuga-list-item a {
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.80) 0%,
      rgba(255,255,255,0.80) 38%,
      #b86e14 49%,
      #c8d800 51%,
      rgba(255,255,255,0.80) 62%,
      rgba(255,255,255,0.80) 100%
    );
    background-size: 500% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: bj-aurora linear infinite;
  }
  [data-theme="dark"] .bacajuga-list-item:nth-child(1) a { animation-duration: 90s;  animation-delay:   0s; }
  [data-theme="dark"] .bacajuga-list-item:nth-child(2) a { animation-duration: 120s; animation-delay: -47s; }
  [data-theme="dark"] .bacajuga-list-item:nth-child(3) a { animation-duration: 105s; animation-delay: -73s; }
  [data-theme="dark"] .bacajuga-list-item:nth-child(4) a { animation-duration: 135s; animation-delay: -29s; }
  [data-theme="dark"] .bacajuga-list-item:nth-child(5) a { animation-duration: 115s; animation-delay: -88s; }
  [data-theme="dark"] .bacajuga-list-item:nth-child(6) a { animation-duration: 98s;  animation-delay: -61s; }

  @media (prefers-reduced-motion: reduce) {
    .bacajuga-list-item a,
    [data-theme="dark"] .bacajuga-list-item a {
      animation: none !important;
      background: none !important;
      -webkit-text-fill-color: unset !important;
    }
    .bacajuga-list-item a { color: #374151 !important; }
    [data-theme="dark"] .bacajuga-list-item a { color: rgba(255,255,255,.88) !important; }
  }
}

@container (max-width: 599px) {
  .bacajuga-list { display: none; }
}

@keyframes bj-aurora {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

[data-theme="dark"] .bj-divider {
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] .bacajuga-label {
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .bj-dot {
  background: rgba(255,255,255,0.2);
}

[data-theme="default"] .bj-divider  { background: #e5e7eb; }
[data-theme="default"] .bacajuga-label { color: #6b7280; }
