/* ============================================================
   SeickaLAB — Instagram Story Viewer Lightbox
   Aspect Ratio: 9 / 16 · Authentic Minimalist Instagram Stories
   ============================================================ */

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.story-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.story-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.story-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  height: min(680px, 90vh);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #0b0b0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(216, 158, 40, 0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

.story-modal.is-open .story-card {
  transform: scale(1) translateY(0);
}

/* ---------- Progress Bars ---------- */
.story-progress-bars {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 6px;
}

.story-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.story-bar-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 999px;
  transition: width 0.05s linear;
}

.story-bar-track.completed .story-bar-fill {
  width: 100% !important;
}

/* ---------- Header ---------- */
.story-header {
  position: absolute;
  top: 26px;
  left: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.story-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: url("assets/seickalab-avatar.png") center / cover no-repeat;
  border: 1.5px solid #d89e28;
}

.story-author-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.story-author-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.story-time-ago {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.story-close-btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}

.story-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

/* ---------- Slides ---------- */
.story-slides {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.story-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
}

.story-slide.active {
  opacity: 1;
  visibility: visible;
}

.story-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
}

.story-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 14, 0.6) 0%,
    rgba(11, 11, 14, 0.05) 30%,
    rgba(11, 11, 14, 0.05) 70%,
    rgba(11, 11, 14, 0.75) 100%
  );
}

/* Subtle Realistic Stickers */
.story-slide-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.story-sticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 11, 14, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f4efe6;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: rotate(-1.5deg);
}

.story-ig-link-sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0b0b0e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.8);
  transform: rotate(2deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  margin-top: auto;
  margin-bottom: 2rem;
}

.story-ig-link-sticker:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
}

.story-link-icon {
  font-size: 1rem;
}

/* ---------- Touch Navigation Zones ---------- */
.story-nav-zone {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 45%;
  z-index: 5;
  cursor: pointer;
}

.zone-left { left: 0; }
.zone-right { right: 0; }

/* Interactive avatar pulse */
.avatar-story-trigger {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s;
}

.avatar-story-trigger:hover,
.avatar-story-trigger:focus-visible {
  transform: translateY(6px) scale(1.06);
  filter: drop-shadow(0 0 12px rgba(216, 158, 40, 0.5));
}
