/* ============================================================
   1. БАННЕР
   ============================================================ */
.stories-widget-full {
   width: 100%;
   margin: 10px auto 0px auto;
   background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
   padding: 20px 0 25px 0;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
   overflow: hidden;
   border-radius: 20px;
}

/* ============================================================
   2. ЗАГОЛОВОК
   ============================================================ */
.stories-widget__title {
   text-align: center;
   font-size: 18px;
   font-weight: 900;
   text-transform: uppercase;
   letter-spacing: 2px;
   color: #ffffff;
   text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6); 
   margin-bottom: 15px;
   padding: 0 15px;
   position: relative;
   z-index: 2;
}

/* ============================================================
   3. ОБЕРТКА ДЛЯ СВАЙПА И СТРЕЛОК
   ============================================================ */
.story-container-wrap {
   position: relative;
   width: 100%;
}

.story-container {
   display: flex;
   align-items: flex-start;
   overflow-x: auto;
   padding: 10px 45px;
   gap: 15px;
   position: relative;
   -webkit-overflow-scrolling: touch;
   scrollbar-width: none;
}
.story-container::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

/* ============================================================
   4. КРУЖОК СТОРИС И ТЕКСТ
   ============================================================ */
.story-img {
   position: relative;
   width: 80px;
   height: 80px;
   border-radius: 50%;
   box-sizing: border-box;
   background: transparent;
   overflow: visible; /* Важно для SVG */
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
}

.story-img img {
   width: 66px; /* Аватарка меньше контейнера, чтобы был отступ */
   height: 66px;
   object-fit: cover;
   border-radius: 50%;
   border: 2px solid transparent; /* Прозрачный отступ до кольца */
   box-sizing: border-box;
   display: block;
}

/* Само SVG-кольцо */
.status-ring-svg {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 2;
}

/* Контейнер под аватаркой */
.story-info {
   text-align: center !important;
   white-space: nowrap !important;
   max-width: 80px !important; 
   width: 100% !important;
   text-overflow: ellipsis !important;
   overflow: hidden !important;
   padding-top: 6px;
}

/* Сам текст ника */
.story-username {
   color: #ffffff !important;
   text-align: center !important;
   font-size: 11px;
   font-weight: 600;
   overflow: hidden !important;
   text-overflow: ellipsis !important;
   white-space: nowrap !important;
   display: block;
   width: 100%;
}

/* ============================================================
   5. КНОПКА «ДОБАВИТЬ»
   ============================================================ */
