/* ========================================
   科技博客风格 - PbootCMS模板样式
   完全原创，不包含任何默认模板样式
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --secondary: #00d4aa;
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --gray: #666;
    --gray-light: #f5f6fa;
    --white: #fff;
    --gradient: linear-gradient(135deg, #0066ff 0%, #00d4aa 100%);
    --shadow: 0 4px 20px rgba(0, 102, 255, 0.15);
    --radius: 8px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--gray-light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* ========================================
   Header 头部样式
   ======================================== */
.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--white);
}

.nav-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
}

/* ========================================
   Hero 横幅区域
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230066ff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #fff 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Content Layout 内容布局
   ======================================== */
.content-wrapper {
    padding: 50px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* ========================================
   Article Card 文章卡片
   ======================================== */
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.2);
}

.article-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumb img {
    transform: scale(1.1);
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title a:hover {
    color: var(--primary);
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

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

.article-desc {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.read-more {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

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

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--primary);
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.sidebar-list a:hover {
    color: var(--primary);
}

.sidebar-list .count {
    background: var(--gray-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.tags-widget .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--gray-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gray);
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--primary);
    color: var(--white);
}

/* ========================================
   Pagination 分页
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    background: var(--white);
    border-radius: var(--radius);
    color: var(--dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination .current {
    background: var(--gradient);
    color: var(--white);
}

/* ========================================
   Footer 页脚
   ======================================== */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col h4 i {
    color: var(--secondary);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

/* ========================================
   Detail Page 详情页
   ======================================== */
.article-detail {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.detail-header {
    margin-bottom: 30px;
    text-align: center;
}

.detail-category {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--gray);
    font-size: 0.9rem;
}

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

.detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark);
}

.detail-content p {
    margin-bottom: 15px;
}

.detail-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
}

.detail-content h2, .detail-content h3, .detail-content h4 {
    margin: 25px 0 15px;
    color: var(--dark);
}

.detail-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.detail-tags span {
    font-weight: 500;
}

.related-articles {
    margin-top: 50px;
}

.related-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* ========================================
   Responsive 响应式
   ======================================== */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .article-detail {
        padding: 20px;
    }

    .detail-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Page Header 列表页头部
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 40px 0;
    text-align: center;
}

.page-title {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-breadcrumb {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.page-breadcrumb a:hover {
    color: var(--secondary);
}

/* ========================================
   About Page 关于页面
   ======================================== */
.about-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.about-section h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.about-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* ========================================
   List Page 列表页
   ======================================== */
.list-item {
    display: flex;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.list-item:hover {
    transform: translateX(5px);
}

.list-thumb {
    flex: 0 0 200px;
    height: 150px;
    border-radius: var(--radius);
    overflow: hidden;
}

.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.list-title a:hover {
    color: var(--primary);
}

.list-desc {
    flex: 1;
    color: var(--gray);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
    }

    .list-thumb {
        flex: none;
        width: 100%;
        height: 200px;
    }
}
