.articles-page {
    min-height: 100vh;
    background: var(--body-bg);
    padding: 40px 20px;
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

.articles-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    white-space: nowrap;
}

.btn-primary {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--button-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--post-border);
}

.btn-secondary:hover {
    background: var(--sidebar-bg);
    transform: translateY(-2px);
}

.btn svg {
    flex-shrink: 0;
}

.articles-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--post-border);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.articles-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-bottom: -2px;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--sidebar-bg);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-btn svg {
    flex-shrink: 0;
}

.articles-filters {
    margin-bottom: 32px;
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-box svg:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: var(--error-color);
    color: white;
}

.sort-dropdown {
    position: relative;
    flex-shrink: 0;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sort-btn:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sort-btn svg {
    flex-shrink: 0;
}

.sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.sort-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:first-child {
    border-radius: 8px 8px 0 0;
}

.sort-option:last-child {
    border-radius: 0 0 8px 8px;
}

.sort-option:hover {
    background: var(--sidebar-bg);
}

.sort-option.active {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    font-weight: 600;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--post-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--post-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.article-card-cover {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--sidebar-bg);
    display: block;
}

.article-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-cover img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.article-card-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--button-primary-text);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-link:hover .author-name {
    color: var(--accent-color);
}

.article-date {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.article-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.article-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-title a:hover {
    color: var(--accent-color);
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item svg {
    flex-shrink: 0;
}

.article-viewed-date {
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid var(--post-border);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--sidebar-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--button-primary-text);
    transform: translateY(-2px);
}

.pagination-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-page:hover {
    background: var(--sidebar-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.pagination-page.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--button-primary-text);
}

.pagination-dots {
    color: var(--text-secondary);
    padding: 0 4px;
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .articles-page {
        padding: 20px 16px;
    }
    
    .articles-header {
        margin-bottom: 24px;
    }
    
    .articles-header h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn span {
        display: none;
    }
    
    .btn svg {
        margin: 0;
    }
    
    .articles-tabs {
        margin-bottom: 20px;
        gap: 8px;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .articles-filters {
        margin-bottom: 24px;
    }
    
    .filters-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input {
        padding: 12px 14px 12px 44px;
        font-size: 14px;
    }
    
    .sort-btn {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .sort-menu {
        left: 0;
        right: 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .article-card-cover {
        height: 200px;
    }
    
    .article-card-content {
        padding: 16px;
    }
    
    .article-card-title {
        font-size: 18px;
    }
    
    .article-card-author {
        flex-wrap: wrap;
    }
    
    .article-date {
        width: 100%;
        margin-top: 4px;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-state h2 {
        font-size: 20px;
    }
    
    .empty-state p {
        font-size: 15px;
    }
    
    .pagination-btn span {
        display: none;
    }
    
    .pagination-btn {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .articles-header h1 {
        font-size: 20px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .search-box svg:first-child {
        left: 12px;
    }
    
    .search-input {
        padding: 12px 12px 12px 40px;
    }
    
    .article-card-title {
        font-size: 17px;
    }
    
    .article-card-meta {
        flex-wrap: wrap;
    }
    
    .meta-item {
        font-size: 13px;
    }
}