/* 知乎风格Typecho主题样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #0084ff;
    font-size: 20px;
    font-weight: 600;
}

.logo i {
    margin-right: 8px;
    font-size: 24px;
}

.logo-img {
    height: 32px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.logo-text {
    vertical-align: middle;
}

.nav-menu > ul {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu > ul > li {
    margin: 0 20px;
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-menu a:hover,
.nav-menu a.current {
    color: #0084ff;
    background: #f6f6f6;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: #1a1a1a;
    border-radius: 0;
    margin: 0 4px;
    font-size: 14px;
    background: transparent;
}

.dropdown-menu a:hover {
    background: #f6f6f6;
    color: #0084ff;
    border-radius: 6px;
}

.dropdown-menu .count {
    font-size: 12px;
    color: #8590a6;
    font-weight: normal;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 300px;
    height: 36px;
    padding: 0 40px 0 16px;
    border: 1px solid #e1e4e8;
    border-radius: 18px;
    background: #f6f8fa;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #0084ff;
    background: #fff;
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #586069;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #f6f6f6;
    color: #0084ff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 桌面端隐藏移动搜索框 */
.mobile-search {
    display: none;
}

/* 主要内容区域 */
.main-content {
    margin-top: 60px;
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* 文章列表 */
.article-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-card {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

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

.article-card:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

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

.author-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.post-author-info .author-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.publish-time {
    font-size: 13px;
    color: #8590a6;
    margin-left: auto;
}

.article-title {
    margin-bottom: 12px;
}

.article-title a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #0084ff;
}

.article-excerpt {
    color: #8590a6;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
}

.article-image {
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
}

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

.article-image:hover img {
    transform: scale(1.02);
}

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

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #8590a6;
}

.article-meta a {
    text-decoration: none;
    color: #8590a6;
}

.article-meta .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 500px;
    overflow: hidden;
}

.article-meta .tags a{
    display: inline-block;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.article-meta .tags a:hover {
    background-color: #0084ff;
    color: white;
}

.article-meta i {
    margin-right: 4px;
}

.article-actions {
    display: flex;
    gap: 20px;
}

.action-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #8590a6;
    cursor: pointer;
    transition: color 0.3s;
    white-space: nowrap;
}

.action-item:hover {
    color: #0084ff;
}

.action-item i {
    margin-right: 4px;
}

.action-item .number {
    font-weight: 500;
    margin-left: 2px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.widget h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    position: relative;
    padding-left: 12px;
}

.widget h3:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #0084ff, #00d4aa);
    border-radius: 2px;
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-avatar {
    margin-right: 0;
    margin-bottom: 16px;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    text-align: center;
}

.author-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.author-info p {
    font-size: 14px;
    color: #8590a6;
    line-height: 1.5;
}

.author-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 1.2em;
    font-weight: 600;
}

.stat-item .label {
    font-size: 0.9em;
    color: #8590a6;
}

.follow-btn {
    margin-top: 15px;
    padding: 8px 24px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.follow-btn:hover {
    background-color: #0073e6;
}

.widget ul {
    list-style: none;
    padding-left: 0;
}

.recent-posts ul,
.categories ul {
    list-style: none;
    padding: 0;
}

.recent-posts li,
.categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.recent-posts li:hover,
.categories li:hover {
    background: #fff;
    border-left-color: #0084ff;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-posts li:last-child,
.categories li:last-child {
    margin-bottom: 0;
}

.recent-posts a,
.categories a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    transition: color 0.3s;
    flex: 1;
    font-weight: 500;
}

.recent-posts a:hover,
.categories a:hover {
    color: #0084ff;
}

.post-date,
.count {
    font-size: 12px;
    color: #8590a6;
    white-space: nowrap;
}

.categories li {
    align-items: center;
    gap: 8px;
}

.categories .count {
    margin-left: auto;
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: #f0f2f5;
    border-radius: 16px;
    text-decoration: none;
    font-size: 12px;
    color: #1a1a1a;
    transition: all 0.3s;
}

.tag:hover {
    background: #0084ff;
    color: #fff;
}

/* 分页导航 */
.pagination {
    margin-top: 40px;
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination .page-navigator {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-navigator li {
    display: inline-block;
    margin: 0 4px;
}

.pagination .page-navigator li a,
.pagination .page-navigator li.current a,
.pagination .page-navigator li span {
    display: block;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination .page-navigator li a:hover {
    background: #0084ff;
    color: #fff;
    border-color: #0084ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 132, 255, 0.3);
}

.pagination .page-navigator li.current a {
    background: #0084ff;
    color: #fff;
    border-color: #0084ff;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 132, 255, 0.3);
}

.pagination .page-navigator li span {
    background: transparent;
    border: none;
    color: #8590a6;
}

/* 归档页面样式 */
.archive-header {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.archive-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.search-info,
.category-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #0084ff;
}

.search-info p,
.category-info p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #495057;
}

.search-info p:last-child,
.category-info p:last-child {
    margin-bottom: 0;
}

.no-posts {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-posts h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.no-posts p {
    color: #8590a6;
    font-size: 16px;
}

/* 懒加载样式 */
.lazy-loading {
    filter: blur(3px);
    transition: filter 0.3s ease;
    background: #f0f0f0;
}

.lazy-loaded {
    filter: none;
}

.lazy-error {
    filter: grayscale(100%);
    opacity: 0.6;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

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

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 132, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

#back-to-top:hover {
    background: #0073e6;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        position: fixed;
        top: 0;
        height: 60px;
    }
    
    .nav-wrapper {
        height: 60px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
    }
    
    .logo a {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 20px;
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .search-box {
        display: none;
    }
    
    /* 移动端搜索框（在菜单中） */
    .mobile-search {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-search input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #e1e4e8;
        border-radius: 6px;
        background: #f6f8fa;
        font-size: 14px;
        outline: none;
    }
    
    .mobile-search input:focus {
        border-color: #0084ff;
        background: #fff;
    }
    
    /* 移动端下拉菜单优化 */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        margin-top: 10px;
        min-width: auto;
        width: 100%;
    }
    
    .dropdown-menu a {
        padding: 8px 12px;
        margin: 0;
        border-radius: 6px;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    
    .main-content {
        margin-top: 0;
        padding: 20px 0;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .article-card {
        padding: 16px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .article-actions {
        gap: 16px;
    }
    
    .widget {
        padding: 16px;
    }
    
    .author-card {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 12px;
    }

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

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 1px 3px rgba(26,26,26,.1);
        padding: 10px 0;
    }
    
    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        background: transparent;
    }
    
    .nav-menu a:hover {
        background: #f6f6f6;
        color: #0084ff;
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    /* 确保移动端下拉菜单正确显示 */
    .nav-menu .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu .dropdown-menu a {
        padding: 10px 30px;
        font-size: 14px;
        background: #f8f9fa;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        height: 50px;
    }
    
    .nav-wrapper {
        height: 50px;
    }
    
    .logo a {
        font-size: 16px;
    }
    
    .logo i {
        font-size: 18px;
    }
    
    .mobile-menu-toggle {
        padding: 6px;
        font-size: 18px;
    }
    
    .main-content {
        margin-top: 50px;
        padding: 20px 0;
    }
    
    .article-title a {
        font-size: 16px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
    
    .action-item {
        font-size: 12px;
    }
    
    .widget h3 {
        font-size: 14px;
    }
    
    .mobile-search {
        padding: 10px 16px;
    }
    
    .nav-menu a {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* 帖子页面 */
.post-container {
    padding: 2rem 0;
} 