/* WP Stories Frontend CSS - stories.css */
.wp-stories-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.stories-navigation {
    display: flex;
    gap: 15px;
    padding: 20px;
    overflow-x: auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stories-navigation::-webkit-scrollbar {
    display: none;
}

.story-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    transition: transform 0.3s ease;
}

.story-category:hover {
    transform: translateY(-5px);
}

.story-avatar {
    position: relative;
    width: 70px;
    height: 70px;
    margin-bottom: 8px;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.story-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 3px solid transparent;
    border-radius: 50%;
    background: var(--ring-color, linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%));
    background-clip: border-box;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.story-label {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 80px;
    line-height: 1.2;
}

/* Stories Viewer - Desktop Carousel / Mobile Fullscreen */
.stories-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Desktop Layout (Large screens) */
@media (min-width: 1024px) {
    .stories-viewer {
        align-items: center;
        justify-content: center;
        padding: 40px;
    }
    
    .stories-viewer-container {
        display: flex;
        align-items: center;
        gap: 30px;
        max-width: 1400px;
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    .stories-carousel {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        width: 100%;
        height: 100%;
        max-height: 85vh;
        overflow: visible;
        position: relative;
    }
    
    .story-card {
        flex-shrink: 0;
        width: 350px;
        height: 580px;
        border-radius: 25px;
        overflow: hidden;
        position: relative;
        transition: all 0.4s ease;
        cursor: pointer;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
    
    .story-card.previous,
    .story-card.next {
        transform: scale(0.85);
        opacity: 0.7;
        filter: brightness(0.8);
    }
    
    .story-card.active {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
        width: 380px;
        height: 620px;
        z-index: 2;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }
    
    .story-card.far {
        transform: scale(0.7);
        opacity: 0.4;
        filter: brightness(0.6);
    }
    
    .desktop-story-controls {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.95);
        border: none;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 24px;
        color: #333;
        transition: all 0.3s ease;
        z-index: 10;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .desktop-story-controls:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    .desktop-prev {
        left: -30px;
    }
    
    .desktop-next {
        right: -30px;
    }
    
    .desktop-close {
        position: absolute;
        top: 30px;
        right: 30px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 28px;
        color: #333;
        transition: all 0.3s ease;
        z-index: 10;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .desktop-close:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Hide mobile elements on desktop */
    .close-stories {
        display: none;
    }
}

/* Tablet Layout (Medium screens) */
@media (min-width: 769px) and (max-width: 1023px) {
    .stories-viewer {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .stories-viewer-container {
        display: flex;
        align-items: center;
        gap: 15px;
        max-width: 1000px;
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    .stories-carousel {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        height: 100%;
        max-height: 80vh;
        overflow: visible;
        position: relative;
    }
    
    .story-card {
        flex-shrink: 0;
        width: 260px;
        height: 460px;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
        transition: all 0.4s ease;
        cursor: pointer;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .story-card.previous,
    .story-card.next {
        transform: scale(0.8);
        opacity: 0.6;
        filter: brightness(0.7);
    }
    
    .story-card.active {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
        width: 300px;
        height: 520px;
        z-index: 2;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
    
    .story-card.far {
        transform: scale(0.6);
        opacity: 0.3;
        filter: brightness(0.5);
    }
    
    .desktop-story-controls {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.9);
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 18px;
        color: #333;
        transition: all 0.3s ease;
        z-index: 10;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
    
    .desktop-story-controls:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .desktop-prev {
        left: -22px;
    }
    
    .desktop-next {
        right: -22px;
    }
    
    .desktop-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 24px;
        color: #333;
        transition: all 0.3s ease;
        z-index: 10;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
    
    .desktop-close:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    /* Hide mobile elements on tablet */
    .close-stories {
        display: none;
    }
}

/* Header dengan Avatar */
.stories-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 20px 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}

/* Desktop Header */
@media (min-width: 1024px) {
    .stories-header {
        padding: 20px 25px 15px 25px;
    }
    
    .story-card .stories-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 20px;
        background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    }
    
    .story-category-avatar {
        width: 36px;
        height: 36px;
    }
    
    .story-category-title {
        font-size: 18px;
    }
}

/* Tablet Header */
@media (min-width: 769px) and (max-width: 1023px) {
    .stories-header {
        padding: 15px 20px 10px 20px;
    }
    
    .story-card .stories-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 15px;
        background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 100%);
    }
    
    .story-category-avatar {
        width: 32px;
        height: 32px;
    }
    
    .story-category-title {
        font-size: 16px;
    }
}

.story-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.story-category-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.story-category-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 120px);
}

.progress-bars {
    position: absolute;
    top: 8px;
    left: 20px;
    right: 20px;
    height: 3px;
    display: flex;
    gap: 2px;
    z-index: 11;
}

/* Desktop Progress bars */
@media (min-width: 1024px) {
    .progress-bars {
        left: 25px;
        right: 25px;
        top: 8px;
        height: 4px;
        gap: 3px;
    }
    
    .story-card .progress-bars {
        left: 20px;
        right: 20px;
        top: 8px;
        height: 4px;
    }
}

/* Tablet Progress bars */
@media (min-width: 769px) and (max-width: 1023px) {
    .progress-bars {
        left: 20px;
        right: 20px;
        top: 6px;
        height: 3px;
        gap: 2px;
    }
    
    .story-card .progress-bars {
        left: 15px;
        right: 15px;
        top: 6px;
        height: 3px;
    }
}

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

.progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width linear;
    border-radius: 2px;
}

