:root {
    --primary-color: #0095f6;
    --primary-hover: #1877f2;
    --background-color: #fafafa;
    --surface-color: #ffffff;
    --border-color: #dbdbdb;
    --text-color: #262626;
    --text-secondary: #8e8e8e;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Navbar styling */
.navbar {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-container {
   
    font-size: 1.8rem;
}

/* Card styling */
.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card-header, .card-footer {
    background-color: var(--surface-color);
    border-color: var(--border-color);
}

/* Post card styling */
.post-card {
    overflow: hidden;
}

.post-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.post-avatar-placeholder {
    width: 40px;
    height: 40px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.post-content {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.post-media {
    position: relative;
    max-height: 800px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    object-fit: contain;
    max-height: 800px;
}

.post-video-wrapper {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.post-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f8f8f8;
}

/* Image gallery */
.post-image-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.image-gallery-container {
    display: flex;
    transition: transform 0.3s ease;
    height: 500px;
}

.image-gallery-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.image-gallery-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.image-gallery-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-prev, .gallery-next {
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gallery-indicators {
    display: flex;
    gap: 5px;
}

.gallery-indicators .indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
}

.gallery-indicators .indicator.active {
    background-color: var(--primary-color);
}

/* Post actions */
.post-actions {
    margin-top: 8px;
}

.post-action-btn {
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    transition: all 0.2s;
}

.post-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.post-action-btn.active {
    color: var(--primary-color);
}

.like-btn.active {
    color: #e74c3c;
}

.save-btn.active {
    color: var(--primary-color);
}

/* Comment form */
.comment-input {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 20px;
    padding-right: 40px;
}

.comment-input:focus {
    background-color: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: none;
    color: var(--text-color);
}

/* Stories slider */
.stories-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 8px 0;
}

.stories-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.stories-slider {
    display: inline-flex;
    gap: 10px;
    padding: 0 15px;
}

.story-item {
    display: inline-block;
    text-align: center;
    width: 70px;
}

.story-link, .story-create-link {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.story-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    padding: 3px;
    margin: 0 auto 5px;
    position: relative;
}

.story-avatar.has-unviewed {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.story-avatar.viewed {
    background-color: var(--border-color);
}

.story-avatar img, .story-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-color);
}

.story-avatar .avatar-placeholder {
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.story-username {
    font-size: 0.75rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-create {
    order: -1;
}

.story-create-link .story-avatar {
    background: transparent;
    border: 2px dashed var(--border-color);
}

.story-add-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Verified badge */
.verified-badge {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Sidebar styling */
.sidebar-card {
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.sidebar-avatar-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.sidebar-communities .list-group-item {
    background-color: transparent;
}

.community-icon {
    width: 36px;
    height: 36px;
    overflow: hidden;
}

.community-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-icon-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.trending-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--background-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.trending-tag:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.trending-topic-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-topic-item:last-child {
    border-bottom: none;
}

.trending-topic-link {
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.trending-topic-link:hover {
    color: var(--text-color);
}

.trending-thumbnail {
    width: 40px;
    height: 40px;
    margin-left: 10px;
}

.trending-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Feed filters */
.feed-filters {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feed-filters::-webkit-scrollbar {
    display: none;
}

.feed-filters .nav-pills {
    gap: 8px;
    padding: 0 4px;
}

.feed-filters .nav-link {
    color: var(--text-secondary);
    background-color: transparent;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.feed-filters .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.feed-filters .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Create post modal */
#createPostForm .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.post-preview-container {
    margin-bottom: 20px;
    position: relative;
}

.post-preview-inner {
    position: relative;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.post-preview-content img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.post-preview-content video {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.post-preview-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--danger-color);
}

/* Poll styling */
.poll-option {
    position: relative;
}

.poll-option .remove-option {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--danger-color);
}

/* Location results */
.location-results {
    max-height: 200px;
    overflow-y: auto;
}

.location-results .list-group-item {
    cursor: pointer;
    background-color: var(--surface-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

.location-results .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-secondary {
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Form controls */
.form-control, .form-select {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.form-control:focus, .form-select:focus {
    background-color: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: none;
    color: var(--text-color);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23636f83' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Animation */
.animated-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 767.98px) {
    .feed-filters .nav-link {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    .post-image {
        max-height: 500px;
    }
    
    .stories-container {
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }
}

/* Footer styling */
.footer {
    background-color: var(--surface-color);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 16px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 10px;
}

.auth-card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.password-field-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.password-strength-meter {
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-meter-fill {
    height: 100%;
    width: 0;
    background-color: #ef4444;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}