/* Reelium Story Player Wrapper */
.reelium-story-player-wrapper {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

/* 1. Horizontal Circle Slider */
.reelium-story-slider {
    position: relative;
    width: 100%;
}
.reelium-story-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    gap: 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}
.reelium-story-container::-webkit-scrollbar {
    display: none;
}

.reelium-story-item-wrapper {
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink: 0;
    position: relative;
    width: 110px; 
    height: 132px; 
    margin: 0;
    padding:4px;
    cursor: pointer;
    transition: width 0.5s cubic-bezier(0.77, 0, 0.175, 1),
                height 0.5s cubic-bezier(0.77, 0, 0.175, 1),
                margin 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.reelium-story-item {
    width: 110px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease-in-out;
    opacity: 1;
    visibility: visible;
    
}
.reelium-story-item:hover {
    transform: scale(1.05);
}
.reelium-story-thumbnail {
    width: 110px; 
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(236, 72, 153, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.reelium-story-thumbnail img, .reelium-story-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.reelium-story-label {
    font-size: 14px; 
    color: #333;
    margin-top: 8px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reelium-story-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    user-select: none;
    border-radius: 55px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s 0.1s ease, 
                visibility 0.3s 0.1s ease,
                border-radius 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 2;
}

/* --- ACTIVE PLAYER STATE --- */
.reelium-story-item-wrapper.is-active {
    width: 196px;
    height: 348px;
    cursor: default;
    aspect-ratio: 9/16;
}

.reelium-story-item-wrapper.is-active .reelium-story-item {
    opacity: 0;
    visibility: hidden;
    transition-delay: 0s;
}

.reelium-story-item-wrapper.is-active .reelium-story-player {
    border-radius: 12px;
    opacity: 1;
    visibility: visible;
}

.reelium-story-player-wrapper.is-active .reelium-nav-buttons {
    display: none !important;
}

/* --- Internal Player UI --- */
.reelium-story-player video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.reelium-story-player .reelium-story-loading {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}
.reelium-story-player .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: reelium-spin 1s linear infinite;
}
@keyframes reelium-spin {
    to { transform: rotate(360deg); }
}

.reelium-story-header {
    position: relative;
    z-index: 10;
    padding: 12px;
    display: flex;
    gap: 4px;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
}
.reelium-story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    overflow: hidden;
}
.reelium-story-progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width 0.1s linear;
}

.reelium-story-tap-zones {
    flex: 1;
    display: flex;
    z-index: 5;
}
.reelium-story-tap-prev { width: 30%; height: 100%; cursor: pointer; }
.reelium-story-tap-pause { flex: 1; }
.reelium-story-tap-next { width: 30%; height: 100%; cursor: pointer; }

.reelium-story-footer {
    position: relative;
    z-index: 10;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
}
.reelium-story-cta-button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.reelium-story-cta-button.style-rounded { border-radius: 8px; }
.reelium-story-cta-button.style-square { border-radius: 0; }
.reelium-story-cta-button.style-pill { border-radius: 50px; }

/* --- Slider Nav Buttons --- */
.reelium-story-slider .reelium-nav-buttons {
    position: absolute;
    top: 64px; /* Adjusted for larger circles */
    transform: translateY(-50%);
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
    
}
.reelium-story-slider:hover .reelium-nav-buttons {
    opacity: 1;
}
.reelium-story-slider .reelium-nav-buttons button {
    pointer-events: all;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    padding:0px;
}
.reelium-story-slider .reelium-nav-buttons button:hover:not(:disabled) {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}
.reelium-story-slider .reelium-nav-buttons button:active:not(:disabled) {
    transform: scale(0.95);
}
.reelium-story-slider .reelium-nav-buttons button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.7);
}
.reelium-story-slider .reelium-nav-buttons button svg {
    width: 20px;
    height: 20px;
    stroke: #000;
    stroke-width: 2.5;
    fill: none;
}
.reelium-story-slider .reelium-nav-prev { 
    margin-left: -20px; 
}
.reelium-story-slider .reelium-nav-next { 
    margin-right: -20px; 
}

/* Mobile responsive */
@media (max-width: 768px) {
    .reelium-story-slider .reelium-nav-buttons button {
        width: 36px;
        height: 36px;
    }
    .reelium-story-slider .reelium-nav-buttons button svg {
        width: 18px;
        height: 18px;
    }
    .reelium-story-slider .reelium-nav-prev { 
        margin-left: -18px; 
    }
    .reelium-story-slider .reelium-nav-next { 
        margin-right: -18px; 
    }
    .reelium-story-slider .reelium-nav-buttons {
        top: 42px;
    }
}
