
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.5;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-menu a:hover {
    background: #34495e;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    padding: 0.5rem;
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    outline: none;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.main-content {
    background: white;
}

/* Thread Header */
.thread-header {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.thread-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.thread-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Posts */
.post {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.post-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.username {
    font-weight: 600;
    color: #2c3e50;
}

.post-time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.post-content {
    padding: 1.5rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-actions {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 1rem;
}

.post-action {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.post-action:hover {
    color: #3498db;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.widget-content {
    color: #555;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e8e8e8;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}

.widget-list a:hover {
    color: #3498db;
}

/* Footer */
.footer {
    background: #34495e;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #4a5f7a;
    margin-top: 1rem;
    color: #bdc3c7;
    font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .search-box {
        display: none;
    }

    .container {
        grid-template-columns: 1fr;
        margin: 1rem auto;
        gap: 1rem;
    }

    .thread-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
