/* Modern Mobile Swipe UI */
:root {
    --primary-color: #6c5ce7;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --story-bar-bg: rgba(255, 255, 255, 0.5);
    --story-bar-active: #fff;
    --overlay-gradient: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
}

body {
    background-color: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-x: hidden;
}

/* Header / Back Button */
.nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.btn-back i {
    margin-right: 5px;
}

/* Profile Section */
.profile-section {
    padding: 30px 20px;
    text-align: center;
    background: #fff;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    border: 3px solid var(--primary-color);
    padding: 3px;
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 5px;
}

.profile-title {
    font-size: 14px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 15px;
}

.profile-info {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    background: var(--bg-light);
    padding: 15px;
    border-radius: 12px;
    text-align: left;
}

/* Story Section */
.section-title {
    padding: 20px 20px 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
    margin-right: 8px;
}

.story-container {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Occupy significant screen space */
    max-height: 500px;
    background: #000;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 20px;
    /* Modern rounded corners */
    margin: 0 20px 30px;
    /* Indent */
    width: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.storyline-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.storyline-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: none;
    /* Hide by default */
}

.storyline-slide.slide-active {
    opacity: 1;
    display: block;
    /* z-index removed to avoid stacking context trap */
}

.storyline-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* Overlay Info */
.storyline-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 20px 30px;
    background: var(--overlay-gradient);
    color: white;
    z-index: 20;
    /* Higher than controls */
    pointer-events: auto;
}


.storyline-author {
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    text-decoration: none;
    color: white;
    position: relative;
    z-index: 30;
    /* Ensure it is clickable above controls */
    pointer-events: auto;
}

.story-info-row {
    font-size: 13px;
    margin-bottom: 4px;
    opacity: 0.9;
}

/* Indicators */
.storyline-header {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    z-index: 30;
    padding: 0 10px;
}

.storyline-indicator {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.indicator-item {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.indicator-bar {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
    transition: width 0.3s linear;
}

.item-loaded .indicator-bar {
    width: 100%;
}

.item-loading .indicator-bar {
    width: 100%;
}

/* Static for now, animation would need JS timer sync */

/* Controls (Invisible Tappable Areas) */
.storyline-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    /* Lower than text (20) */
    display: flex;
}

.storyline-control {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}

/* Loading State */
.loading-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background: #f8f9fa;
    border-radius: 20px;
    margin: 0 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #999;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}