.add-story {
   flex: 0 0 auto;
   width: 80px;
   height: 80px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.1);
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   border: 2px dashed rgba(255, 255, 255, 0.4);
   transition: background 0.2s ease, transform 0.2s ease;
}
.add-story:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.add-story span { font-size: 24px; color: #fff; transition: color 0.2s ease; }
.add-story:hover span { color: #fff; }

/* ============================================================
   6. СТРЕЛКИ ЛИСТАНИЯ
   ============================================================ */
.scroll-btn {
   position: absolute;
   top: 40px;
   transform: translateY(-50%);
   background: rgba(0, 0, 0, 0.4);
   backdrop-filter: blur(4px);
   color: #fff;
   border: none;
   width: 36px;
   height: 36px;
   padding: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   cursor: pointer;
   z-index: 10;
   font-size: 14px;
   line-height: 1;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
   transition: all 0.2s ease;
}
.scroll-btn:hover { background: rgba(0, 0, 0, 0.7); }
.scroll-btn:active { transform: translateY(-50%) scale(0.94); }
.scroll-btn.left  { left: 10px; }
.scroll-btn.right { right: 10px; }

/* ============================================================
   7. ПОЛНОЭКРАННЫЙ ПРОСМОТР
   ============================================================ */
.fullscreen-story {
   display: none;
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.94);
   justify-content: center;
   align-items: center;
   z-index: 999999;
}

.fullscreen-content {
   text-align: center;
   color: #fff;
   max-width: 90%;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 20px;
}

.fullscreen-content img {
   width: 160px;
   height: 160px;
   object-fit: cover;
   border-radius: 50%;
   border: 4px solid #fff;
   box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
   opacity: 0;
   transition: opacity 0.4s ease, transform 0.4s ease;
   transform: scale(0.85);
   cursor: pointer;
}
.fullscreen-content img.active { opacity: 1; transform: scale(1); }
.fullscreen-content img:hover { transform: scale(1.05); opacity: 1; }

.fullscreen-content h2 { font-size: 24px; margin: 0; opacity: 0; transition: opacity 0.4s ease; }
.fullscreen-content h2.active { opacity: 1; }

.fullscreen-content p { font-size: 16px; margin: 0; line-height: 1.5; max-width: 500px; opacity: 0; transition: opacity 0.4s ease; }
.fullscreen-content p.active { opacity: 1; }

.close-btn {
   position: absolute; top: 20px; right: 24px; color: #fff; font-size: 32px;
   cursor: pointer; line-height: 1; transition: opacity 0.2s; z-index: 9999999; user-select: none;
}
.close-btn:hover { opacity: 0.7; }

.read-more-btn {
   background: #007bff; color: #fff; padding: 10px 22px; border-radius: 6px;
   text-decoration: none; font-size: 15px; opacity: 0; transition: opacity 0.4s ease;
}
.read-more-btn:hover { text-decoration: none; color: #fff; background: #0069d9; }
.read-more-btn.active { opacity: 1; }

.nav-btn {
   position: absolute; top: 50%; transform: translateY(-50%);
   background: rgba(0, 0, 0, 0.5); color: #fff; border: none; padding: 12px 14px;
   cursor: pointer; border-radius: 50%; z-index: 9999999; transition: opacity 0.3s ease;
   opacity: 0; font-size: 16px; line-height: 1;
}
.fullscreen-story:hover .nav-btn, .fullscreen-story:active .nav-btn { opacity: 1; }
.nav-btn.left { left: 20px; }
.nav-btn.right { right: 20px; }

.progress-container {
   position: absolute; top: 20px; left: 20px; right: 20px;
   display: flex; gap: 6px; pointer-events: none; z-index: 9999999;
}
.progress-bar {
   flex: 1; height: 5px; background: rgba(255, 255, 255, 0.35);
   overflow: hidden; border-radius: 3px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
.progress-bar .progress {
   height: 100%; width: 0; background: #fff; transition: width 5s linear; border-radius: 3px;
}

.fullscreen-counter {
   position: absolute; top: 38px; left: 50%; transform: translateX(-50%);
   color: rgba(255, 255, 255, 0.92); font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
   background: rgba(0, 0, 0, 0.55); padding: 4px 12px; border-radius: 12px;
   z-index: 9999999; pointer-events: none; white-space: nowrap;
}

.fullscreen-dots {
   position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
   display: flex; gap: 6px; align-items: center; padding: 8px 14px;
   background: rgba(0, 0, 0, 0.5); border-radius: 20px; max-width: 90vw;
   overflow-x: auto; scrollbar-width: none; z-index: 9999999; box-sizing: border-box;
}
.fullscreen-dots::-webkit-scrollbar { display: none; }
.fullscreen-dots .dot {
   width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.35);
   cursor: pointer; transition: all 0.25s ease; flex-shrink: 0; display: block;
}
.fullscreen-dots .dot:hover { background: rgba(255, 255, 255, 0.6); }
.fullscreen-dots .dot.seen { background: rgba(255, 255, 255, 0.7); }
.fullscreen-dots .dot.active { background: #fff; width: 22px; border-radius: 4px; }

/* ============================================================
   8. МОДАЛКА «НОВЫЙ СТАТУС»
   ============================================================ */
.status-modal {
   display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
   z-index: 9999999; align-items: center; justify-content: center; padding: 16px;
}
.status-modal.active { display: flex; }

.status-modal__box {
   background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 440px;
   position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: statusModalIn 0.2s ease;
}
@keyframes statusModalIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.status-modal__box h3 { margin: 0 0 12px; font-size: 18px; color: #111827; }

.status-modal__box textarea {
   width: 100%; min-height: 100px; padding: 10px 12px; border: 1px solid #d1d5db;
   border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical;
   box-sizing: border-box; outline: none; transition: border-color 0.2s;
}
.status-modal__box textarea:focus { border-color: #6366f1; }

.status-modal__close {
   position: absolute; top: 8px; right: 14px; font-size: 24px; color: #9ca3af;
   cursor: pointer; line-height: 1; transition: color 0.2s;
}
.status-modal__close:hover { color: #4b5563; }

.status-modal__submit {
   margin-top: 12px; width: 100%; padding: 10px;
   background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
   color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500;
   cursor: pointer; transition: filter 0.15s;
}
.status-modal__submit:hover { filter: brightness(1.08); }
.status-modal__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.status-modal__msg { margin-top: 10px; font-size: 13px; color: #6b7280; min-height: 18px; text-align: center; }

/* ============================================================
   9. АДАПТИВ
   ============================================================ */
@media (max-width: 776px) {
   .stories-widget-full { padding: 15px 0 30px 0 !important; }
   .stories-widget__title { font-size: 14px; letter-spacing: 1px; margin-bottom: 10px; }
   .story-container { padding: 10px 40px 15px 40px !important; gap: 10px; }
   
   /* Уменьшаем контейнер для мобилки */
   .story, .add-story { width: 64px; height: 64px; }
   
   /* Идеальные пропорции для 64px (66px было от 80px) */
   .story-img { width: 64px; height: 64px; }
   .story-img img { width: 52px; height: 52px; }

   .story-info { max-width: 64px; padding-top: 4px; }
   .story-username { font-size: 10px; }
   .add-story span { font-size: 20px; }
   .scroll-btn { top: 32px; width: 30px; height: 30px; font-size: 12px; }
   .scroll-btn.left { left: 5px; }
   .scroll-btn.right { right: 5px; }

   .nav-btn { opacity: 0.7 !important; background: rgba(0, 0, 0, 0.5) !important; }

   .fullscreen-content img { width: 120px; height: 120px; }
   .fullscreen-content h2 { font-size: 20px; }
   .fullscreen-content p  { font-size: 14px; }
   .read-more-btn { font-size: 14px; padding: 8px 16px; }
   .fullscreen-counter { font-size: 11px; top: 34px; padding: 3px 10px; }
   .fullscreen-dots    { bottom: 16px; padding: 6px 10px; gap: 5px; }
   .fullscreen-dots .dot.active { width: 18px; }
   .status-modal__box { padding: 18px; }
   .status-modal__box h3 { font-size: 16px; }
}

/* ============================================================
   10. ПРОСМОТРЫ
   ============================================================ */
.status-views-container {
   position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%);
   background: rgba(0, 0, 0, 0.65); color: #e5e7eb; padding: 8px 16px; border-radius: 20px;
   font-size: 13px; font-weight: 500; z-index: 9999999; display: flex; align-items: center; gap: 6px;
   opacity: 0; pointer-events: none; transition: opacity 0.4s ease; backdrop-filter: blur(4px);
}
.status-views-container.active { opacity: 1; }

@media (max-width: 776px) {
   .status-views-container { bottom: 60px; font-size: 12px; padding: 6px 12px; }
}