* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #dae0e6;
    color: #1c1c1c;
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #edeff1;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    color: #ff4500;
}

.logo span {
    font-size: 18px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f6f7f8;
    border: 1px solid #edeff1;
    border-radius: 20px;
    padding: 8px 16px;
    max-width: 600px;
    flex: 1;
    transition: all 0.2s;
}

.search-bar:focus-within {
    background-color: #ffffff;
    border-color: #0079d3;
}

.search-bar i {
    color: #7c7c7c;
    margin-right: 8px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #1c1c1c;
    text-decoration: none;
    position: relative;
    transition: background-color 0.2s;
}

.nav-icon:hover {
    background-color: #f6f7f8;
}

.nav-icon.active {
    color: #0079d3;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #ff4500;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-menu:hover {
    background-color: #f6f7f8;
}

.user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 24px auto;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    padding: 0 20px;
}

/* Left Sidebar */
.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-section {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
}

.sidebar-section h3 {
    font-size: 12px;
    font-weight: 500;
    color: #7c7c7c;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.community-list li,
.quick-links li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.community-list li:hover,
.quick-links li:hover {
    background-color: #f6f7f8;
}

.community-list i,
.quick-links i {
    color: #0079d3;
    width: 20px;
}

/* Feed Container */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.create-post-card {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.create-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #edeff1;
    border-radius: 4px;
    background-color: #f6f7f8;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.create-input:hover {
    background-color: #ffffff;
    border-color: #0079d3;
}

.create-actions {
    display: flex;
    gap: 8px;
}

.create-actions button {
    padding: 8px 12px;
    background: none;
    border: none;
    color: #7c7c7c;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.create-actions button:hover {
    background-color: #f6f7f8;
}

/* Post Card */
.post {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post:hover {
    border-color: #898989;
}

.post-container {
    display: flex;
}

.vote-section {
    background-color: #f8f9fa;
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 4px;
}

.vote-btn {
    background: none;
    border: none;
    color: #878a8c;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    transition: all 0.2s;
    font-size: 20px;
}

.vote-btn:hover {
    background-color: #e9ecef;
}

.vote-btn.upvoted {
    color: #ff4500;
}

.vote-btn.downvoted {
    color: #7193ff;
}

.vote-count {
    font-weight: 700;
    font-size: 12px;
    color: #1c1c1c;
}

.post-content {
    flex: 1;
    padding: 12px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #7c7c7c;
}

.community-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.community-name {
    font-weight: 700;
    color: #1c1c1c;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 18px;
    font-weight: 500;
    color: #1c1c1c;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-body {
    font-size: 14px;
    color: #1c1c1c;
    margin-bottom: 12px;
    line-height: 1.5;
}

.post-image {
    width: 100%;
    max-height: 512px;
    object-fit: contain;
    background-color: #f6f7f8;
    margin-top: 8px;
    border-radius: 4px;
}

.post-footer {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #edeff1;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: #878a8c;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #f6f7f8;
}

.action-btn i {
    font-size: 16px;
}

/* Right Sidebar */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1c1c1c;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.trending-item:hover {
    background-color: #f6f7f8;
}

.trending-number {
    font-weight: 700;
    color: #0079d3;
    font-size: 14px;
    width: 24px;
}

.trending-info {
    flex: 1;
}

.trending-title {
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1c;
}

.trending-meta {
    font-size: 12px;
    color: #7c7c7c;
}

.friends-list {
    list-style: none;
}

.friends-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.friends-list li:hover {
    background-color: #f6f7f8;
}

.friends-list img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.friends-list span {
    flex: 1;
    font-size: 14px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #46d160;
    border-radius: 50%;
    flex: none !important;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #7c7c7c;
}

.loading.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 320px;
    }
    
    .left-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        margin: 12px auto;
        gap: 12px;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .search-bar {
        display: none;
    }
}