* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0a192f;
    --secondary: #112240;
    --accent: #64ffda;
    --text: #ccd6f6;
    --text-light: #a8b2d1;
    --card: #172a45;
    --highlight: #233554;
}

body {
    background-color: var(--primary);
    color: var(--text);
    background-image: radial-gradient(circle at 10% 20%, rgba(17, 34, 64, 0.8) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(17, 34, 64, 0.8) 0%, transparent 20%);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 电路板纹理 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(25, 55, 109, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 55, 109, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

/* 导航栏 */
.navbar {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    z-index: 1001;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 移动端导航菜单 */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--primary);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--accent);
    background: rgba(100, 255, 218, 0.1);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 博客列表顶部区域 */
.blog-header {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    padding-top: 5rem;
    background: linear-gradient(to bottom, rgba(10, 25, 47, 0.9), rgba(17, 34, 64, 0.7));
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.blog-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1581091226033-d5c48150dbaa?q=80&w=1000') no-repeat center center/cover;
    opacity: 0.1;
    z-index: -1;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--accent), #4facfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-header p {
    font-size: 1.4rem;
    max-width: 800px;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.btn:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: #52e0c4;
}

/* 内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text);
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent);
}

/* 博客列表 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 255, 218, 0.1);
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .card-img img {
    transform: scale(1.1);
}

.card-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    padding-top: 1rem;
    margin-top: auto;
}
/* 页脚 */
.footer {
    background: rgba(7, 20, 38, 0.95);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-column h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.footer-links a {
    display: block;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text-light);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 芯片动画 */
.chip {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--secondary), var(--primary));
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s infinite ease-in-out;
    z-index: 0;
    opacity: 0.7;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.chip i {
    color: var(--accent);
    font-size: 1.5rem;
}

.chip:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.chip:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: -2s;
    width: 40px;
    height: 40px;
}

.chip:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: -4s;
    width: 50px;
    height: 50px;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.4);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

/* 博客列表新增样式 */
.blog-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(100, 255, 218, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(100, 255, 218, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: var(--primary);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--text-light);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: var(--accent);
    color: var(--primary);
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--accent);
    font-size: 1.2rem;
}

.loading-indicator i {
    margin-right: 10px;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .blog-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .blog-header p {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 搜索框样式 */
.search-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 500px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 50px;
    background: rgba(10, 25, 47, 0.8);
    color: var(--text);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #52e0c4;
    transform: scale(1.05);
}

.clear-search {
    position: absolute;
    right: 3.5rem;
    background: transparent;
    color: var(--text-light);
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50%;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* 分类筛选器样式增强 */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(17, 34, 64, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(100, 255, 218, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

/* 加载和空状态样式增强 */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.loading-indicator i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 搜索结果高亮样式 */
mark {
    background: var(--accent);
    color: var(--primary);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: bold;
}