.sneak-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  visibility: hidden;
}
.sneak-modal.open {
  pointer-events: all;
  visibility: visible;
}

.sneak-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 10, 0.85);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.sneak-modal.open .sneak-modal-backdrop { opacity: 1; }

.sneak-modal-window {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  background: #0e0d14;
  border: 1px solid rgba(155, 92, 246, 0.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(155, 92, 246, 0.1);
  opacity: 0;
  transform: scale(0.88) translateY(32px);
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center bottom;
}
.sneak-modal.open .sneak-modal-window {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.sneak-modal.closing .sneak-modal-backdrop { opacity: 0; }
.sneak-modal.closing .sneak-modal-window {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
}

.sneak-modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
  gap: 1rem;
}

.sneak-modal-titlebar-left,
.sneak-modal-titlebar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
}
.sneak-modal-titlebar-right { justify-content: flex-end; }

.sneak-modal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sneak-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
  border: none;
  padding: 0;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.sneak-dot--close {
  background: #ff5f57;
  cursor: pointer;
  color: rgba(0,0,0,0);
  transition: color 0.15s ease, filter 0.2s ease;
}
.sneak-dot--close:hover { color: rgba(0,0,0,0.6); filter: brightness(1.15); }
.sneak-dot--min  { background: #febc2e; opacity: 0.5; cursor: default; }
.sneak-dot--max  { background: #28c840; opacity: 0.5; cursor: default; }
.sneak-modal-dots:hover .sneak-dot--min,
.sneak-modal-dots:hover .sneak-dot--max { opacity: 0.8; }

.sneak-modal-tag {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(155, 92, 246, 0.1);
  border: 1px solid rgba(155, 92, 246, 0.2);
  border-radius: 99px;
  padding: .15rem .55rem;
}

.sneak-modal-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: rgba(240, 240, 248, 0.45);
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.sneak-modal-status {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(239, 68, 68, 0.7);
}
.sneak-modal-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #ef4444;
  animation: blink .7s step-end infinite;
}

.sneak-modal-body {
  display: flex;
  flex-direction: column;
}

.sneak-modal-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080710;
  overflow: hidden;
}

.sneak-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.sneak-modal-img.loaded { opacity: 1; }

.sneak-modal-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  background: linear-gradient(135deg, rgba(155,92,246,.05) 0%, rgba(192,57,159,.03) 100%);
}
.sneak-modal-placeholder svg { color: rgba(155, 92, 246, 0.3); }
.sneak-modal-placeholder p {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: rgba(240, 240, 248, 0.45);
  letter-spacing: .04em;
}
.sneak-modal-placeholder span {
  font-size: .7rem;
  color: rgba(240, 240, 248, 0.22);
  font-family: var(--font-mono);
}
.sneak-modal-placeholder.hidden { display: none; }

.sneak-modal-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.04) 2px,
    rgba(0,0,0,.04) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.sneak-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
  gap: 1rem;
}
.sneak-modal-footer-info {
  display: flex;
  align-items: center;
  gap: .625rem;
}
.sneak-modal-footer-tag {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.sneak-modal-footer-title {
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
}
.sneak-modal-footer-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sneak-modal-meta-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .08em;
  color: rgba(240, 240, 248, 0.25);
}

.sneakpeak-card { cursor: pointer; }

.sneakpeak-card.opening {
  animation: cardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cardPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@media (max-width: 640px) {
  .sneak-modal { padding: 0; align-items: flex-end; }
  .sneak-modal-window {
    width: 100%;
    border-radius: 14px 14px 0 0;
    transform: scale(1) translateY(100%);
  }
  .sneak-modal.open .sneak-modal-window { transform: scale(1) translateY(0); }
  .sneak-modal.closing .sneak-modal-window { transform: scale(1) translateY(100%); }
  .sneak-modal-footer-meta { display: none; }
  .sneak-modal-title { max-width: 120px; }
}