* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #151515;
    --bg-tertiary: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --border: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beta-badge {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    letter-spacing: 1px;
    vertical-align: super;
    animation: pulse 2s ease-in-out infinite;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-btn:hover {
    color: var(--text-primary);
}

.nav-btn.active {
    color: var(--accent);
}

.login-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.login-btn:hover {
    background: var(--accent-hover);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
}

.logout-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.container {
    max-width: 100%;
    width: 100%;
    margin-top: 100px;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1rem 0;
    overflow-x: hidden;
    flex: 1 0 auto;
    min-height: calc(100vh - 100px - 150px);
}

.content-wrapper {
    width: 100%;
}

/* Mobile Warning Overlay */
.mobile-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.mobile-warning-content {
    text-align: center;
    max-width: 500px;
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 2px solid var(--accent);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.3);
}

.mobile-warning-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.mobile-warning-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-warning-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.mobile-warning-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-secondary);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.post-input {
    width: 100%;
    min-height: 150px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

.post-input:focus {
    outline: 2px solid var(--accent);
    border-color: var(--accent);
}

.image-upload-section {
    margin-bottom: 1rem;
}

.upload-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
}

.image-preview {
    margin-top: 1rem;
    position: relative;
    max-width: 100%;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-img-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.remove-img-btn:hover {
    opacity: 0.8;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--accent-hover);
}

