/* =================================================== DICE – Instagram Stories viewer =================================================== */ /* ===== OUTER WRAPPER (full-screen centering) ===== */ .stories-viewer-wrapper { position: fixed; inset: 0; background: #000; display: flex; justify-content: center; z-index: 2; } /* ===== VIEWER – phone-frame container ===== */ .stories-viewer { position: relative; width: 100%; max-width: 430px; height: 100vh; height: 100dvh; background: #111; overflow: hidden; } /* ===== SLIDES CONTAINER ===== */ .stories-slides { position: absolute; inset: 0; } /* ===== INDIVIDUAL STORY SLIDE ===== */ .stories-slide { position: absolute; inset: 0; width: 100%; height: 100%; display: none; overflow: hidden; background: #1a1a2e; /* fallback colour when no image and no gradient */ } .stories-slide.active { display: block; } /* Gradient overlay: readable header + footer, transparent middle */ .stories-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient( to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.10) 20%, rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0.55) 80%, rgba(0, 0, 0, 0.75) 100% ); z-index: 2; pointer-events: none; } /* ===== END SLIDE ===== */ .stories-end-slide { position: absolute; inset: 0; display: none; background: #111; z-index: 2; } .stories-end-slide.active { display: flex !important; flex-direction: column; align-items: center; justify-content: center; } .stories-end-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem; gap: 4px; } /* ===== BACKGROUND MEDIA ===== */ /* Blurred, slightly over-scaled copy that fills the letterbox area */ .stories-bg-blur { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(18px); z-index: 0; opacity: 0.75; } /* Sharp foreground image – shown in full without cropping */ .stories-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; } .stories-bg-color { position: absolute; inset: 0; z-index: 0; } /* ===== TEXT CAPTION (above the bottom bar) ===== */ .stories-caption { position: absolute; bottom: 80px; left: 0; right: 0; padding: 0 16px; z-index: 3; pointer-events: none; } .stories-caption-text { color: #fff; font-size: 15px; line-height: 1.55; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85); margin: 0; word-wrap: break-word; } /* ===== TOP OVERLAY (progress bar + author) ===== */ .stories-top-overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: 12px 12px 0; padding-top: max(12px, env(safe-area-inset-top)); pointer-events: none; /* tap zones sit below and handle input */ } /* ===== PROGRESS BAR ===== */ .stories-progress-track { display: flex; gap: 3px; width: 100%; margin-bottom: 10px; } .stories-segment { flex: 1; min-width: 0; height: 2.5px; background: rgba(255, 255, 255, 0.35); border-radius: 2px; overflow: hidden; } .stories-segment-fill { height: 100%; background: #fff; width: 0%; border-radius: 2px; } /* ===== AUTHOR ROW ===== */ .stories-header-row { display: flex; align-items: center; padding-bottom: 8px; } .stories-avatar-wrap { width: 34px; height: 34px; flex-shrink: 0; } .stories-avatar-wrap img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.85); display: block; } .stories-avatar-icon { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; } .stories-author-name { font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); line-height: 1.2; margin-left: 8px; } .stories-author-time { font-size: 11px; color: rgba(255, 255, 255, 0.7); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); margin-left: 8px; } /* ===== TAP ZONES ===== */ .stories-tap { position: absolute; top: 0; bottom: 0; z-index: 9; cursor: pointer; } .stories-tap-prev { left: 0; width: 35%; } .stories-tap-next { right: 0; width: 65%; } /* ===== BOTTOM OVERLAY (reply + heart) ===== */ .stories-bottom-overlay { position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; padding: 12px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); gap: 12px; pointer-events: all; } .stories-reply-input { flex: 1; min-width: 0; background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.65); border-radius: 24px; padding: 10px 16px; color: #fff; font-size: 14px; outline: none; transition: border-color 0.2s ease; /* ensure taps don't bubble to tap zone beneath */ pointer-events: all; position: relative; z-index: 11; } .stories-reply-input::placeholder { color: rgba(255, 255, 255, 0.55); } .stories-reply-input:focus { border-color: rgba(255, 255, 255, 0.9); } .stories-heart-btn { background: none; border: none; padding: 4px; cursor: pointer; line-height: 1; flex-shrink: 0; transition: transform 0.15s ease; position: relative; z-index: 11; } .stories-heart-btn:active { transform: scale(1.25); } .stories-heart-icon { font-size: 28px; color: #fff; transition: color 0.15s ease; } .stories-heart-icon.bi-heart-fill { color: #ff3040; }