/* 故障艺术风格 - 砂岩色调 */
:root {
    --sand-1: #e7d8c9;
    --sand-2: #e6c7a8;
    --sand-3: #d1b399;
    --sand-4: #b39d8b;
    --sand-5: #8c7b6b;
    --glitch-1: #9cffd9;
    --glitch-2: #ff9ce6;
    --text-dark: #3a3226;
    --text-light: #f5f1ee;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch-opacity {
    0% { opacity: 0.8; }
    20% { opacity: 0.5; }
    40% { opacity: 0.7; }
    60% { opacity: 0.9; }
    80% { opacity: 0.4; }
    100% { opacity: 0.8; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: var(--sand-1);
    color: var(--text-dark);
    line-height: 1.6;
    background-image: 
        linear-gradient(90deg, var(--sand-2) 1px, transparent 1px),
        linear-gradient(var(--sand-2) 1px, transparent 1px);
    background-size: 20px 20px;
}

.glitch-effect {
    animation: glitch 1s infinite alternate, glitch-opacity 1.5s infinite alternate;
}

header {
    background-color: var(--sand-3);
    padding: 20px 0;
    border-bottom: 3px solid var(--sand-5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.logo::before, .logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.logo::before {
    color: var(--glitch-1);
    z-index: -1;
    animation: glitch 2s infinite;
}

.logo::after {
    color: var(--glitch-2);
    z-index: -2;
    animation: glitch 3s infinite reverse;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

nav ul li a {
    padding: 8px 15px;
    background-color: var(--sand-4);
    color: var(--text-light);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: 1px solid var(--sand-5);
}

nav ul li a:hover {
    background-color: var(--sand-5);
    animation: glitch 0.5s;
}

.main-content {
    background-color: var(--sand-2);
    border: 2px solid var(--sand-4);
    margin: 30px 0;
    padding: 25px;
    box-shadow: 8px 8px 0 var(--sand-5);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--sand-5);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: "//";
    position: absolute;
    right: 0;
    color: var(--sand-5);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--sand-1);
    border: 2px solid var(--sand-4);
    padding: 15px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.article-card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 5px 5px 0 var(--sand-5);
    animation: glitch 0.5s;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--sand-4);
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 2px solid var(--sand-4);
    margin-bottom: 15px;
    filter: grayscale(30%);
    transition: filter 0.3s;
}

.article-card:hover .card-image {
    filter: grayscale(0%);
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    position: relative;
}

.card-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--sand-5);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--sand-5);
    margin-top: 15px;
    font-style: italic;
}

.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--sand-4);
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.article-title::before, .article-title::after {
    content: "///";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sand-5);
}

.article-title::before {
    left: -50px;
}

.article-title::after {
    right: -50px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--sand-5);
    margin-bottom: 30px;
    font-style: italic;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border: 3px solid var(--sand-4);
    margin-bottom: 30px;
    filter: grayscale(20%);
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.article-content p::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--sand-5);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    background-color: var(--sand-3);
    color: var(--text-light);
    font-weight: bold;
    border: 2px solid var(--sand-5);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--sand-5);
    animation: glitch 0.5s;
}

.friend-links {
    background-color: var(--sand-3);
    padding: 25px;
    margin: 30px 0;
    border: 2px solid var(--sand-5);
}

.friend-links h3 {
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dark);
    position: relative;
}

.friend-links h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100px;
    height: 2px;
    background-color: var(--sand-5);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: var(--sand-2);
    color: var(--text-dark);
    border: 1px solid var(--sand-5);
    font-size: 14px;
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background-color: var(--sand-5);
    color: var(--text-light);
    animation: glitch 0.3s;
}

footer {
    background-color: var(--sand-5);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 3px solid var(--sand-4);
}

.copyright {
    font-size: 14px;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .article-title::before, .article-title::after {
        display: none;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}