/* 文章页面样式 */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    display: none;
    margin: 20px auto;
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.tag {
    background-color: #f1f1f1;
    padding: 2px 5px;
    margin-right: 5px;
    border-radius: 3px;
    font-size: 0.8em;
}
.like-button.liked {
    background-color: #4CAF50;
    color: white;
}
#articles {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.search-and-category {
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.search-bar {
    display: flex;
    margin-right: 20px;
}

#search-input {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search-bar button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.category-selector select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#write-article-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#write-article-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#write-article-form input,
#write-article-form select,
#write-article-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#write-article-form textarea {
    height: 200px;
}

#write-article-form button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.article-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.article-item h3 {
    margin-bottom: 10px;
}

.article-item p {
    margin-bottom: 15px;
}

.article-item button {
    margin-right: 10px;
    padding: 5px 10px;
    font-size: 14px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.article-item button:hover {
    background-color: #e0e0e0;
}
.article-tags {
    margin-top: -15px;
    margin-bottom: 15px;
}
.article-image {
    
    width: 35%;
    height: auto;
    display: block;
    margin: 10px auto;
}
.refresh-button {
    margin-left: 700px;
    background: #fdfcfc00;
}
.refresh-button:hover {
    background-color: #4CAF50;
}