* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #F2F2F2;
    color: #1a1a1a;
    line-height: 1.5;
}

/* Top Header */
.top-header {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #1a1a1a;
}

.menu {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
}

.menu a:hover {
    color: #0066cc;
}

.searchbar {
    display: flex;
    gap: 0.5rem;
}

.searchbar input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.searchbar button {
    background: none;
    border: 1px solid #0066cc;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #0066cc;
}

/* Global button outline (used in hero and elsewhere) */
.btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid #0066cc;
    border-radius: 4px;
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

.btn-outline:hover {
    background: #0066cc;
    color: white;
}

/* Timeline layout (used in logged‑in view) */
.timeline-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-feed {
    flex: 3;
    min-width: 250px;
}

.right-sidebar {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Tabs (global for logged‑in feed) */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    color: #666;
}

.tab-btn.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
    margin-bottom: -2px;
}

/* Post Card (used in AJAX feed and post/view) */
.post-card {
    background: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.post-card h2 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.post-card h2 a {
    text-decoration: none;
    color: #1a1a1a;
}

.post-card h2 a:hover {
    color: #0066cc;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.tag {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #333;
}

.vote-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem;
    background: #F2F2F2;
    border-radius: 8px;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.vote-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #1a1a1a;
}

.vote-bar button:hover {
    color: #0066cc;
}

/* Load More button */
.btn-load {
    background: none;
    border: 1px solid #0066cc;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    color: #0066cc;
    cursor: pointer;
    font-size: 1rem;
}

.btn-load:hover {
    background: #0066cc;
    color: white;
}

/* Auth forms */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.auth-container button {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 1px solid #0066cc;
    color: #0066cc;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.error {
    color: red;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    margin-top: 3rem;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: #F2F2F2;
}

.footer-menu-columns {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-menu-columns ul {
    list-style: none;
}

.footer-menu-columns a {
    text-decoration: none;
    color: #333;
}

.social-icons a {
    margin-right: 1rem;
    text-decoration: none;
    color: #333;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    background: #e0e0e0;
    font-size: 0.8rem;
}

/* Single post view */
.post-header {
    background: white;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.post-content {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    line-height: 1.8;
}

.comments-section {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.comment {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

/* Sidebar widget (global) */
.sidebar-widget {
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    margin-bottom: 0.5rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
    }
    .timeline-container {
        flex-direction: column;
    }
    .main-feed, .right-sidebar {
        flex: auto;
        width: 100%;
    }
    .footer-top {
        flex-direction: column;
    }
}
/* Additional custom styles not covered by Bootstrap */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #f8f9fc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* Override any Bootstrap quirks */
.card {
    border: none;
}
.navbar .btn-outline-light {
    border-color: rgba(255,255,255,0.5);
    color: white;
}
.navbar .btn-outline-light:hover {
    background: white;
    color: #1a2980;
}
/* Keep footer links */
footer a {
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}