.feed-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trending-box,
.suggestions-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.trending-box h3,
.suggestions-box h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.trending-tag {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.trending-tag:last-child {
    border-bottom: none;
}

.trending-tag:hover {
    padding-left: 0.5rem;
    background: var(--bg-tertiary);
}

.trending-tag-count {
    float: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.suggested-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.suggested-user:last-child {
    border-bottom: none;
}

.suggested-user img {
    width: 35px;
    height: 35px;
    object-fit: cover;
}

.suggested-user-info {
    flex: 1;
}

.suggested-user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.suggested-user .follow-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

.post {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.post.nsfw-filtered {
    border: 2px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.nsfw-warning {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.post-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-timestamp {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.post-content {
    padding: 1rem;
}

.post-text {
    margin-bottom: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

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

.post-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.post-image.spoiler {
    filter: blur(20px);
    cursor: pointer;
}

.spoiler-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    pointer-events: none;
}

.post-actions {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.action-btn.liked {
    color: var(--danger);
}

.action-btn.saved {
    color: var(--success);
}

.comments-section {
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.comment-input-container {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-submit-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.comment-submit-btn:hover {
    background: var(--accent-hover);
}

.comments-list {
    padding: 1rem;
}

.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-timestamp {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.auth-switch p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
}

.link-btn:hover {
    color: var(--accent-hover);
}

.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    transition: all 0.3s;
}

.password-strength.weak {
    width: 33%;
    background: var(--danger);
}

.password-strength.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength.strong {
    width: 100%;
    background: var(--success);
}

.post-stats {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.share-btn {
    margin-left: auto;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
}

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--accent);
}

.search-bar {
    margin-bottom: 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-section {
    max-width: 100%;
}

.profile-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile-email,
.profile-joined {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.settings-section {
    max-width: 700px;
}

.settings-title {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.settings-group {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-group h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-input {
    flex: 1;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-danger:hover {
    opacity: 0.8;
}

.danger-zone {
    border-color: var(--danger);
}

.warning-text {
    margin-top: 0.5rem;
    color: var(--danger);
    font-size: 0.85rem;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.admin-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 0.1rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.delete-post-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
    transition: color 0.2s;
    margin-left: auto;
}

.delete-post-btn:hover {
    color: var(--danger);
}

.delete-comment-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
    margin-left: 0.5rem;
}

.delete-comment-btn:hover {
    color: var(--danger);
}

.post-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    position: relative;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1rem;
}

/* New Features Styles */

/* Follow Button */
.follow-btn {
    padding: 0.4rem 1rem;
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: auto;
}

.follow-btn:hover {
    background: var(--accent-hover);
}

.follow-btn.following {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}

.follow-btn.following:hover {
    background: var(--danger);
}

/* Edit Button */
.edit-post-btn {
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    transition: all 0.2s;
}

.edit-post-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Hashtags and Mentions */
.hashtag, .mention {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.hashtag:hover, .mention:hover {
    text-decoration: underline;
}

/* Tab Buttons */
.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Threads Section */
.threads-section {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

.threads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.thread-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.thread-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.thread-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.thread-title {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.thread-creator {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.thread-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.thread-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.thread-time {
    margin-left: auto;
}

/* Thread View Modal */
.thread-modal-content {
    max-width: 900px;
    width: 95%;
}

.thread-modal-content .modal-header {
    flex-direction: column;
    align-items: flex-start;
}

.thread-modal-content .modal-header > div {
    flex: 1;
    width: 100%;
}

.thread-modal-content .modal-header h2 {
    margin-bottom: 0.5rem;
}

.thread-modal-content .modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.thread-modal-content .close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.thread-post-input {
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.thread-post-input textarea {
    margin-bottom: 1rem;
}

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

.thread-post {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 1rem;
}

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

.thread-post-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.thread-post-user {
    flex: 1;
}

.thread-post-username {
    font-weight: 600;
    font-size: 0.95rem;
}

.thread-post-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.thread-post-content {
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
}

.thread-post-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.thread-post-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    transition: all 0.2s;
}

.thread-post-delete:hover {
    background: var(--danger);
    color: white;
}

/* Search Section */
.search-section {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-main {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-button {
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.search-button:hover {
    background: var(--accent-hover);
}

.search-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    color: var(--text-primary);
    border-color: var(--accent);
}

.search-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.user-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-card-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.user-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-card-name {
    font-weight: 600;
    font-size: 1rem;
}

.user-card-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hashtags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hashtag-card {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.hashtag-card:hover {
    background: var(--accent);
    color: var(--text-primary);
}

/* Notifications Section */
.notifications-section {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.notif-badge {
    display: inline-block;
    background: var(--danger);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.clear-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: var(--danger);
    color: var(--text-primary);
}

.notification-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.notification-item.unread {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notif-icon {
    font-size: 1.5rem;
}

.notif-content {
    flex: 1;
}

.notif-content p {
    margin-bottom: 0.25rem;
}

.notif-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.empty-trending {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .feed-container {
        grid-template-columns: 1fr 250px;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .sidebar {
        top: 90px;
    }
    
    .trending-box,
    .suggestions-box {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .beta-badge {
        font-size: 0.4rem;
        padding: 0.15rem 0.3rem;
    }

    .container {
        margin-top: 80px;
        padding: 1rem 0.5rem 0;
        min-height: calc(100vh - 80px - 80px);
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal h2 {
        font-size: 1.3rem;
    }
    
    button {
        min-height: 44px;
        font-size: 0.95rem;
    }
    
    .create-btn, .login-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .threads-grid,
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .feed-container {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
    
    .sidebar {
        display: none;
    }
    
    .post {
        border-radius: 8px;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
    }
    
    .post-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .post-actions {
        padding: 0.5rem 0.75rem;
        gap: 1rem;
    }
    
    .post-actions button {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .post-image {
        max-height: 400px;
        border-radius: 8px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
        padding: 0.75rem;
    }
    
    .thread-card,
    .user-card {
        padding: 1rem;
    }
    
    .comment {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .notification-item {
        padding: 0.75rem;
    }
}   

/* Footer Styles */
.footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border);
    margin-top: auto;
    padding: 3rem 2rem 1rem;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-beta-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* Legal Modal */
.legal-modal-content {
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
}

.legal-modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    line-height: 1.8;
}

.legal-modal-body h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-modal-body h3:first-child {
    margin-top: 0;
}

.legal-modal-body h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-modal-body ul,
.legal-modal-body ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.legal-modal-body li {
    margin-bottom: 0.5rem;
}

.legal-modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-modal-body .highlight-box {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.legal-modal-body .warning-box {
    background: rgba(220, 38, 38, 0.1);
    border-left: 3px solid var(--danger);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.legal-date {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .user-info {
        gap: 0.5rem;
    }
    
    .logout-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
        z-index: 1001;
    }
    
    .nav-actions {
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    
    .nav-actions.active {
        max-height: calc(100vh - 58px);
        overflow-y: auto;
    }
    
    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 1rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        position: relative;
    }
    
    .nav-btn.active {
        background: var(--bg-tertiary);
        border-left: 3px solid var(--accent);
    }
    
    .nav-btn:hover {
        background: var(--bg-tertiary);
    }
    
    .notif-badge {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .user-section {
        width: 100%;
        padding: 1rem 1.5rem;
        border-top: 2px solid var(--border);
    }
    
    .login-btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .container {
        min-height: calc(100vh - 70px - 80px);
        margin-bottom: 0;
    }
    
    .footer {
        padding: 0.5rem 1rem 0.3rem;
        margin-top: auto;
        position: relative;
        width: 100%;
        min-height: 80px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    .footer-section {
        margin-bottom: 0;
        display: none;
    }
    
    .footer-section:first-child {
        display: block;
        text-align: center;
    }
    
    .footer-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .footer-description {
        display: none;
    }
    
    .footer-beta-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .footer-links {
        display: none;
    }
    
    .footer-links li {
        margin-bottom: 0;
        font-size: 0.7rem;
    }
    
    .footer-bottom {
        padding-top: 0.5rem;
        padding-bottom: 0.3rem;
        font-size: 0.65rem;
        margin-top: 0.3rem;
    }
    
    .footer-bottom p {
        margin: 0.2rem 0;
    }
}
  
/* New Features Styles */  
  
/* User Badges */  
.user-badge {  
    display: inline-block;  
    margin-left: 4px;  
    font-size: 14px;  
}  
  
/* Post Header Actions */  
.post-header {  
    display: flex;  
    align-items: center;  
    gap: 12px;  
    position: relative;  
}  
  
.post-header-actions {  
    margin-left: auto;  
    display: flex;  
    align-items: center;  
    gap: 8px;  
    position: relative;  
}  
  
.post-menu-btn {  
    background: none;  
    border: none;  
    color: var(--text-secondary);  
    font-size: 20px;  
    cursor: pointer;  
    padding: 4px 8px;  
}  
  
.post-menu {  
    position: absolute;  
    top: 100%;  
    right: 0;  
    background: var(--bg-secondary);  
    border: 1px solid var(--border);  
    padding: 8px 0;  
    min-width: 200px;  
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-height: 300px;
    overflow-y: auto;
}  
  
.menu-item {  
    width: 100%;  
    padding: 12px 16px;  
    background: none;  
    border: none;  
    color: var(--text-primary);  
    text-align: left;  
    cursor: pointer;  
    font-size: 14px;
    display: block;
    white-space: nowrap;
}  
  
.menu-item:hover {  
    background: var(--bg-tertiary);  
}

/* Messages Section */
.messages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    height: calc(100vh - 120px);
}

.conversations-list {
    background: var(--bg-secondary);
    padding: 1rem;
    overflow-y: auto;
    height: 100%;
}

.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversation-item:hover {
    background: var(--bg-tertiary);
}

.conversation-item.active {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.conversation-info {
    flex: 1;
}

.conversation-name {
    font-weight: 600;
    color: var(--text-primary);
}

.conversation-preview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chat-container {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.chat-header-info {
    flex: 1;
}

.chat-header-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    display: flex;
    gap: 12px;
    max-width: 70%;
}

.message-item.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.message-content {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
}

.message-item.sent .message-content {
    background: var(--accent);
    color: white;
}

.message-text {
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.message-item.sent .message-time {
    color: rgba(255,255,255,0.7);
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 24px;
    font-size: 1rem;
}

.chat-send-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
}

.chat-send-btn:hover {
    background: var(--accent-hover);
}

.empty-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 70px);
    }
    
    .chat-container {
        height: 100%;
    }
    
    .chat-messages {
        height: calc(100% - 120px);
    }
    
    .conversation-item {
        padding: 0.75rem;
    }
    
    .chat-input-container input {
        font-size: 16px;
    }
}
  
/* Video Support */  
.post-video-container {  
    margin-top: 12px;  
    position: relative;  
}  
  
.post-video {  
    width: 100%%;  
    max-height: 500px;  
    background: black;  
}  
  
.media-upload-section {  
    display: flex;  
    gap: 12px;  
    flex-wrap: wrap;  
}  
  
.video-preview {  
    margin-top: 12px;  
    position: relative;  
