/*==================================================
STORY PLAYER
==================================================*/

:root{

    --story-width:390px;
    --story-radius:24px;

    --story-bg:#000;
    --story-overlay:rgba(0,0,0,.82);

    --story-glass:rgba(255,255,255,.10);
    --story-border:rgba(255,255,255,.15);

    --story-shadow:
        0 30px 90px rgba(0,0,0,.65);

    --story-speed:.28s;

}

/*====================================*/

.story-player{

    position:fixed;
    inset:0;

    display:none;
    justify-content:center;
    align-items:center;

    overflow:hidden;

    background:var(--story-overlay);

    backdrop-filter:blur(18px);

    z-index:999999;

    opacity:0;

    transition:
        opacity .25s ease;

}

/*====================================*/

.story-player.active{

    display:flex;

    opacity:1;

}

/*====================================*/

.story-overlay{

    position:absolute;

    inset:0;

    background:

    radial-gradient(

        circle at center,

        rgba(255,255,255,.06),

        rgba(0,0,0,.94)

    );

    pointer-events:none;

}

/*====================================*/

.story-wrapper{

    position:relative;

    width:var(--story-width);

    height:92vh;

    max-height:900px;

    max-width:95vw;

    background:#000;

    border-radius:var(--story-radius);

    overflow:hidden;

    box-shadow:var(--story-shadow);

    transform:scale(.92);

    opacity:0;

    transition:

        transform var(--story-speed),

        opacity var(--story-speed);

}

/*====================================*/

.story-player.active .story-wrapper{

    transform:scale(1);

    opacity:1;

}

/*====================================*/

.story-video{

    position:absolute;

    inset:0;

    background:#000;

    overflow:hidden;

}

.story-video img{
    width:100%;
    height:100%;
    position:absolute;

    inset:0;

    background:#000;

    overflow:hidden;

}

/*====================================*/

.story-video video,

.story-video iframe{

    position:absolute;

    inset:0;

    width:100%;

    height:100%;

    border:none;

    background:#000;

    object-fit:cover;

}

/*====================================*/

.story-gradient{

    position:absolute;

    left:0;

    right:0;

    bottom:0;

    height:42%;

    background:

    linear-gradient(

        transparent,

        rgba(0,0,0,.25),

        rgba(0,0,0,.92)

    );

    pointer-events:none;

    z-index:10;

}

/*====================================*/

