/* Stories — VK Style */
.stories-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0 10px 0;
  margin: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: none;
}
.stories-container::-webkit-scrollbar { display: none; }

/* Элемент статуса */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  width: 68px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.story-item:hover { transform: scale(1.05); }

/* Кольцо с градиентом */
.story-ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  position: relative;
}
.story-ring.viewed {
  background: #333;
}

/* Аватарка внутри */
.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #0a0e14;
}

/* Имя */
.story-name {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}

/* Кнопка Добавить */
.story-item.story-add .story-ring {
  background: transparent;
  border: 2px dashed #333;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-item.story-add .plus-icon {
  font-size: 26px;
  color: #64748b;
}

/* Плеер */
.stories-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  flex-direction: column;
}
.stories-overlay.active { display: flex; }

.viewer-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 15px;
  z-index: 10;
}
.progress-bars {
  display: flex;
  gap: 3px;
  height: 3px;
}
.progress-bar-bg {
  flex: 1;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  border-radius: 2px;
  transition: width 5s linear;
}

.viewer-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.viewer-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background-size: cover;
}
.viewer-user-name {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.viewer-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.viewer-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.click-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  z-index: 5;
}
.zone-left { left: 0; }
.zone-right { right: 0; }

.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 20;
}

.story-caption {
  position: absolute;
  bottom: 40px;
  left: 20px; right: 20px;
  font-size: 15px;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
@media (max-width: 768px) {
  .stories-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}