/* Frontend Styles for WhatsApp Story Status */

* {
    box-sizing: border-box;
}

.wss-phone-frame {
    width: 390px;
    max-width: 100%;
    height: 844px;
    max-height: 90vh;
    background: #000;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px auto;
}

.wss-story-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    transition: transform 0.3s ease;
}

.wss-story {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* Progress Bars */
.wss-story-progress {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

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

.wss-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.wss-progress-bar.active .wss-progress-fill {
    animation: wss-fillProgress 5s linear forwards;
}

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

@keyframes wss-fillProgress {
    to { width: 100%; }
}

/* Story Header */
.wss-story-header {
    display: flex;
    align-items: center;
    padding: 50px 16px 16px;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.wss-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.wss-user-info {
    flex: 1;
}

.wss-username {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.wss-time-ago {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Image Slider */
.wss-image-slider {
    position: relative;
    width: 100%;
    height: 50%;
    margin: 10px 0;
}

.wss-slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.wss-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wss-slide.active {
    opacity: 1;
}

.wss-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Controls */
.wss-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
}

.wss-slider-prev,
.wss-slider-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.wss-slider-prev:hover,
.wss-slider-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Slider Dots */
.wss-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.wss-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Story Content */
.wss-story-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.wss-location-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    align-self: flex-start;
}

.wss-story-text {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    margin-bottom: 8px;
    line-height: 1.3;
}

.wss-story-caption {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Navigation Areas */
.wss-nav-area {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 50;
    cursor: pointer;
}

.wss-nav-prev {
    left: 0;
}

.wss-nav-next {
    right: 0;
}

/* Responsive */
@media (max-width: 420px) {
    .wss-phone-frame {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .wss-story-text {
        font-size: 20px;
    }
    
    .wss-story-caption {
        font-size: 14px;
    }
}

/* Loading State */
.wss-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.wss-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wss-spin 1s linear infinite;
}

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