/* Stories CSS */
.stories-section {
    margin-bottom: 2.5rem;
}

.stories-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.stories-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.stories-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.stories-tab-content {
    display: none;
}

.stories-tab-content.active {
    display: block;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.story-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.story-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.story-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.story-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.story-caption {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-time {
    font-size: 0.8rem;
    opacity: 0.8;
}

.story-upload-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    border-radius: 10px;
    border: 2px dashed #e9ecef;
    cursor: pointer;
    transition: all 0.3s;
}

.story-upload-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(138, 43, 226, 0.05);
}

.story-upload-icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.story-upload-text {
    font-size: 0.9rem;
    color: #6c757d;
}

.no-stories-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.story-upload-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.story-upload-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-upload-modal-close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.story-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.story-upload-preview {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.story-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.story-preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.story-preview-image,
.story-preview-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-upload-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.story-upload-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.story-upload-field label {
    font-weight: 500;
}

.story-upload-field input,
.story-upload-field textarea,
.story-upload-field select {
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

.story-upload-field textarea {
    resize: vertical;
    min-height: 100px;
}

@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .story-upload-form {
        flex-direction: column;
    }
    
    .story-upload-preview {
        height: 200px;
    }
}
