:root {
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --accent-color: #f1f5f9;
    --badge-color: #ef4444;
    --header-bg: #ffffff;
    --header-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.main-content {
    flex: 3;
    min-width: 0;
}

.sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-color);
}

.logo span {
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    transition: color 0.2s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.header-search {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--accent-color);
    border-radius: 20px;
    padding: 6px 15px;
    transition: box-shadow 0.2s;
}

.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-input {
    border: none;
    background: transparent;
    padding: 6px 0;
    width: 180px;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0;
    margin-left: 5px;
}

.search-button:hover {
    color: var(--primary-color);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.category-list, .comment-list, .tag-cloud {
    list-style: none;
}

.category-list li, .comment-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child, .comment-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-list a, .comment-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list a:hover, .comment-list a:hover {
    color: var(--primary-color);
}

.category-count {
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    text-decoration: none;
}

.tag-cloud a:hover {
    background: var(--primary-color);
    color: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
}

.unread-badge {
    background: var(--badge-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.article-thumb {
    height: 200px;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--secondary-color);
}

.article-category {
    background: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    margin-right: 10px;
    font-weight: 500;
}

.article-date {
    margin-right: 10px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.read-more:hover {
    text-decoration: underline;
}

.comments-area {
    margin-top: 40px;
}

.comment-list {
    margin-bottom: 30px;
}

.comment {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-author-name {
    font-weight: 600;
}

.comment-meta {
    font-size: 14px;
    color: var(--secondary-color);
    margin-left: auto;
}

.comment-content {
    line-height: 1.6;
}

.comment-respond {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.comment-form-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.comment-form-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form-submit:hover {
    background: #2563eb;
}

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: var(--secondary-color);
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.page-navigator {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-navigator a,
.page-navigator span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
}

.page-navigator a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-navigator .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: var(--accent-color);
}

.avatar-small {
    width: 28px;
    height: 28px;
}

.avatar-medium {
    width: 36px;
    height: 36px;
}

.avatar-large {
    width: 48px;
    height: 48px;
}

.avatar-xlarge {
    width: 64px;
    height: 64px;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-online {
    background-color: #10b981;
}

.status-offline {
    background-color: #9ca3af;
}

.status-away {
    background-color: #f59e0b;
}

.avatar-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-upload:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    font-weight: 500;
    border-radius: 50%;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar-container {
    margin-right: -10px;
}

.avatar-group .avatar-container:last-child {
    margin-right: 0;
}

.avatar-bordered {
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-card .avatar {
    margin-bottom: 15px;
}

.user-card .user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-card .user-title {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.comment-list .avatar {
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 1;
        position: static;
        margin-bottom: 30px;
        width: 100%;
    }
    
    .sidebar-widgets {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-button {
        display: block;
    }

    .header-search {
        margin-left: auto;
        margin-right: 15px;
    }

    .search-input {
        width: 140px;
    }
}

@media (max-width: 768px) {
    .sidebar-widgets {
        grid-template-columns: 1fr;
    }
    
    .article-thumb {
        height: 160px;
    }
    
    .article-title {
        font-size: 18px;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 20px;
    }

    .search-input {
        width: 120px;
    }

    .avatar-large {
        width: 40px;
        height: 40px;
    }
    
    .avatar-xlarge {
        width: 56px;
        height: 56px;
    }
    
    .avatar-group .avatar-container {
        margin-right: -8px;
    }
}