/*!
 * PIXIT - Typecho Theme
 * 基于像素设计WordPress主题转换
 * Version: 1.0.0
 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #f5f7fa;
}

:root {
    --primary-color: #16e186;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body {
    background: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 主容器 */
#page.site.main_wrap {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.main_body {
    display: flex;
    justify-content: center;
    gap: 0;
}

/* 左侧导航 */
.left_nav {
    width: 33.333%;
    display: block;
}

.left_nav_inner {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-right: 0;
}

.top_logo {
    padding: 0 0 30px 0;
    text-align: center;
}

.top_logo img {
    height: 38px;
    width: auto;
}

.top_logo.close_bar {
    display: none;
}

.left_menu_box {
    margin-bottom: 30px;
}

.menu_item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    background: transparent;
}

.menu_item:hover {
    background: rgba(22, 225, 134, 0.1);
    color: var(--primary-color);
}

.menu_item i {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu_item.active {
    background: var(--primary-color);
    color: white;
}

.sidebar {
    margin-top: 30px;
}

.sidebar_section {
    background: rgba(0,0,0,0.02);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.03);
}

.sidebar_title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #555;
    display: flex;
    align-items: center;
}

.sidebar_title i {
    margin-right: 8px;
    font-size: 16px;
}

/* 右侧内容 */
.right_content {
    width: 66.667%;
    background: transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-left: 0;
}

/* 顶部栏 */
.top_bar {
    background: var(--card-bg);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.left_logo {
    display: block;
}

.left_logo img {
    height: 32px;
    width: auto;
    display: block;
}

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

.top_tool {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.top_tool:hover {
    background: rgba(0,0,0,0.05);
}

.top_tool i {
    font-size: 18px;
    color: #555;
}

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

/* 轮播海报 */
.swiper-container {
    margin: 0 0 20px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    background: var(--card-bg);
}

.swiper {
    width: 100%;
    height: 280px;
    border-radius: var(--border-radius);
}

.swiper-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px 25px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white;
    z-index: 2;
}

.slide-tag {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 500;
}

.slide-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.slide-title a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.slide-title a:hover {
    opacity: 0.85;
}

.slide-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    opacity: 0.8;
}

.slide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.swiper-pagination-bullet {
    background: rgba(255,255,255,0.5);
    opacity: 1;
    width: 8px;
    height: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
    width: 20px;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* 文章列表 */
.article_list {
    padding: 0;
}

.article_item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.article_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.article_header {
    margin-bottom: 8px;
}

.article_title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.article_title:hover {
    color: var(--primary-color);
}

.article_meta_new {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 14px;
    margin-top: 6px;
    margin-bottom: 0;
}

.article_meta_new span {
    color: #888;
}

/* 页脚 */
.site_footer {
    background: var(--card-bg);
    padding: 40px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.footer_content {
    max-width: 600px;
    margin: 0 auto;
}

.footer_title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #555;
}

.footer_desc {
    color: #777;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social_links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social_link {
    color: #555;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social_link:hover {
    color: var(--primary-color);
}

.copyright {
    color: #888;
    font-size: 14px;
}

/* 移动端菜单 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.mobile-menu-sidebar.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.mobile-menu-logo img {
    height: 32px;
}

.mobile-menu-content {
    padding: 10px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    background: transparent;
}

.mobile-menu-item:hover, .mobile-menu-item.active {
    background: rgba(22, 225, 134, 0.1);
    color: var(--primary-color);
}

.mobile-menu-item i {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

.mobile-menu-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* 响应式 */
@media (max-width: 960px) {
    #page.site.main_wrap {
        max-width: 100%;
        padding: 0 20px;
        margin-top: 20px;
    }
    
    .main_body {
        flex-direction: column;
    }
    
    .left_nav {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .right_content {
        width: 100%;
    }
    
    .swiper {
        height: 240px;
    }
    
    .slide-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .left_nav {
        display: none;
    }
    
    .right_content {
        width: 100%;
        margin-left: 0;
        background: transparent;
    }
    
    #page.site.main_wrap {
        margin-top: 10px;
        padding: 0 15px;
    }
    
    .top_bar {
        padding: 12px 20px;
        margin-bottom: 15px;
    }
    
    .left_logo img {
        height: 28px;
    }
    
    .swiper-container {
        margin: 0 0 15px 0;
    }
    
    .swiper {
        height: 200px;
    }
    
    .slide-content {
        padding: 20px 18px 18px 18px;
    }
    
    .slide-title {
        font-size: 16px;
    }
    
    .slide-desc {
        display: none;
    }
    
    .slide-meta {
        font-size: 11px;
        gap: 12px;
    }
    
    .article_list {
        padding: 0;
    }
    
    .article_item {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 14px;
    }
    
    .article_title {
        font-size: 18px;
    }
    
    .site_footer {
        margin-top: 15px;
        border-radius: 14px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

@media (max-width: 480px) {
    .swiper {
        height: 180px;
    }
    
    .slide-title {
        font-size: 14px;
    }
    
    .slide-tag {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .article_item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .article_title {
        font-size: 16px;
    }
    
    .article_meta_new {
        font-size: 12px;
        gap: 12px;
    }
}

.uk-sticky-fixed {
    position: fixed;
    top: 20px;
    z-index: 1000;
}

.player_box {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 暗色模式 */
body.dark-mode {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #f0f0f0;
}

body.dark-mode .sidebar_section {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .sidebar_title {
    color: #ccc;
}

body.dark-mode .article_meta_new span {
    color: #aaa;
}

body.dark-mode .footer_title {
    color: #ccc;
}

body.dark-mode .footer_desc {
    color: #aaa;
}

body.dark-mode .social_link {
    color: #ccc;
}

body.dark-mode .copyright {
    color: #aaa;
}