.close-stories {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.close-stories:hover {
    opacity: 0.7;
}

/* Stories Content */
.stories-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* Desktop Stories Content */
@media (min-width: 1024px) {
    .stories-content {
        position: relative;
        padding: 0;
        width: 100%;
        height: 100%;
    }
    
    .story-card .stories-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 0;
    }
}

/* Tablet Stories Content */
@media (min-width: 769px) and (max-width: 1023px) {
    .stories-content {
        position: relative;
        padding: 0;
        width: 100%;
        height: 100%;
    }
    
    .story-card .stories-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 0;
    }
}

.story-slide {
    width: 100%;
    height: 100%;
    display: none;
    position: relative;
    color: white;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.story-slide.active {
    display: block;
}

/* Desktop Story Slide */
@media (min-width: 1024px) {
    .story-slide {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
    }
    
    .story-card .story-slide {
        border-radius: 25px;
        overflow: hidden;
    }
}

/* Tablet Story Slide */
@media (min-width: 769px) and (max-width: 1023px) {
    .story-slide {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
    }
    
    .story-card .story-slide {
        border-radius: 20px;
        overflow: hidden;
    }
}

.story-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Desktop Story Media */
@media (min-width: 1024px) {
    .story-media {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 25px;
    }
}

/* Tablet Story Media */
@media (min-width: 769px) and (max-width: 1023px) {
    .story-media {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 20px;
    }
}

/* Story Info Overlay - Updated without main title */
.story-info {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    z-index: 5;
    text-align: left;
}

/* Desktop Story Info */
@media (min-width: 1024px) {
    .story-info {
        top: 80px;
        left: 25px;
        right: 25px;
        bottom: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .story-card .story-info {
        top: 80px;
        left: 20px;
        right: 20px;
        bottom: 80px;
    }
    
    .story-subtitle {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .story-description {
        font-size: 16px;
        margin-bottom: 25px;
        line-height: 1.5;
    }
}

/* Tablet Story Info */
@media (min-width: 769px) and (max-width: 1023px) {
    .story-info {
        top: 70px;
        left: 20px;
        right: 20px;
        bottom: 70px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .story-card .story-info {
        top: 70px;
        left: 15px;
        right: 15px;
        bottom: 70px;
    }
    
    .story-subtitle {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .story-description {
        font-size: 15px;
        margin-bottom: 20px;
        line-height: 1.4;
    }
}

/* Remove story-title since it's now in header */
.story-title {
    display: none;
}

.story-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    color: white;
}

.story-description {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Swipe up indicator */
.swipe-up-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 6;
    animation: swipeUpPulse 2s infinite;
    cursor: pointer;
}

.swipe-up-line {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    margin: 0 auto 8px;
    position: relative;
}

.swipe-up-line::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid rgba(255, 255, 255, 0.8);
}

.swipe-up-text {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

@keyframes swipeUpPulse {
    0%, 100% { 
        opacity: 0.7; 
        transform: translateX(-50%) translateY(0);
    }
    50% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(-8px);
    }
}

/* Desktop Swipe/Click indicator */
@media (min-width: 1024px) {
    .swipe-up-indicator {
        bottom: 30px;
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        padding: 12px 25px;
        border-radius: 25px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        animation: none;
        transform: translateX(-50%);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .swipe-up-indicator:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateX(-50%) translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    .swipe-up-line {
        display: none;
    }
    
    .swipe-up-text {
        font-size: 14px;
        color: #333;
        text-shadow: none;
    }
}

/* Tablet Swipe/Click indicator */
@media (min-width: 769px) and (max-width: 1023px) {
    .swipe-up-indicator {
        bottom: 25px;
        background: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 10px 20px;
        border-radius: 20px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        animation: none;
        transform: translateX(-50%);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
    
    .swipe-up-indicator:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .swipe-up-line {
        display: none;
    }
    
    .swipe-up-text {
        font-size: 12px;
        color: #333;
        text-shadow: none;
    }
}

/* Remove navigation controls */
.stories-controls {
    display: none;
}

.prev-story, .next-story {
    display: none;
}

/* Special story categories styling */
.story-category[data-category="black-label"] .story-ring {
    background: linear-gradient(45deg, #000000 0%, #434343 100%);
}

.story-category[data-category="nagita-edition"] .story-ring {
    background: linear-gradient(45deg, #d4af37 0%, #f4d03f 100%);
}

.story-category[data-category="update-news"] .story-ring {
    background: linear-gradient(45deg, #3498db 0%, #2980b9 100%);
}

.story-category[data-category="store-location"] .story-ring {
    background: linear-gradient(45deg, #e74c3c 0%, #c0392b 100%);
}

/* Mobile responsiveness - Keep fullscreen for mobile */
@media (max-width: 768px) {
    .stories-viewer {
        background: #000;
        flex-direction: column;
        padding: 0;
    }
    
    .stories-viewer-container {
        display: none;
    }
    
    .stories-carousel {
        display: none;
    }
    
    .desktop-story-controls,
    .desktop-close {
        display: none;
    }
    
    .story-card {
        display: none;
    }
    
    .stories-content {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
        width: 100%;
        height: 100%;
    }
    
    .story-slide {
        width: 100%;
        height: 100%;
        display: none;
        position: relative;
        color: white;
        animation: slideIn 0.4s ease;
    }
    
    .story-slide.active {
        display: block;
    }
    
    .wp-stories-admin {
        grid-template-columns: 1fr;
    }
    
    .stories-navigation {
        padding: 15px;
        gap: 10px;
    }
    
    .story-avatar {
        width: 60px;
        height: 60px;
    }
    
    .story-label {
        font-size: 10px;
        max-width: 60px;
    }
    
    /* Mobile story viewer optimizations */
    .stories-header {
        padding: 10px 15px;
    }
    
    .story-header-left {
        gap: 10px;
    }
    
    .story-category-avatar {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    
    .story-category-title {
        font-size: 14px;
    }
    
    .progress-bars {
        left: 15px;
        right: 15px;
    }
    
    .close-stories {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .story-info {
        top: 60px;
        left: 15px;
        right: 15px;
    }
    
    .story-category-label {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }
    
    .story-title {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .story-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .swipe-up-indicator {
        bottom: 20px;
        background: none;
        color: white;
        padding: 0;
        border-radius: 0;
        animation: swipeUpPulse 2s infinite;
    }
    
    .swipe-up-line {
        display: block;
        width: 20px;
        height: 20px;
        border: none;
        background: none;
        margin: 0 auto 8px;
        position: relative;
    }
    
    .swipe-up-line::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 10px solid rgba(255, 255, 255, 0.8);
    }
    
    .swipe-up-text {
        font-size: 11px;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .story-form, .category-form,
    .stories-list, .categories-list {
        padding: 20px;
    }
    
    .form-table input[type="text"],
    .form-table input[type="url"],
    .form-table input[type="number"],
    .form-table select {
        max-width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .stories-navigation {
        padding: 10px;
        gap: 8px;
    }
    
    .story-avatar {
        width: 55px;
        height: 55px;
    }
    
    .story-category {
        min-width: 55px;
    }
    
    .story-label {
        font-size: 9px;
        max-width: 55px;
    }
    
    /* Extra small mobile optimization */
    .story-info {
        top: 50px;
        left: 12px;
        right: 12px;
    }
    
    .story-category-avatar {
        width: 24px;
        height: 24px;
    }
    
    .story-category-title {
        font-size: 13px;
        max-width: calc(100vw - 80px);
    }
    
    .story-subtitle {
        font-size: 15px;
    }
    
    .swipe-up-indicator {
        bottom: 15px;
    }
    
    .swipe-up-line {
        width: 18px;
        height: 18px;
    }
    
    .swipe-up-line::before {
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 8px solid rgba(255, 255, 255, 0.8);
    }
    
    .swipe-up-text {
        font-size: 10px;
    }
    
    .stories-header {
        padding: 8px 12px;
    }
    
    .close-stories {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .progress-bars {
        left: 12px;
        right: 12px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .story-info {
        top: 40px;
        left: 15px;
        right: 50%;
    }
    
    .story-subtitle {
        font-size: 14px;
    }
    
    .swipe-up-indicator {
        right: 15px;
        left: auto;
        transform: none;
        bottom: 50%;
        transform: translateY(50%);
    }
}

/* Small tablet portrait - still use mobile layout */
@media (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
    .story-avatar {
        width: 70px;
        height: 70px;
    }
    
    .story-category {
        min-width: 70px;
    }
    
    .story-label {
        font-size: 11px;
        max-width: 70px;
    }
    
    .stories-navigation {
        padding: 20px;
        gap: 12px;
    }
    
    .story-category-avatar {
        width: 32px;
        height: 32px;
    }
    
    .story-category-title {
        font-size: 16px;
    }
    
    .story-subtitle {
        font-size: 16px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .story-avatar img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .story-media {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty states */
.wp-stories-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}