.stories-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-viewer__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
}

.stories-viewer__container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 420px;
    max-height: 750px;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.stories-viewer__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 12px 12px 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.stories-viewer__progress {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
}

.stories-viewer__progress-segment {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.35);
    border-radius: 1px;
    cursor: pointer;
    overflow: hidden;
}

.stories-viewer__progress-segment--active {
    background: rgba(255,255,255,0.35);
}

.stories-viewer__progress-segment--viewed {
    background: rgba(255,255,255,0.8);
}

.stories-viewer__progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 1px;
}

.stories-viewer__progress-segment--viewed .stories-viewer__progress-fill {
    width: 100%;
}

.stories-viewer__user {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.stories-viewer__user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}

#stories-viewer-user-avatar-link {
    display: flex;
    line-height: 0;
}

.stories-viewer__user-name {
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

.stories-viewer__user-name:hover {
    color: #fff !important;
}

.stories-viewer__user-names {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.stories-viewer__time {
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    margin: 12px 6px 0 auto;
    white-space: nowrap;
}

.stories-viewer__collab-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
}

.stories-viewer__collab-label:hover {
    opacity: 0.85;
}

.stories-collab-label__avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.stories-collab-label__you {
    color: #fff;
}

.stories-collab-label__sep {
    color: rgba(255,255,255,0.7);
    margin: 0 1px;
}

.stories-collab-label__name {
    color: #fff;
}

.stories-collab-label__others {
    color: rgba(255,255,255,0.85);
}

.stories-viewer__menu-wrap {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 8px 0 0;
}

.stories-viewer__sound-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    padding: 10px 0 0 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.stories-viewer__sound-toggle:hover {
    opacity: 1;
}

.stories-viewer__menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-weight: bold;
    letter-spacing: 2px;
}

.stories-viewer__menu-btn:hover {
    opacity: 1;
}

.stories-viewer__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    min-width: 150px;
    z-index: 30;
}

.stories-viewer__dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.stories-viewer__dropdown-item:hover {
    background: rgba(255,255,255,0.1);
}

.stories-viewer__dropdown-item--danger:hover {
    background: rgba(255,71,87,0.2);
    color: #ff4757;
}

.stories-viewer__body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-touch-callout: none;
}

.stories-viewer__content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-viewer-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stories-viewer-item--image {
    background: #000;
}

.stories-viewer-item__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.stories-viewer-item--text {
    padding: 40px 24px;
    box-sizing: border-box;
    text-align: center;
}

.stories-viewer-item__text-content {
    font-size: inherit;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}

.stories-viewer-item__text-content a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}

.stories-viewer-item__text-content a:hover {
    opacity: 1;
}

.stories-viewer-item__text-content p {
    margin: 0;
    padding: 0;
}

.stories-viewer-item__text-content br {
    display: block;
    content: '';
    margin: 4px 0;
}

.stories-viewer-item__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 20px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}

.stories-viewer-item__caption a {
    color: #fff;
    text-decoration: underline;
}

.stories-viewer-item__caption p {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    text-align: center;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.stories-viewer-item--video {
    background: #000;
}

.stories-viewer-item__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    -webkit-touch-callout: none;
}

.stories-viewer-item--error {
    background: #1a1a2e;
    color: #fff;
}

.stories-viewer-item__error {
    text-align: center;
}

.stories-viewer-item__error-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.stories-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.stories-viewer__nav:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-50%) scale(1.1);
}

.stories-viewer__nav--prev {
    left: 12px;
}

.stories-viewer__nav--next {
    right: 12px;
}

.stories-viewer__footer {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 12px;
}

.stories-viewer__reactions {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px 0 2px;
}

.stories-viewer__reactions__btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stories-viewer__reactions__btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.2);
}

.stories-viewer__reactions__btn--active {
    background: rgba(255,255,255,0.25);
    transform: scale(1.15);
}

.stories-viewer__reactions__btn--heart {
    color: #e74c3c;
}

.stories-viewer__reactions__btn--heart:hover {
    color: #ff6b6b;
}

.stories-viewer__reactions__btn--thumbsdown {
    color: #e84393;
}

.stories-viewer__reactions__btn--thumbsdown:hover {
    color: #fd79a8;
}

