/*
 * 123.css - 深色主题 + 雪花动画 + 完整样式
 * 直接使用 Emoji 作为图标，无需外部依赖，确保显示正常
 */

/* --- 雪花动画效果 (核心修复) --- */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

@keyframes snowfall {
    0% { transform: translateY(-10%) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.snowflake {
    position: absolute;
    color: #ffffff;
    font-size: 1.5rem;
    user-select: none;
    animation: snowfall linear infinite;
    opacity: 0;
}

/* 不同大小和速度的雪花 */
.snowflake:nth-child(3n) {
    font-size: 1rem;
    animation-duration: 8s;
    animation-delay: -2s;
}

.snowflake:nth-child(3n+1) {
    font-size: 2rem;
    animation-duration: 12s;
    animation-delay: -5s;
}

.snowflake:nth-child(3n+2) {
    font-size: 1.2rem;
    animation-duration: 10s;
    animation-delay: -8s;
}

/* --- 全局深色主题 (默认) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #e0e0e0;
    background-color: #121212;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 90%);
    margin: 0;
    padding: 0;
}

.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 顶部导航栏 --- */
.site-header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #bb86fc;
    text-decoration: none;
}

.nav-links a {
    margin-left: 1.5rem;
    color: #a0a0a0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #bb86fc;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #bb86fc;
}

/* --- 主内容区 --- */
main.container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

article {
    background-color: #1e1e1e;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #757575;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.author, time, .article-meta > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    border-radius: 50%;
    border: 2px solid #333;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
}

.feature-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    object-fit: cover;
    border: 1px solid #333;
}

.entry-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-align: justify;
}

/* 标签云 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.tag {
    background-color: #2d2d2d;
    color: #b0b0b0;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #bb86fc;
    color: #121212;
}

/* --- 侧边栏 --- */
aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background-color: #1e1e1e;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.card-header {
    background-color: #252525;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #333;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
}

.card-body {
    padding: 1.25rem;
}

/* 作者卡片 */
.author-card .author-avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid #444;
}

.author-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.author-bio {
    color: #757575;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 文章列表 */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #2d2d2d;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-list > a {
    text-decoration: none;
    color: inherit;
}

.article-list-image {
    width: 60px;
    height: 60px;
    border-radius: 0.25rem;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #333;
}

.article-list-content {
    flex-grow: 1;
    min-width: 0;
}

.article-list-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-list-date {
    font-size: 0.8rem;
    color: #616161;
}

/* --- 页脚 --- */
.site-footer {
    background-color: #1e1e1e;
    color: #e0e0e0;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #bb86fc;
    text-decoration: none;
}

.footer-description {
    color: #757575;
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #757575;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #bb86fc;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    color: #616161;
    font-size: 0.85rem;
}
/* --- 新增：相关标签卡片样式 --- */
.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* 垂直排列，实现一行一个 */
    gap: 0.75rem; /* 标签之间的垂直间距 */
}

.tag-item {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05); /* 半透明背景 */
}

.tag-item:hover {
    background-color: rgba(255, 255, 255, 0.15); /* 鼠标悬停时背景变深 */
}

/* 使用 nth-child 为每个标签设置不同颜色 */
.tag-list li:nth-child(1) .tag-item { color: #bb86fc; } /* 紫色 */
.tag-list li:nth-child(2) .tag-item { color: #03dac6; } /* 青色 */
.tag-list li:nth-child(3) .tag-item { color: #ff9800; } /* 橙色 */
.tag-list li:nth-child(4) .tag-item { color: #f06292; } /* 粉色 */
.tag-list li:nth-child(5) .tag-item { color: #7c4dff; } /* 深紫 */
.tag-list li:nth-child(6) .tag-item { color: #66bb6a; } /* 绿色 */
/* 如果标签数量更多，可以继续添加 nth-child(7), (8) 等 */