@keyframes storyFadeIn{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

@keyframes storyScale{

    from{

        transform:scale(.92);

    }

    to{

        transform:scale(1);

    }

}

@keyframes storyPulse{

    0%{

        transform:scale(1);

    }

    50%{

        transform:scale(1.08);

    }

    100%{

        transform:scale(1);

    }

}

/*====================================*/

@media(max-width:768px){

.story-wrapper{

    width:100vw;

    height:100vh;

    max-height:none;

    max-width:none;

    border-radius:0;

}

.story-player{

    backdrop-filter:none;

}

}

/*==================================================
PART 2
PROGRESS + HEADER
==================================================*/

/*======================================
PROGRESS BAR
======================================*/

.story-progress{

    position:absolute;

    top:12px;

    left:12px;

    right:12px;

    display:flex;

    gap:5px;

    z-index:60;

}

.story-segment{

    flex:1;

    height:4px;

    overflow:hidden;

    border-radius:50px;

    background:rgba(255,255,255,.25);

}

.story-segment span{

    display:block;

    width:0;

    height:100%;

    border-radius:50px;

    background:#fff;

    transition:width .08s linear;

}

/*======================================
HEADER
======================================*/

.story-header{

    position:absolute;

    left:16px;

    right:16px;

    top:28px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    z-index:70;

}

/*======================================
LEFT SIDE
======================================*/

.story-left{

    display:flex;

    align-items:center;

    gap:12px;

}

.story-logo{

    width:42px;

    height:42px;

    border-radius:50%;

    overflow:hidden;

    background:#fff;

    display:flex;

    justify-content:center;

    align-items:center;

    box-shadow:

        0 6px 20px rgba(0,0,0,.35);

}

.story-logo img{

    width:100%;

    height:100%;

    object-fit:contain;

}

/*======================================
VIEW COUNTER
======================================*/

.story-view-count{

    display:flex;

    align-items:center;

    gap:8px;

    padding:8px 14px;

    border-radius:40px;

    color:#fff;

    font-size:14px;

    font-weight:700;

    background:rgba(0,0,0,.38);

    backdrop-filter:blur(14px);

    border:1px solid rgba(255,255,255,.10);

    box-shadow:

        0 10px 25px rgba(0,0,0,.35);

}

.story-view-count i{

    font-size:17px;

}

/*======================================
ICON BUTTONS
======================================*/

.story-icon-btn{

    width:44px;

    height:44px;

    border:none;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    cursor:pointer;

    color:#fff;

    font-size:23px;

    background:rgba(255,255,255,.14);

    backdrop-filter:blur(14px);

    border:1px solid rgba(255,255,255,.10);

    transition:

        background .25s,

        transform .25s,

        color .25s;

}

.story-icon-btn:hover{

    background:#d60000;

    color:#fff;

    transform:scale(1.08);

}

.story-icon-btn:active{

    transform:scale(.94);

}

/*======================================
CLOSE BUTTON
======================================*/

.story-close{

    position:relative;

    top:0;

    right:0;

}

/*======================================
AUTO HIDE
======================================*/

.story-header{

    transition:

        opacity .35s ease,

        transform .35s ease;

}

/*======================================
TABLET
======================================*/

@media(max-width:992px){

.story-header{

    top:22px;

}

.story-view-count{

    font-size:13px;

    padding:7px 12px;

}

.story-view-count i{

    font-size:15px;

}

.story-icon-btn{

    width:42px;

    height:42px;

}

}

/*======================================
MOBILE
======================================*/

@media(max-width:768px){

.story-progress{

    left:8px;

    right:8px;

    top:8px;

}

.story-header{

    left:12px;

    right:12px;

    top:18px;

}

.story-view-count{

    padding:6px 11px;

    font-size:12px;

}

.story-icon-btn{

    width:40px;

    height:40px;

    font-size:20px;

}

}

/*==================================================
PART 3
FOOTER
==================================================*/

.story-footer{

    position:absolute;

    left:0;
    right:0;
    bottom:0;

    z-index:50;

    padding:24px 18px 20px;

    color:#fff;

    background:
    linear-gradient(
        transparent,
        rgba(0,0,0,.20),
        rgba(0,0,0,.94)
    );

}

.story-title{

    font-size:21px;

    font-weight:700;

    line-height:1.45;

    margin-bottom:14px;

    color:white;

    text-shadow:0 2px 8px rgba(0,0,0,.5);

}

.story-meta{

    display:flex;

    align-items:center;

    gap:18px;

    margin-bottom:18px;

    color:rgba(255,255,255,.85);

    font-size:14px;

}

.story-meta span{

    display:flex;

    align-items:center;

    gap:6px;

}

/*==================================================
PART 4
CONTROLS
==================================================*/

.story-controls{

    display:flex;

    align-items:center;

    gap:14px;

}

.story-control-btn{

    width:48px;

    height:48px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    color:#fff;

    font-size:22px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:rgba(255,255,255,.12);

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.15);

    transition:.25s;

}

.story-control-btn:hover{

    background:#d60000;

    transform:translateY(-2px);

}

.story-control-btn:active{

    transform:scale(.92);

}

/*==================================================
LOADER
==================================================*/

.story-loader{

    position:absolute;

    inset:0;

    display:none;

    justify-content:center;

    align-items:center;

    background:rgba(0,0,0,.25);

    z-index:30;

}

.story-spinner{

    width:58px;

    height:58px;

    border-radius:50%;

    border:5px solid rgba(255,255,255,.25);

    border-top:5px solid #fff;

    animation:storySpin .8s linear infinite;

}

@keyframes storySpin{

    to{

        transform:rotate(360deg);

    }

}

/*==================================================
SIDE NAVIGATION
==================================================*/

.story-prev,
.story-next{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    width:60px;

    height:60px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    color:#fff;

    font-size:34px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:rgba(255,255,255,.10);

    backdrop-filter:blur(15px);

    border:1px solid rgba(255,255,255,.12);

    transition:.25s;

    z-index:200;

}

.story-prev{

    left:calc(50% - 270px);

}

.story-next{

    right:calc(50% - 270px);

}

.story-prev:hover,
.story-next:hover{

    background:#d60000;

}

.story-header,
.story-footer{

    transition:

        opacity .35s,

        transform .35s;

}

.story-player.hide-ui .story-header{

    opacity:0;

    transform:translateY(-15px);

}

.story-player.hide-ui .story-footer{

    opacity:0;

    transform:translateY(20px);

}

@media(max-width:768px){

.story-footer{

    padding:18px 16px 24px;

}

.story-title{

    font-size:18px;

}

.story-controls{

    justify-content:center;

}

.story-control-btn{

    width:52px;

    height:52px;

    font-size:24px;

}

.story-prev,
.story-next{

    display:none;

}

}

