/**
 * Digital Newspaper - Instagram Style Stories Stylesheet
 */

/* Stories Bar Section */
.dn-ig-stories-wrapper {
    margin: 20px 0 25px 0;
    width: 100%;
}

.dn-stories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dn-stories-badge {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dn-stories-badge i {
    font-size: 15px;
    background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dn-stories-hint {
    font-size: 11px;
    color: #888888;
}

/* Scroll Container */
.dn-stories-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
}

.dn-stories-list {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 4px 12px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.dn-stories-list::-webkit-scrollbar {
    display: none;
}

.dn-stories-nav-btn {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #eef0f3;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
}

.dn-stories-nav-btn:hover {
    background: #E50914;
    color: #ffffff;
}

.dn-nav-prev {
    left: -14px;
}
.dn-nav-next {
    right: -14px;
}

/* Story Item (Circle) */
.dn-story-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    width: 78px;
    text-align: center;
    user-select: none;
}

.dn-story-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dn-story-circle-item:hover .dn-story-ring {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(220, 39, 67, 0.4);
}

/* Viewed status ring */
.dn-story-circle-item.is-viewed .dn-story-ring {
    background: #ced4da;
    box-shadow: none;
}

.dn-story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ffffff;
    overflow: hidden;
    background: #212529;
}

.dn-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dn-avatar-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

.dn-story-label {
    font-size: 11px;
    font-weight: 600;
    color: #212529;
    line-height: 1.25;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================
   FULL-SCREEN INSTAGRAM STORY MODAL VIEWER
   ========================================= */

.dn-story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dn-story-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.dn-story-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 10, 15, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dn-story-player-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.dn-story-desk-nav {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s ease;
}

.dn-story-desk-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* 9:16 Aspect Frame */
.dn-story-card-frame {
    position: relative;
    width: 380px;
    max-width: 95vw;
    height: 680px;
    max-height: 92vh;
    border-radius: 18px;
    overflow: hidden;
    background: #111418;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

/* Progress Bars */
.dn-story-progress-bars {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    gap: 4px;
}

.dn-story-bar-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.dn-story-bar-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.dn-story-bar-segment.is-completed .dn-story-bar-fill {
    width: 100%;
}

/* Header Bar */
.dn-story-header-bar {
    position: absolute;
    top: 26px;
    left: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dn-story-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dn-story-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    overflow: hidden;
    background: #E50914;
}

.dn-story-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dn-story-author-details {
    display: flex;
    flex-direction: column;
}

.dn-story-cat-badge {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.dn-story-time-ago {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.dn-story-controls {
    display: flex;
    gap: 8px;
}

.dn-story-pause-btn,
.dn-story-close-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dn-story-pause-btn:hover,
.dn-story-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Slide Content */
.dn-story-slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.dn-story-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.dn-story-gradient-scrim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
}

/* Tap Targets */
.dn-story-tap-area {
    position: absolute;
    top: 0;
    bottom: 120px;
    z-index: 8;
    cursor: pointer;
}

.dn-tap-left {
    left: 0;
    width: 35%;
}
.dn-tap-right {
    right: 0;
    width: 65%;
}

/* Story Information Box */
.dn-story-info-box {
    position: relative;
    z-index: 9;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dn-story-headline {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dn-story-excerpt-text {
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dn-story-read-btn {
    align-self: center;
    background: #ffffff;
    color: #111418;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    animation: dnBounce 2s infinite;
}

.dn-story-read-btn:hover {
    background: #E50914;
    color: #ffffff;
    transform: translateY(-2px);
}

@keyframes dnBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@media (max-width: 600px) {
    .dn-story-desk-nav {
        display: none;
    }
    .dn-story-card-frame {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .dn-story-player-wrapper {
        padding: 0;
    }
}
