/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    margin-bottom: 2px;
}

header p {
    margin-top: 0;
}

h1, h2, h3 {
    color: #333;
}

/* Tab Navigation */
.tabs-container {
    margin-bottom: 30px;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-button.active {
    border-bottom-color: #1877f2;
    color: #1877f2;
}

.tab-content {
    display: none;
}

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

/* Post Creation Section */
.post-creation {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 20px;
}

/* Expanded Post Creation Form */
.post-creation-expanded {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

.post-creation-expanded .post-modal-body {
    padding: 0;
}

.post-creation-expanded .post-modal-footer {
    padding: 15px 0 0 0;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

/* Mint toggle container styling */
#mint-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 150px;
}

/* Ensure mint toggle is visible and centered */
.post-modal-footer #mint-toggle-container {
    flex: 1;
    max-width: 300px;
}

.post-input-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f0f2f5;
    min-width: 40px;
    min-height: 40px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-input-wrapper {
    flex-grow: 1;
    margin-left: 10px;
}

.post-input-container .post-input {
    width: 100%;
    border: none;
    background-color: #f0f2f5;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px;
    cursor: pointer;
}

.post-input-container .post-modal-textarea {
    width: 100%;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    resize: none;
    min-height: 100px;
    max-height: 400px;
    font-family: inherit;
    overflow-y: auto;
    line-height: 1.5;
}

.post-input-container .post-modal-textarea:focus {
    outline: none;
    border-color: #1877f2;
}

.post-actions {
    display: flex;
    padding: 8px;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 10px;
    flex-wrap: wrap;
}

.post-attachment-btn, 
.post-video-btn, 
.post-link-btn, 
.post-poll-btn,
.post-topic-btn,
.post-modal-attachment-btn,
.post-modal-video-btn,
.post-modal-link-btn,
.post-modal-poll-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
}

.post-attachment-btn:hover, 
.post-video-btn:hover, 
.post-link-btn:hover, 
.post-poll-btn:hover,
.post-topic-btn:hover,
.post-modal-attachment-btn:hover,
.post-modal-video-btn:hover,
.post-modal-link-btn:hover,
.post-modal-poll-btn:hover {
    background-color: #f0f2f5;
}

.post-submit-btn,
.post-modal-submit-btn,
.comment-submit-btn,
.reply-submit-btn,
.topic-selection-submit-btn,
.topic-submit-btn,
.btn-primary {
    background-color: #1877f2;
    margin-left: auto;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
}

.post-submit-btn:hover,
.post-modal-submit-btn:hover,
.comment-submit-btn:hover,
.reply-submit-btn:hover,
.topic-selection-submit-btn:hover,
.topic-submit-btn:hover,
.btn-primary:hover {
    background-color: #166fe5;
}

.post-submit-btn:disabled,
.post-modal-submit-btn:disabled,
.comment-submit-btn:disabled,
.reply-submit-btn:disabled,
.topic-selection-submit-btn:disabled,
.topic-submit-btn:disabled,
.btn-primary:disabled {
    background-color: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #e4e6eb;
    color: #050505;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #d8dadf;
}

/* Posts Feed */
.posts-feed {
    margin-bottom: 40px;
}

.post-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    overflow: hidden;
}

.post-card.comment {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.post-user-info {
    margin-left: 10px;
    flex-grow: 1;
}

.post-username {
    font-weight: bold;
    color: #1877f2;
    text-decoration: none;
}

.post-username:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 12px;
    color: #65676b;
}

.post-permalink {
    margin-left: auto;
}

.post-permalink-link {
    color: #65676b;
    font-size: 14px;
}

.post-content {
    padding: 0 16px 16px;
    word-wrap: break-word;
    text-align: center;
}

/* Ensure proper spacing between different content types */
.post-content > * {
    margin-bottom: 15px;
}

.post-content > *:last-child {
    margin-bottom: 0;
}

