﻿:root {
    --brand: #00ed3b; /* destaque */
    --bg: #0b0f10; /* fundo escuro elegante */
    --card: #12181a; /* cartões */
    --muted: #c7d1cc; /* texto suave */
    --ink: #e2e7e3; /* texto principal */
    --danger: #ff4d4f;
    --warn: #f6c23e;
    --ok: #1fbf75;
    --shadow: 0 10px 30px rgba(0,0,0,.25);
    --radius: 16px;
}

/* --- Overlay / Modal --- */
.stories-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: saturate(120%) blur(2px);
}

    .stories-overlay.is-open {
        display: flex;
    }

.stories-modal {
    width: min(860px, 96vw);
    height: min(92vh, 780px);
    background: linear-gradient(180deg, #0c1214, #0b0f10 55%);
    border-radius: clamp(12px, 1.8vw, var(--radius));
    box-shadow: var(--shadow);
    color: var(--ink);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    border: 1px solid rgba(255,255,255,.06);
}

/* Header */
.stories-header {
    padding: 12px 16px 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
}

.stories-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stories-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.15);
}

.stories-username {
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stories-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    transition: .2s;
}

    .icon-btn:hover {
        background: rgba(255,255,255,.08);
    }

    .icon-btn:active {
        transform: scale(.96);
    }

/* Progress Segments */
.progress-wrap {
    display: flex;
    gap: 6px;
    width: 100%;
    grid-column: 1 / -1;
    margin-top: 6px;
}

.progress-seg {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(0,237,59,.85), rgba(0,237,59,1));
    box-shadow: 0 0 10px rgba(0,237,59,.35);
}

/* Media Area */
.stories-stage {
    position: relative;
    overflow: hidden;
    background: #000;
    display: grid;
    place-items: center;
}

.media-story {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

    .media-story.active {
        display: block;
    }

.caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.6) 40%, rgba(0,0,0,.7));
    color: var(--ink);
    padding: 18px 16px 14px;
    font-size: .95rem;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

/* Click Zones (Prev / Next) */
.zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    z-index: 5;
    cursor: pointer;
}

.zone-left {
    left: 0;
}

.zone-right {
    right: 0;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.1);
    transition: .2s;
}

    .nav-arrow svg {
        width: 22px;
        height: 22px;
    }

.nav-left {
    left: 10px;
}

.nav-right {
    right: 10px;
}

.zone:hover .nav-arrow {
    background: rgba(0,0,0,.6);
}

/* Footer Controls */
.stories-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(18,24,26,.75);
    border-top: 1px solid rgba(255,255,255,.06);
    gap: 8px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill {
    font-size: .9rem;
    color: var(--muted);
    background: rgba(255,255,255,.06);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
}

/* Dots */
.dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    transition: .2s;
}

    .dot.active {
        background: var(--brand);
        box-shadow: 0 0 0 4px rgba(0,237,59,.14);
    }

/* Helpers / Responsive */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .stories-modal {
        width: 98vw;
        height: 92vh;
        border-radius: 18px;
    }

    .zone {
        width: 26%;
    }

    .nav-arrow {
        display: none;
    }
    /* mobile mais clean */
    .pill {
        display: none;
    }
    /* enxugar no mobile */
}

/* Simple icons (SVG paths) */
svg {
    fill: currentColor;
}
