/* Story Çemberleri - Instagram Tarzı */

/* Story Container */
.stories-container {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.stories-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Story Circle */
.story-circle {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    text-align: center;
    transition: transform 0.2s ease;
}

/* Header Integration - Improved sizing and alignment */
#story-circles-container .story-circle {
    margin-right: 12px;
    background: transparent !important;
    box-shadow: none !important;
}

#story-circles-container .story-circle::before,
#story-circles-container .story-circle::after {
    display: none !important;
    /* Hayalet çemberleri kaldır */
}

#story-circles-container .story-ring {
    width: 60px;
    /* Etiketle beraber sığması için 70'ten 60'a revize edildi */
    height: 60px;
}

#story-circles-container .story-title {
    display: block;
    font-size: 12px;
    /* Font boyutu biraz artırıldı */
    font-weight: 800;
    /* Font ağırlığı artırıldı */
    color: #1a202c;
    /* Çok daha koyu bir renk seçildi */
    margin-top: 5px;
    text-align: center;
    line-height: 1.2;
    overflow: visible;
    white-space: nowrap;
    width: auto;
    padding: 0 4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.night-mode #story-circles-container .story-title {
    color: #cbd5e1;
}

.story-circle:hover {
    transform: scale(1.1);
    z-index: 2;
}


.story-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-ring.viewed {
    background: #ddd;
}

.story-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-ring-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-ring-inner i {
    font-size: 28px;
    color: #666;
}

.story-title {
    font-size: 12px;
    margin-top: 4px;
    color: #333;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story Viewer - Fullscreen Modal */
.story-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.story-viewer.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Story Header */
.story-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.story-progress-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.story-progress-bar.active .story-progress-fill,
.story-progress-bar.completed .story-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: white;
    border-radius: 2px;
}

.story-progress-bar.completed .story-progress-fill {
    width: 100%;
}

.story-progress-bar.active .story-progress-fill {
    animation: progressFill var(--duration) linear forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.story-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.story-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.story-close-btn:hover {
    transform: scale(1.1);
}

/* Story Content */
.story-content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 20px 20px;
}

.story-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    color: white;
}

.story-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Modern Question Style */
.story-inner-content.modern-question {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.story-main-title {
    color: #ffd700;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px !important;
}

.story-image-container {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.story-text-content {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 30px;
    font-weight: 500;
}

.story-modern-answer {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    padding: 20px;
    border-radius: 15px;
    animation: slideUp 0.5s ease 1s both;
    /* Delay showing the answer */
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.answer-label {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 5px;
}

.answer-text {
    font-size: 22px;
    font-weight: bold;
}


/* Story Navigation */
.story-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 5;
}

.story-nav-area {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.story-nav-left {
    flex: 1;
}

.story-nav-right {
    flex: 1;
}

/* Loading State */
.story-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 24px;
}

.story-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .story-ring {
        width: 60px;
        height: 60px;
    }

    .story-title {
        font-size: 11px;
        max-width: 60px;
    }

    .story-content h2 {
        font-size: 22px;
    }

    .story-content p {
        font-size: 16px;
    }

    .story-answer {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .story-title {
        color: #fff;
    }
}