.post-text {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

/* Long comment styles */
.long-comment.collapsed {
    position: relative;
}

.comment-text-short,
.comment-text-full {
    margin-bottom: 5px;
}

.comment-text-toggle {
    color: #1877f2;
    cursor: pointer;
    font-weight: 500;
    margin-top: 5px;
    display: inline-block;
}

.comment-text-toggle:hover {
    text-decoration: underline;
}

/* Post images */
.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 15px;
    display: block;
}

.post-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.post-gallery-item {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.post-gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post video */
.post-video {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.post-video iframe,
.post-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Post links display */
.post-links-container {
    margin-bottom: 15px;
}

.post-link-item {
    display: block;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.post-link-title {
    font-weight: bold;
    color: #1877f2;
    margin-bottom: 4px;
}

.post-link-url {
    font-size: 12px;
    color: #65676b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Post poll display */
.post-poll {
    background-color: #f0f2f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.post-poll-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.post-poll-option {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.post-poll-option label {
    margin-left: 8px;
}

.post-poll-voters {
    font-size: 12px;
    color: #65676b;
    margin-top: 2px;
    margin-left: 24px;
}

/* Post topics display */
.post-topics {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #65676b;
}

.post-topic-tag,
.post-topic {
    display: inline-block;
    background-color: #e4e6eb;
    color: #050505;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-right: 5px;
    margin-bottom: 5px;
}

.post-topic-tag:hover,
.post-topic:hover {
    background-color: #d8dadf;
    text-decoration: none;
}

/* Parent post link */
.post-parent-link {
    margin-top: 10px;
    margin-bottom: 5px;
}

.post-parent-link a {
    color: #1877f2;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.post-parent-link a i {
    margin-right: 5px;
}

/* Post footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #eee;
}

.post-reactions {
    display: flex;
    gap: 8px;
}

.post-reaction-btn,
.post-actions button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.post-reaction-btn:hover,
.post-actions button:hover {
    background-color: #f0f2f5;
}

.post-reaction-btn.active {
    color: #1877f2;
}

.post-reaction-count {
    margin-left: 4px;
}

.post-actions {
    display: flex;
    gap: 8px;
}

/* No posts message */
.no-posts,
.no-topics,
.no-streams,
.no-comments {
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.error-message {
    text-align: center;
    padding: 20px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Topics Tab Styles */
.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.topics-search {
    display: flex;
    align-items: center;
    max-width: 300px;
    width: 100%;
}

#topic-search-input,
.topic-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

#topic-search-input:focus,
.topic-search-input:focus {
    outline: none;
    border-color: #1877f2;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.topic-item:hover {
    background-color: #f0f2f5;
}

.topic-item.selected {
    background-color: #e7f3ff;
}

.topic-name {
    font-weight: 500;
}

.topic-count {
    color: #65676b;
    font-size: 14px;
}

.topic-label {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.topic-posts-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.topic-back-button {
    background: none;
    border: none;
    color: #1877f2;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.topic-back-button i {
    margin-right: 5px;
}

.topic-back-button:hover {
    text-decoration: underline;
}

/* Comments Styles */
.post-comments {
    padding-left: 15px;
    margin-bottom: 15px;
}

.level-1 {
    margin-left: 20px;
    border-left: 2px solid #ddd;
    padding-left: 15px;
}

.level-2 {
    margin-left: 40px;
    border-left: 2px solid #eee;
    padding-left: 15px;
}

.comment {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.comment-item {
    display: flex;
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.small-avatar {
    width: 24px;
    height: 24px;
}

.comment-content {
    flex-grow: 1;
}

.comment-username {
    font-weight: bold;
    color: #1877f2;
    text-decoration: none;
}

.nested-content {
    font-size: 13px;
}

.nested-comment-preview {
    color: #65676b;
    margin-right: 5px;
}

.view-full-reply {
    color: #1877f2;
    font-size: 12px;
    text-decoration: none;
}

.view-full-reply:hover {
    text-decoration: underline;
}

.view-all-replies {
    display: block;
    margin: 10px 0;
    color: #1877f2;
    font-weight: 500;
    text-decoration: none;
}

.view-all-replies:hover {
    text-decoration: underline;
}

.nested-reply {
    padding: 5px;
    margin-bottom: 5px;
    background-color: #f0f2f5;
}

/* Live Streams Tab Styles */
.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stream-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stream-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stream-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
}

.stream-thumbnail iframe,
.stream-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stream-info {
    padding: 15px;
}

.stream-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.stream-description {
    color: #65676b;
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #65676b;
}

.live-badge {
    background-color: #e41e3f;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 10px;
}

.create-stream-btn {
    display: inline-block;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: bold;
    text-decoration: none;
    margin-top: 10px;
}

.create-stream-btn:hover {
    background-color: #166fe5;
}

.past-streams-heading {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal,
.post-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active,
.post-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.modal-content,
.post-modal-content,
.comments-modal-content,
.topic-selection-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header,
.post-modal-header,
.comments-modal-header,
.topic-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-title,
.post-modal-title,
.comments-modal-title,
.topic-selection-title {
    font-weight: bold;
    font-size: 18px;
}

.modal-close,
.post-modal-close,
.comments-modal-close,
.topic-selection-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #65676b;
}

.modal-body,
.post-modal-body,
.comments-modal-body,
.topic-selection-body {
    padding: 20px;
}

.modal-footer,
.post-modal-footer,
.comments-modal-footer,
.topic-selection-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Post Modal Specific Styles */
.post-modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 15px;
}

.post-modal-textarea:focus {
    outline: none;
    border-color: #1877f2;
}

.post-modal-attachments {
    margin-bottom: 15px;
}

.post-modal-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.post-modal-filename {
    font-size: 14px;
    color: #65676b;
    margin-bottom: 10px;
}

.post-video-container,
.post-link-container,
.post-poll-container,
.post-topics-container {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f0f2f5;
    border-radius: 8px;
}

#post-video-url,
.link-title-input,
.link-url-input,
.poll-title-input,
.poll-option-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.post-video-preview {
    margin-top: 10px;
}

.link-inputs {
    margin-bottom: 15px;
}

.add-link-btn,
.add-option-btn {
    background-color: #e4e6eb;
    color: #050505;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 5px;
}

.add-link-btn:hover,
.add-option-btn:hover {
    background-color: #d8dadf;
}

.links-preview {
    margin-top: 15px;
}

.link-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.link-preview-title {
    font-weight: 500;
}

.link-preview-url {
    font-size: 12px;
    color: #65676b;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-link-btn,
.remove-option-btn,
.remove-photo-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 14px;
}

.remove-link-btn:hover,
.remove-option-btn:hover,
.remove-photo-btn:hover {
    color: #1877f2;
}

.poll-options {
    margin-bottom: 15px;
}

.poll-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.poll-option-input {
    flex-grow: 1;
    margin-right: 10px;
}

/* Photo Gallery */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Topic Selection Styles */
.topic-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.selected-topics {
    margin-top: 15px;
}

.selected-topics h4 {
    margin-bottom: 10px;
}

.selected-topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.selected-topic {
    display: flex;
    align-items: center;
    background-color: #e7f3ff;
    color: #1877f2;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 14px;
}

.remove-topic {
    background: none;
    border: none;
    color: #1877f2;
    cursor: pointer;
    margin-left: 5px;
}

/* Comment Input Styles */
.comment-input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    width: 100%;
}

.comment-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    min-height: 60px;
}

.comment-attachments {
    display: flex;
    margin-top: 10px;
}

.comment-attachment-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
}

.comment-photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.comment-photo-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.comment-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-comment-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* Share Modal Styles */
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.share-option {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.share-option:hover {
    background-color: #e4e6eb;
}

.share-option i {
    margin-right: 8px;
    font-size: 18px;
}

.share-link-container {
    display: flex;
    margin-top: 15px;
}

#share-link {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#copy-link-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 15px;
    cursor: pointer;
}

#share-success {
    color: #4caf50;
    margin-top: 10px;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.notification {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    margin-bottom: 10px;
    animation: notificationFadeIn 0.3s, notificationFadeOut 0.3s 2.7s;
    max-width: 300px;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.info {
    border-left: 4px solid #2196f3;
}

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

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .post-attachment-btn span,
    .post-video-btn span,
    .post-link-btn span,
    .post-poll-btn span,
    .post-modal-attachment-btn span,
    .post-modal-video-btn span,
    .post-modal-link-btn span,
    .post-modal-poll-btn span {
        display: none;
    }
    
    .stream-grid {
        grid-template-columns: 1fr;
    }
    
    .modal.active,
    .post-modal.active {
        padding: 10px;
        align-items: center;
    }
    
    .modal-content,
    .post-modal-content,
    .comments-modal-content,
    .topic-selection-content {
        margin: 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    /* Inline expanded form on mobile */
    .post-creation-expanded {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .post-creation-expanded .post-modal-footer {
        flex-wrap: wrap;
    }
    
    .post-creation-expanded .post-modal-footer button {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #18191a;
        color: #e4e6eb;
    }
    
    h1, h2, h3 {
        color: #e4e6eb;
    }
    
    .post-creation,
    .post-card,
    .no-posts,
    .no-topics,
    .no-streams,
    .no-comments,
    .modal-content,
    .post-modal-content,
    .comments-modal-content,
    .topic-selection-content,
    .notification {
        background-color: #242526;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .post-input,
    .post-modal-textarea,
    .comment-input,
    #post-video-url,
    .link-title-input,
    .link-url-input,
    .poll-title-input,
    .poll-option-input,
    #topic-search-input,
    .topic-search-input,
    #share-link,
    .form-group input,
    .form-group textarea {
        background-color: #3a3b3c;
        border-color: #3a3b3c;
        color: #e4e6eb;
    }
    
    .post-attachment-btn,
    .post-video-btn,
    .post-link-btn,
    .post-poll-btn,
    .post-modal-attachment-btn,
    .post-modal-video-btn,
    .post-modal-link-btn,
    .post-modal-poll-btn,
    .post-reaction-btn,
    .post-actions button,
    .modal-close,
    .post-modal-close,
    .comments-modal-close,
    .topic-selection-close {
        color: #b0b3b8;
    }
    
    .post-attachment-btn:hover,
    .post-video-btn:hover,
    .post-link-btn:hover,
    .post-poll-btn:hover,
    .post-modal-attachment-btn:hover,
    .post-modal-video-btn:hover,
    .post-modal-link-btn:hover,
    .post-modal-poll-btn:hover,
    .post-reaction-btn:hover,
    .post-actions button:hover {
        background-color: #3a3b3c;
    }
    
    .post-username,
    .comment-username,
    .topic-back-button,
    .view-all-replies,
    .view-full-reply,
    .comment-text-toggle {
        color: #4599ff;
    }
    
    .post-time,
    .post-link-url,
    .post-poll-voters,
    .post-topics,
    .topic-count,
    .stream-description,
    .stream-meta,
    .post-modal-filename,
    .link-preview-url {
        color: #b0b3b8;
    }
    
    .modal-header,
    .post-modal-header,
    .comments-modal-header,
    .topic-selection-header,
    .modal-footer,
    .post-modal-footer,
    .comments-modal-footer,
    .topic-selection-footer,
    .post-footer {
        border-color: #3a3b3c;
    }
    
    .post-video-container,
    .post-link-container,
    .post-poll-container,
    .post-topics-container,
    .post-poll,
    .topic-list,
    .share-option {
        background-color: #3a3b3c;
    }
    
    .post-link-item,
    .link-preview-item {
        background-color: #3a3b3c;
    }
    
    .post-topic-tag,
    .post-topic {
        background-color: #3a3b3c;
        color: #e4e6eb;
    }
    
    .post-topic-tag:hover,
    .post-topic:hover {
        background-color: #4e4f50;
    }
    
    .btn-secondary,
    .add-link-btn,
    .add-option-btn {
        background-color: #3a3b3c;
        color: #e4e6eb;
    }
    
    .btn-secondary:hover,
    .add-link-btn:hover,
    .add-option-btn:hover {
        background-color: #4e4f50;
    }
    
    .comment,
    .comment-item,
    .nested-reply {
        background-color: #3a3b3c;
    }
    
    .loading-indicator {
        background-color: rgba(0, 0, 0, 0.8);
        color: #e4e6eb;
    }
    
    .spinner {
        border-color: #3a3b3c;
        border-top-color: #4599ff;
    }
    
    .selected-topic {
        background-color: #263951;
        color: #4599ff;
    }
    
    .topic-item:hover {
        background-color: #3a3b3c;
    }
    
    .topic-item.selected {
        background-color: #263951;
    }
    
    /* Error message in dark mode */
    .error-message {
        background-color: #3a0505;
        color: #ff8080;
    }
    
    /* Notification styles in dark mode */
    .notification.success {
        border-left-color: #4caf50;
    }
    
    .notification.error {
        border-left-color: #f44336;
    }
    
    .notification.info {
        border-left-color: #2196f3;
    }
}

/* Remove the Topics button from the post modal footer */
.post-modal-topic-btn {
    display: none;
}

/* Stream video container styles - make these more specific */
.stream-card .stream-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 15px;
}

.stream-card .stream-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.board-header h3 {
    color: #ffffff;
}

/* Add this at the end of the file */
/* Hide scrollbars for all elements while maintaining scroll functionality */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Hide scrollbars for Chrome, Safari and Opera */
*::-webkit-scrollbar {
    display: none;
}

.board-container.hidden {
    z-index: 2000 !important; /* Higher than other elements */
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    display: block !important;
}

.board-container.hidden .hide-btn {
    display: block !important;
    color: #ffffff !important;
}

/* Back button in modals */
.topic-back-btn {
    background-color: #e4e6eb;
    color: #050505;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.topic-back-btn:hover {
    background-color: #d8dadf;
}

.topic-back-btn i {
    margin-right: 5px;
}

/* Dark mode styles for back button */
@media (prefers-color-scheme: dark) {
    .topic-back-btn {
        background-color: #3a3b3c;
        color: #e4e6eb;
    }
    
    .topic-back-btn:hover {
        background-color: #4e4f50;
    }
}

/* Comment form in single post view */
.comment-form-wrapper {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.open-comment-modal-btn {
    padding: 10px 20px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.open-comment-modal-btn:hover {
    background-color: #166fe5;
}

.open-comment-modal-btn i {
    margin-right: 5px;
}

/* Dark mode styles for comment form */
@media (prefers-color-scheme: dark) {
    .comment-form-wrapper {
        background-color: #242526;
    }
}

/* Mobile styles for Continue button */
@media screen and (max-width: 768px) {
    .post-modal-submit-btn {
        margin-left: auto !important;
        margin-right: 0 !important;
        float: right !important;
        order: 999 !important;
        clear: both !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
        position: relative !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .post-modal-footer {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
}

/* Modal positioning for mobile devices */
@media screen and (max-width: 768px) {
    #post-modal {
      align-items: flex-start !important;
    }
    
    .post-modal-content {
      margin-top: 0 !important;
      border-radius: 0 0 10px 10px !important; /* Round only bottom corners */
      max-height: 90vh !important; /* Limit height to prevent overflow */
      overflow-y: auto !important; /* Enable scrolling if content is too tall */
    }
    
    /* When topic selection is shown */
    .topic-selection-content {
      margin-top: 0 !important;
      border-radius: 0 0 10px 10px !important;
      max-height: 90vh !important;
      overflow-y: auto !important;
    }
  }

  /* Increase height of topic selection view on mobile */
@media screen and (max-width: 768px) {
    /* Target the topic list container */
    .topic-list {
      max-height: 57vh !important; /* Use viewport height for better mobile experience */
    }
    
    /* Make the entire modal taller when showing topics */
    .post-modal-content:has(.topic-list) {
      max-height: 87vh !important;
    }
    
    /* Alternative selector if :has isn't supported in all browsers */
    .post-modal-content .topic-list {
      max-height: 57vh !important;
    }
  }
  