/* 有罪风格 - 赛博朋克霓虹主题 */
:root {
    --neon-red: #ff2a6d;
    --neon-blue: #05d9e8;
    --neon-purple: #d300c5;
    --dark-bg: #0d0221;
    --darker-bg: #05010e;
    --text-color: #d1f7ff;
    --glow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-purple);
    --text-glow: 0 0 5px #fff, 0 0 10px var(--neon-blue);
}

@font-face {
    font-family: 'Rajdhani';
    src: url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;700&display=swap');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 42, 109, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(5, 217, 232, 0.1) 0%, transparent 20%);
}

/* 故障艺术效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        transparent 0%,
        rgba(255, 42, 109, 0.1) 2%,
        transparent 4%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 1s linear infinite;
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

/* 霓虹闪烁效果 */
@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: var(--text-glow);
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.7;
    }
}

/* 头部样式 - 赛博朋克风格 */
header {
    background-color: rgba(13, 2, 33, 0.9);
    border-bottom: 1px solid var(--neon-purple);
    box-shadow: 0 0 15px var(--neon-purple);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(90deg, var(--neon-red), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-blue);
    letter-spacing: 2px;
    animation: flicker 3s infinite alternate;
}

/* 导航菜单 - 霓虹边框 */
nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    padding: 8px 15px;
    position: relative;
    font-weight: bold;
    letter-spacing: 1px;
}

nav ul li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--neon-blue);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s, box-shadow 0.3s;
}

nav ul li a:hover {
    color: var(--neon-blue);
}

nav ul li a:hover::before {
    opacity: 1;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* 主要内容区域 - 网格背景 */
.main-content {
    background-color: rgba(5, 1, 14, 0.7);
    border: 1px solid var(--neon-purple);
    border-radius: 5px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--glow);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(255, 42, 109, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 42, 109, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    pointer-events: none;
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--neon-red);
    color: var(--neon-blue);
    text-shadow: var(--text-glow);
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-red), transparent);
}

/* 文章卡片 - 故障艺术效果 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background: rgba(13, 2, 33, 0.8);
    border: 1px solid var(--neon-blue);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--neon-blue);
    border-color: var(--neon-red);
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 42, 109, 0.2),
        transparent
    );
    transition: 0.5s;
}

.article-card:hover::before {
    left: 100%;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--neon-purple);
    filter: grayscale(30%) contrast(120%);
    transition: filter 0.3s;
}

.article-card:hover .card-image {
    filter: grayscale(0%) contrast(100%);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--neon-blue);
    margin-top: 15px;
}

/* 分类标签 - 霓虹效果 */
.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: transparent;
    color: var(--neon-purple);
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--neon-purple);
    text-shadow: 0 0 5px var(--neon-purple);
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--neon-blue);
    text-shadow: var(--text-glow);
    animation: flicker 3s infinite alternate;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--neon-red);
    margin-bottom: 25px;
    flex-wrap: wrap;
    text-shadow: 0 0 5px var(--neon-red);
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 30px;
    border: 1px solid var(--neon-blue);
    box-shadow: var(--glow);
    filter: contrast(110%) saturate(120%);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
    position: relative;
}

.article-content p {
    margin-bottom: 20px;
    position: relative;
}

.article-content p::before {
    content: ">";
    color: var(--neon-red);
    margin-right: 10px;
    text-shadow: 0 0 5px var(--neon-red);
}

/* 分页导航 - 霓虹按钮 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 3px;
    background-color: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.pagination a:hover {
    background-color: var(--neon-blue);
    color: var(--dark-bg);
    text-shadow: none;
    box-shadow: 0 0 15px var(--neon-blue);
}

.pagination a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(5, 217, 232, 0.4),
        transparent
    );
    transition: 0.5s;
}

.pagination a:hover::before {
    left: 100%;
}

/* 友情链接 - 霓虹网格 */
.friend-links {
    background: rgba(5, 1, 14, 0.8);
    border-radius: 5px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--neon-purple);
    box-shadow: 0 0 15px var(--neon-purple);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--neon-blue);
    font-size: 20px;
    text-shadow: var(--text-glow);
}

.friend-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: transparent;
    border-radius: 3px;
    font-size: 14px;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    text-align: center;
    transition: all 0.3s;
    text-shadow: 0 0 5px var(--neon-red);
}

.friend-links-container a:hover {
    background-color: var(--neon-red);
    color: var(--dark-bg);
    text-shadow: none;
    box-shadow: 0 0 10px var(--neon-red);
}

/* 页脚样式 - 数据流效果 */
footer {
    background-color: var(--darker-bg);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--neon-purple);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--neon-blue),
        var(--neon-red),
        var(--neon-purple),
        transparent
    );
    animation: rainbow 5s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

.copyright {
    font-size: 14px;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .friend-links-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}