/*
 * GOLPOOGRO - Component: Cinematic Story Viewer Modal Overlay
 * Netflix-level blur backdrop, floating control triggers, and rich interactive layouts
 */

.story-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 9, 20, 0.9);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Central Cinematic Pod */
.story-viewer-pod {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 840px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #040914;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-viewer-overlay.active .story-viewer-pod {
  transform: scale(1);
}

/* Media/Content Stage */
.story-viewer-stage {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.story-viewer-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-cinematic);
}

/* Animated text, quotes overlays */
.story-viewer-overlay-text {
  position: absolute;
  inset: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  z-index: 5;
  pointer-events: none;
}

.story-viewer-quote {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  font-style: italic;
  text-shadow: 0 4px 15px rgba(0,0,0,0.8);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-viewer-caption {
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  max-width: 85%;
  margin: 0 auto;
}

/* Header controller overlap */
.story-viewer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to bottom, rgba(4,9,20,0.85) 0%, rgba(4,9,20,0) 100%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: auto;
}

.story-viewer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.story-viewer-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.story-viewer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  object-fit: cover;
}

.story-viewer-username {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.story-viewer-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Right header utilities */
.story-viewer-utils {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.story-viewer-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.story-viewer-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Navigation Touch Tabs */
.story-nav-lane {
  position: absolute;
  top: 60px;
  bottom: 80px;
  width: 25%;
  z-index: 8;
  cursor: pointer;
}

.story-nav-lane.left { left: 0; }
.story-nav-lane.right { right: 0; }

/* Interactive Footer & Actions */
.story-viewer-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(4,9,20,0.9) 0%, rgba(4,9,20,0) 100%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.story-viewer-reply-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.story-viewer-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 0.85rem;
  color: #fff;
  outline: none;
  transition: all 0.3s;
}

.story-viewer-input:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.12);
}

/* Emoji Tray Quick Reaction */
.story-viewer-emojis {
  display: flex;
  justify-content: space-around;
  padding: 4px;
  background: rgba(16, 22, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reaction-emoji-btn {
  font-size: 1.25rem;
  padding: 4px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-emoji-btn:hover {
  transform: scale(1.3) rotate(-5deg);
}

/* Music indicator */
.story-music-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: #60a5fa;
  align-self: flex-start;
  animation: floatMusic 3s ease-in-out infinite;
}

@keyframes floatMusic {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 520px) {
  .story-viewer-pod {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}
