body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #000000;
    border-bottom: 1px solid #333333;
}

header > div:last-child {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile {
    display: flex;
    align-items: center;
}

.profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav ul li {
    margin: 0 10px;
}

.search-icon,
.language-icon,
.user-icon {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-left: 10px;
    flex-shrink: 0;
}

main {
    padding: 20px;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.article-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 12px;
    color: #888888;
}

.article-description {
    margin: 10px 0px;
    font-size: 14px;
}

.github-login,
.write-article {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.write-article {
    background-color: #2196F3;
    display: none;
    /* 默认隐藏 */
}

.preview-area {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 5px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    background-color: #f0f0f0;
    /* 添加背景色 */
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.preview-item img.loaded {
    opacity: 1;
}

/* 加载更多按钮的样式 */
.load-more {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px auto;
    background-color: #007bff; /* 按钮背景色 */
    color: white; /* 按钮文字颜色 */
    border: none; /* 去掉边框 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标悬停时显示为手型 */
    font-size: 16px; /* 字体大小 */
    text-align: center; /* 文字居中 */
}

.load-more:hover {
    background-color: #0056b3; /* 悬停时的背景色 */
}

.load-more:disabled {
    background-color: #cccccc; /* 禁用状态的背景色 */
    cursor: not-allowed; /* 禁用状态的鼠标样式 */
}

.category-nav {
    background-color: #000000;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

.category-nav::-webkit-scrollbar { /* WebKit */
    display: none;
}

.nav-wrapper {
    display: inline-flex;
    padding: 0 10px;
}

.category-btn {
    background-color: transparent;
    border: none;
    color: #808080;
    padding: 15px 20px;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: color 0.3s;
    white-space: nowrap;
}

/* .category-btn:hover {
    background-color: #ffffff;
} */

.category-btn.active {
    /* background-color: #ffffff; */
    position: relative;
}

.category-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 4px;
    background-color: #1DA1F2;
    border-radius: 2px;
}

@media (max-width: 480px) {
    .profile span {
        display: none;
    }

    .github-login,
    .write-article {
        padding: 6px 10px;
        font-size: 12px;
    }

    .category-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}
