/* Ana story kapsayıcısı */
.story-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: black;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.story-wrapper.active {
    opacity: 1;
    transform: translateX(0);
}

/* Video ve görsel */
.story-wrapper video,
.story-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0 !important;
    border: none;
    display: block;
    pointer-events: none !important;
    visibility: visible !important;
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Progress bar */
.story-progress {
    position: fixed;
    top: 0;
    left: 0;
    padding: 10px;
    width: 100%;
    z-index: 2147483646 !important;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #ff7424;
    transition: width 0.1s linear;
}

/* Yüklenme animasyonu */
.story-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 99999;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff7424;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Kontroller */
.story-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483647 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.story-controls button {
    pointer-events: auto;
    background-color: #ff7424;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
    z-index: 2147483648 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Konumlar */
.story-controls .story-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.story-controls .story-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.story-controls .story-close {
    top: 20px;
    right: 10px;
}

.story-controls .story-mute {
    top: 20px;
    right: 60px;
}

/* İzlenmiş story */
.story-item.viewed {
    opacity: 0.4;
    transition: opacity 0.3s;
}

/* Mobil optimizasyonlar */
@media (max-width: 576px) {
    .story-controls .story-prev,
    .story-controls .story-next {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .story-controls .story-close,
    .story-controls .story-mute {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .progress-track {
        height: 3px;
    }
}