/**
 * GenZ Talks - Web Stories Frontend Styles
 * Instagram & WhatsApp Status Style Circular Stories + Fullscreen Story Viewer
 */

/* ==========================================================================
   1. CIRCULAR STORIES BAR (Between Menu Bar & Breaking News Ticker)
   ========================================================================== */
.genz-web-stories-container {
  width: 100%;
  margin: 12px 0 16px 0;
  padding: 0;
  position: relative;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Telugu', sans-serif;
}

.genz-stories-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.genz-stories-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.genz-stories-icon {
  color: #ff9800;
  font-size: 19px;
  line-height: 1;
  animation: genz-pulse-glow 2s infinite ease-in-out;
}

@keyframes genz-pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 152, 0, 0.4)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.8)); }
}

.genz-stories-heading {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.3px;
}

body.dark-mode .genz-stories-heading {
  color: #f8fafc;
}

/* Horizontal Track */
.genz-stories-track-wrapper {
  position: relative;
  width: 100%;
}

.genz-stories-track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 10px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.genz-stories-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Individual Circular Story Item */
.genz-story-item {
  flex: 0 0 auto;
  width: 102px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.genz-story-item:hover {
  transform: translateY(-3px);
}

/* Vibrant Instagram / WhatsApp Status Ring */
.genz-story-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
  transition: all 0.25s ease;
  position: relative;
}

.genz-story-item:hover .genz-story-ring {
  box-shadow: 0 6px 18px rgba(220, 39, 67, 0.45);
  transform: scale(1.04);
}

.genz-story-ring.seen {
  background: #cbd5e1;
  box-shadow: none;
}

body.dark-mode .genz-story-ring.seen {
  background: #475569;
}

.genz-story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
  transition: border-color 0.2s;
}

body.dark-mode .genz-story-avatar-img {
  border-color: #0f172a;
  background: #1e293b;
}

/* Story Title / Caption */
.genz-story-caption {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 7px;
  line-height: 1.3;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  transition: color 0.15s;
}

body.dark-mode .genz-story-caption {
  color: #e2e8f0;
}

.genz-story-item:hover .genz-story-caption {
  color: #dc2626;
}

/* ==========================================================================
   2. FULLSCREEN STORY VIEWER (WhatsApp Status / Instagram Story Style)
   ========================================================================== */
.genz-story-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.genz-story-modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Story Frame Card */
.genz-story-modal-card {
  width: 100%;
  max-width: 440px;
  height: 92vh;
  max-height: 820px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background: #080a0f;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(230, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .genz-story-modal-card {
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

/* Top Progress Bars (WhatsApp / IG segments) */
.genz-story-progress-bar-row {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 50;
}

.genz-story-progress-segment {
  flex: 1;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  overflow: hidden;
}

.genz-story-progress-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 4px;
  transition: width 0.1s linear;
}

.genz-story-progress-segment.completed .genz-story-progress-fill {
  width: 100% !important;
}

/* Story Header (Author + Timestamp + Close) */
.genz-story-modal-header {
  position: absolute;
  top: 26px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.genz-story-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.genz-story-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
  background: #1e293b;
}

.genz-story-author-meta {
  display: flex;
  flex-direction: column;
}

.genz-story-author-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.genz-story-timestamp {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.genz-story-close-btn {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.genz-story-close-btn:hover {
  background: rgba(220, 38, 38, 0.85);
  transform: scale(1.1);
}

/* Slide Content Body */
.genz-story-slide-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  background: #090c12;
}

.genz-story-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Top & Bottom Shading Gradients */
.genz-story-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.genz-story-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* Bottom Text Overlay */
.genz-story-bottom-overlay {
  position: absolute;
  bottom: 24px;
  left: 18px;
  right: 18px;
  z-index: 40;
}

.genz-story-tag-pill {
  display: inline-block;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
}

.genz-story-slide-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.genz-story-slide-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.genz-story-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}

.genz-story-read-link:hover {
  background: #ffffff;
  color: #0f172a;
}

/* Left & Right Tap Zones for Navigation */
.genz-story-tap-zone {
  position: absolute;
  top: 70px;
  bottom: 140px;
  z-index: 30;
  cursor: pointer;
}

.genz-story-tap-prev {
  left: 0;
  width: 35%;
}

.genz-story-tap-next {
  right: 0;
  width: 65%;
}

/* Desktop Arrow Controls */
.genz-story-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 99999;
  transition: all 0.2s;
  outline: none;
}

.genz-story-arrow-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-50%) scale(1.1);
}

.genz-story-arrow-prev {
  left: -65px;
}

.genz-story-arrow-next {
  right: -65px;
}

@media (max-width: 640px) {
  .genz-story-arrow-btn {
    display: none;
  }
}