.stories-viewer__reply {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

.stories-viewer__reply-input {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.stories-viewer__reply-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.stories-viewer__reply-send {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background 0.2s;
}

.stories-viewer__reply-send:hover {
    background: rgba(255,255,255,0.2);
}

.stories-viewer__reply-send:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stories-viewer__views {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 6px 14px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    pointer-events: none;
}

.stories-viewer__views-icon {
    font-size: 15px;
    line-height: 1;
}

.stories-viewer__views-count {
    font-weight: 700;
    line-height: 1;
}

.stories-viewer__most-reacted {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.stories-floating-emojis {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}

.stories-floating-emoji {
    position: absolute;
    bottom: 60px;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform, opacity;
}

.float-vapour {
    animation-name: float-vapour;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

.float-snake {
    animation-name: float-snake;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.float-flame {
    animation-name: float-flame;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes float-vapour {
    0% { opacity: 0; transform: translateY(0) translateX(0) scale(0.5); }
    10% { opacity: 0.8; transform: translateY(-10vh) translateX(-10px) scale(1); }
    40% { opacity: 0.6; transform: translateY(-40vh) translateX(15px) scale(1.1); }
    70% { opacity: 0.3; transform: translateY(-70vh) translateX(-8px) scale(0.9); }
    100% { opacity: 0; transform: translateY(-100vh) translateX(5px) scale(0.5); }
}

@keyframes float-snake {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    15% { opacity: 0.8; transform: translateY(-15vh) translateX(20px); }
    35% { opacity: 0.7; transform: translateY(-35vh) translateX(-18px); }
    55% { opacity: 0.5; transform: translateY(-55vh) translateX(25px); }
    75% { opacity: 0.3; transform: translateY(-75vh) translateX(-12px); }
    100% { opacity: 0; transform: translateY(-100vh) translateX(10px); }
}

@keyframes float-flame {
    0% { opacity: 0; transform: translateY(0) scale(0.3); }
    8% { opacity: 0.9; transform: translateY(-8vh) scale(1.2); }
    25% { opacity: 0.8; transform: translateY(-25vh) translateX(-5px) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50vh) translateX(8px) scale(0.8); }
    100% { opacity: 0; transform: translateY(-100vh) translateX(-3px) scale(0.3); }
}

@media (max-width: 480px) {
    .stories-viewer__container {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

.stories-viewer__smiley {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.stories-viewer__smiley:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.stories-viewer__smiley--has-reactions {
    border-color: #ff6b6b;
    box-shadow: 0 0 12px rgba(255,107,107,0.4);
}

.stories-reactions-arc {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 35;
    pointer-events: none;
}

.stories-reactions-arc--open {
    pointer-events: all;
}

.stories-reactions-arc__btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30,30,50,0.9);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    pointer-events: all;
    opacity: 0;
    transform: scale(0.3);
}

.stories-reactions-arc__btn.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stories-reactions-arc__btn:hover {
    transform: scale(1.2) !important;
    border-color: rgba(255,255,255,0.5);
}

.stories-reactions-arc__btn--active {
    border-color: #ff6b6b;
    box-shadow: 0 0 8px rgba(255,107,107,0.5);
}

.stories-reactions-arc__emoji {
    font-size: 22px;
    line-height: 1;
}

.stories-reactions-arc__count {
    font-size: 9px;
    color: rgba(255,255,255,0.7);
    margin-top: 1px;
    line-height: 1;
}

.stories-reaction-users-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-reaction-users-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
}

.stories-reaction-users-modal__container {
    position: relative;
    width: 85%;
    max-width: 320px;
    max-height: 70%;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.stories-reaction-users-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.stories-reaction-users-modal__header span {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.stories-reaction-users-modal__close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.stories-reaction-users-modal__close:hover {
    color: #fff;
}

.stories-reaction-users-modal__list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.stories-reaction-users-modal__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
}

.stories-reaction-users-modal__user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.stories-reaction-users-modal__username {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}

.stories-reaction-users-modal__username:hover {
    color: #5b9bd5;
    text-decoration: underline;
}

.stories-reaction-clone {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

/* Report Modal */
.stories-report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-report-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.stories-report-modal__container {
    position: relative;
    width: 400px;
    max-width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow: hidden;
}

.stories-report-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f5f6f8;
    border-bottom: 1px solid #e4e6eb;
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
}

.stories-report-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    color: #65676b;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.stories-report-modal__close:hover {
    color: #1c1e21;
}

.stories-report-modal__body {
    padding: 18px;
}

.stories-report-modal__desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: #65676b;
}

.stories-report-modal__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.stories-report-modal__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 13px;
    color: #1c1e21;
}

.stories-report-modal__option:hover {
    background: #f0f2f5;
    border-color: #ccced2;
}

.stories-report-modal__option input[type="radio"] {
    margin: 0;
}

.stories-report-modal__comment {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccced2;
    border-radius: 8px;
    font-size: 13px;
    color: #1c1e21;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

.stories-report-modal__comment:focus {
    border-color: #007adb;
}

.stories-report-modal__error {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fef0ef;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-size: 12px;
    color: #cc0f35;
}

.stories-report-modal__footer {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e4e6eb;
    background: #f5f6f8;
    justify-content: flex-end;
}

.stories-report-modal__submit {
    background: #007adb;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.stories-report-modal__submit:hover {
    background: #0060b3;
}

.stories-report-modal__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.stories-report-modal__cancel {
    background: #e4e6eb;
    color: #1c1e21;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.stories-report-modal__cancel:hover {
    background: #ccced2;
}
