* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: auto;
    scrollbar-color: #374151 #0f1419;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #0f1419;
    color: white;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0f1419;
    border-radius: 0;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 0;
    transition: background 0.3s;
    border: 2px solid #0f1419;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 4rem;
    position: fixed;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #0f1419;
    padding: 1rem 0;
    z-index: 30;
}

.logo {
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    border-radius: 9999px;
    cursor: pointer;
}

.logo:hover {
    background-color: #16181c;
}

.nav-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    justify-content: center;
}

.nav-icon {
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon:hover {
    background-color: #16181c;
}

.nav-icon.active {
    background-color: #272b30;
}

.search-panel {
    position: fixed;
    left: 4rem;
    top: 0;
    width: 0;
    height: 100vh;
    background-color: #16181c;
    border-right: 1px solid #374151;
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 20;
}

.search-panel.active {
    width: 300px;
}

.search-container {
    padding: 1rem;
    width: 300px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.search-results {
    margin-top: 1rem;
    overflow-y: auto;
    flex: 1;
    display: none;
    flex-direction: column;
    gap: 1rem;
    height: calc(100vh - 5rem);
}

.search-results.active {
    display: flex;
}

.search-results .post-card {
    background-color: #1f2937;
}

.search-input-container {
    position: relative;
    margin-bottom: 1rem;
    padding: 0rem 0;
    cursor: text;
    border-bottom: 3px solid #374151;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    padding-left: 0;
}

.search-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.search-text {
    display: inline-block;
    min-width: 1px;
    color: white;
    font-size: 1.25rem;
    margin-left: 0;
    white-space: pre;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.3em;
    background-color: #374151;
    margin-left: 0px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

.search-placeholder {
    position: absolute;
    color: #6b7280;
    pointer-events: none;
    font-size: 1.25rem;
    opacity: 0.5;
}

@keyframes blink {
    from, to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.main-content {
    flex: 1;
    margin-left: 4rem;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    height: 100vh;
    overflow-y: auto;
    background-color: #0f1419;
    position: relative;
}

.top-bar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1rem;
    background-color: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #374151;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.refresh-button {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: transparent;
    position: absolute;
    right: 1rem;
}

.refresh-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.refresh-button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #e5e7eb;
}

.main-content.comments-active {
    margin-right: 0;
}

.feeds-container {
    display: flex;
    flex: 1;
    margin-top: 0;
    height: auto;
    transition: transform 0.3s ease;
    justify-content: center;
    border-left: none;
    border-right: none;
    background-color: #0f1419;
    padding: 1.75rem 0.5rem 0.5rem 0.5rem;
}

.feeds-container.comments-active {
    transform: none;
}

.feed {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    max-width: 600px;
    height: auto;
    transition: transform 0.3s ease;
    background-color: #16181c;
    border-radius: 12px;
    margin: 0.75rem;
    overflow-y: visible;
}

.feed .post-card {
    width: 100%;
    border-radius: 0;
    border: 1px solid rgba(55, 65, 81, 0.2);
    margin: 0;
    background-color: #16181c;
    padding: 1.5rem 1.75rem;
    position: relative;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feed .post-card:first-child {
    border-radius: 1.25rem 1.25rem 0 0;
}

.feed .post-card:hover {
    background-color: rgba(255, 255, 255, 0.03);
    transform: none;
}

.post-card {
    background-color: #16181c;
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    max-width: 830px;
    margin: 0;
    width: 100%;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-card:hover {
    background-color: #1a1d23;
    transform: translateY(-1px);
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    overflow: hidden;
}

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

.post-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 0;
}

.author {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.username {
    font-size: 1rem;
    color: #6b7280;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    flex-wrap: wrap;
}

.timestamp {
    font-size: 1rem;
    color: #6b7280;
}

.dot-separator {
    color: #6b7280;
    font-size: 1rem;
}

.post-tags-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.post-tag-inline {
    background-color: #1f2937;
    color: #9ca3af;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.post-tag-inline:hover {
    background-color: #252f3f;
    color: #d1d5db;
}

.post-tags {
    display: none;
}

.post-content {
    margin-left: 3.25rem;
    margin-top: -0.5rem;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.post-card-actions {
    display: flex;
    gap: 0.75rem;
    color: #9ca3af;
    margin-top: 1rem;
    justify-content: flex-start;
    margin-left: 3.25rem;
}

.action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
    background-color: #1f2937;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: 1px solid rgba(55, 65, 81, 0.2);
}

.action:hover {
    color: white;
    background-color: #252f3f;
    transform: translateY(-1px);
}

.action.liked {
    color: #ef4444;
    background-color: #1f2937;
}

.action.liked:hover {
    background-color: #374151;
}

.action.liked svg {
    fill: currentColor;
}

.action-count {
    font-weight: 500;
    font-size: 0.8125rem;
}

.icon {
    width: 1.125rem;
    height: 1.125rem;
}

.action .icon {
    width: 1rem;
    height: 1rem;
}

.create-post-panel {
    position: fixed;
    left: 4rem;
    top: 0;
    width: 0;
    height: 100%;
    background-color: #16181c;
    border-right: 1px solid #374151;
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 20;
}

.create-post-panel.active {
    width: 400px;
}

.create-post-container {
    padding: 1.5rem;
    width: 400px;
    display: flex;
    flex-direction: column;
}

.create-post-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: white;
    letter-spacing: 0.02em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2a2f38;
}

.post-input-container {
    position: relative;
    margin-bottom: 1rem;
}

.post-textarea {
    width: 100%;
    min-height: 120px;
    background-color: #1a1e24;
    border: 1px solid #2d3643;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    padding: 1rem;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.post-textarea:focus {
    border-color: #4b5563;
    background-color: #1c202a;
}

.tags-container {
    margin-bottom: 1rem;
}

.tags-input {
    width: 100%;
    background-color: #1a1e24;
    border: 1px solid #2d3643;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tags-input:focus {
    border-color: #4b5563;
    background-color: #1c202a;
}

.tags-input::placeholder {
    color: #6b7280;
}

.tags-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background-color: #2d3643;
    color: #d1d5db;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.25rem;
}

.tag-item button {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
}

.tag-item button:hover {
    color: #f87171;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.post-button {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cancel-button {
    background-color: #1c2230;
    color: #d1d5db;
    border: 1px solid #374151;
}

.cancel-button:hover {
    background-color: #252e3f;
    transform: translateY(-1px);
}

.post-submit-button {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.post-submit-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.post-submit-button:disabled {
    background-color: #374151;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.post-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    width: 100%;
    margin-top: 0.5rem;
    border-top: 1px solid #2a2f38;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.action-button:hover {
    background: #1f2937;
    color: #d1d5db;
}

.action-button.active {
    background: #2d3643;
    color: #3b82f6;
}

.action-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.post-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: -0.25rem;
    vertical-align: top;
    max-width: 150px;
    justify-content: flex-end;
    float: right;
}

.post-tag {
    background-color: #1f2937;
    color: #9ca3af;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
}

.post-tag:hover {
    background-color: #252f3f;
    color: #d1d5db;
}

.hidden {
    display: none;
}

.comments-panel {
    display: none;
}

.filter-button {
    position: fixed;
    top: 5rem;
    right: calc(50% - 407px);
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-button:hover {
    background-color: #252f3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #e5e7eb;
}

.filter-popup {
    position: fixed;
    top: 8rem;
    right: calc(50% - 370px);
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    width: 16rem;
    max-height: 20rem;
    padding: 1rem;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.filter-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #374151;
}

.filter-popup-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
}

.clear-filters {
    background: none;
    border: 1px solid #4b5563;
    color: #9ca3af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters:hover {
    background-color: #374151;
    color: #e7e7eb;
}

.filter-tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 15rem;
    overflow-y: auto;
}

.filter-tag-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-tag-item:hover {
    background-color: #374151;
}

.filter-tag-checkbox {
    width: 1rem;
    height: 1rem;
    border: 1px solid #4b5563;
    border-radius: 0.25rem;
    background-color: transparent;
    position: relative;
    cursor: pointer;
}

.filter-tag-checkbox.checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.filter-tag-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.filter-tag-label {
    color: #e5e7eb;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-tag-count {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: auto;
}

/* Profile Page Styles */
.profile-page {
    position: fixed;
    top: 4rem;
    left: 5rem;
    right: 0;
    bottom: 0;
    background-color: #0f1419;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.profile-page.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.profile-back-nav {
    position: fixed;
    top: -0.5rem;
    left: 0rem;
    z-index: 60;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.profile-page.active .profile-back-nav {
    opacity: 1;
    visibility: visible;
}

.profile-back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(55, 65, 81, 0.3);
    border-radius: 50%;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.profile-back-button:hover {
    background-color: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    transform: scale(1.05);
}

.profile-back-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.profile-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.profile-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.profile-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    flex: 1;
}

.profile-name {
    color: #e5e7eb;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.profile-username {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
}

.profile-bio {
    color: #e5e7eb;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    max-width: 400px;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    color: #e5e7eb;
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
}

.profile-posts h3 {
    color: #e5e7eb;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #374151;
}

.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-posts-list .post-card {
    border: 1px solid rgba(55, 65, 81, 0.2);
    border-radius: 0.75rem;
}

.avatar {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.follow-button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    background-color: transparent;
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-width: 100px;
}

.follow-button:hover {
    background-color: #3b82f6;
    color: white;
}

.follow-button.following {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.follow-button.following:hover {
    background-color: #ef4444;
    border-color: #ef4444;
}

.profile-content-section {
    margin-top: 1rem;
}

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

.profile-tab {
    flex: 1;
    background: none;
    border: none;
    color: #9ca3af;
    padding: 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.profile-tab:hover {
    color: #e5e7eb;
    background-color: rgba(255, 255, 255, 0.05);
}

.profile-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.profile-tab-content {
    position: relative;
    min-height: 200px;
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 1;
}

.profile-replies-list .post-card {
    border: 1px solid rgba(55, 65, 81, 0.2);
    border-radius: 0.75rem;
    background-color: rgba(55, 65, 81, 0.1);
}

.reply-context {
    background-color: rgba(55, 65, 81, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid #3b82f6;
}

.reply-context-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.reply-context-content {
    color: #e5e7eb;
    font-size: 0.875rem;
    font-style: italic;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 3rem 1rem;
    font-size: 0.875rem;
}

.empty-state-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem auto;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar {
        width: 4rem;
        height: 4rem;
    }
    
    .profile-name {
        font-size: 1.25rem;
    }

    .profile-back-nav {
        left: 1rem;
        top: 3.5rem;
    }
}

@media (max-width: 1200px) {
    .filter-button {
        right: 1.5rem;
    }

    .filter-popup {
        right: 1.5rem;
    }
}
