/* ========================================
   Cyberpunk Neon Theme Template
   赛博朋克霓虹主题模板
   ======================================== */

/* CSS Variables - Cyberpunk Theme */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-yellow: #ffff00;
    --neon-purple: #bf00ff;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --grid-color: rgba(0, 255, 255, 0.03);
    --radius: 0px;
    --max-width: 1400px;
    --sidebar-width: 320px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Courier New', 'Microsoft YaHei', monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.1) saturate(1.2);
}

/* Layout */
#divAll {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

#divMiddle {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    #divMiddle {
        grid-template-columns: 1fr;
    }
}

/* Header - Cyberpunk Style */
#divTop {
    padding: 60px 40px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    border: 2px solid var(--neon-cyan);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    clip-path: polygon(
        0 20px, 20px 0, 
        calc(100% - 20px) 0, 100% 20px,
        100% calc(100% - 20px), calc(100% - 20px) 100%,
        20px 100%, 0 calc(100% - 20px)
    );
}

#divTop::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-purple));
    z-index: -1;
    opacity: 0.3;
    filter: blur(20px);
}

#BlogTitle {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--neon-yellow);
    text-shadow: 
        0 0 10px var(--neon-yellow),
        0 0 20px var(--neon-yellow),
        0 0 40px var(--neon-yellow);
    letter-spacing: 5px;
}

#BlogTitle a {
    color: inherit;
    text-shadow: inherit;
}

#BlogSubTitle {
    font-size: 1rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Navigation - Cyberpunk Style */
#divNavBar {
    margin-bottom: 40px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--neon-cyan);
    position: relative;
}

#divNavBar::before {
    content: '◆';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

#divNavBar::after {
    content: '◆';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

#divNavBar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0 30px;
}

#divNavBar a {
    display: block;
    padding: 12px 25px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#divNavBar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#divNavBar a:hover::before {
    left: 100%;
}

#divNavBar a:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: 
        0 0 10px rgba(255, 0, 255, 0.5),
        inset 0 0 10px rgba(255, 0, 255, 0.1);
}

#divNavBar a.nav-home {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Main Content */
#divMain {
    min-width: 0;
}

/* Post Cards - Cyberpunk Style */
.post {
    background: var(--bg-secondary);
    border: 1px solid var(--neon-cyan);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.post::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--neon-cyan), transparent, var(--neon-pink));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover::before {
    opacity: 0.5;
}

.post:hover {
    transform: translateX(10px);
    box-shadow: 
        -10px 0 30px rgba(0, 255, 255, 0.2),
        10px 0 30px rgba(255, 0, 255, 0.2);
}

.post-date {
    display: inline-block;
    padding: 5px 15px;
    margin-bottom: 15px;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.post-title a {
    color: inherit;
}

.post-title a:hover {
    color: var(--neon-pink);
}

.post-body {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    border-left: 3px solid var(--neon-purple);
    padding-left: 20px;
}

.post-footer {
    font-size: 0.85rem;
    color: var(--neon-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.3);
}

/* Single Post */
.post.single {
    padding: 40px;
    border-width: 2px;
}

.post.single .post-title {
    font-size: 2rem;
    color: var(--neon-yellow);
    text-shadow: 
        0 0 10px rgba(255, 255, 0, 0.5),
        0 0 20px rgba(255, 255, 0, 0.3);
}

/* Sidebar - Cyberpunk Style */
#divSidebar {
    position: sticky;
    top: 20px;
}

.function {
    background: var(--bg-secondary);
    border: 1px solid var(--neon-purple);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
}

.function::before {
    content: '▣';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--bg-primary);
    padding: 0 10px;
    color: var(--neon-purple);
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--neon-purple);
}

.function_t {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-purple);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--neon-purple);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
}

.function_c ul {
    list-style: none;
}

.function li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    position: relative;
    padding-left: 20px;
}

.function li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

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

.function a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.function a:hover {
    color: var(--neon-cyan);
    padding-left: 10px;
}

/* Pagination - Cyberpunk Style */
.pagebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pagebar a,
.pagebar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 15px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neon-cyan);
    background: var(--bg-secondary);
    border: 1px solid var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagebar a:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.now-page a,
.pagebar .current {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
    color: var(--bg-primary);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5);
}

/* Comments - Cyberpunk Style */
#divCommentPost {
    background: var(--bg-secondary);
    border: 2px solid var(--neon-cyan);
    padding: 30px;
    margin-top: 40px;
    position: relative;
}

#divCommentPost::before {
    content: '◆ SYSTEM.READY ◆';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-primary);
    padding: 0 15px;
    color: var(--neon-cyan);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

#txaArticle {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

#txaArticle:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.button,
input[type="submit"] {
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-primary);
    background: var(--neon-cyan);
    border: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

.button:hover,
input[type="submit"]:hover {
    background: var(--neon-pink);
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.6),
        0 0 60px rgba(255, 0, 255, 0.3);
    transform: scale(1.05);
}

/* Footer - Cyberpunk Style */
#divBottom {
    background: var(--bg-secondary);
    border: 1px solid var(--neon-cyan);
    padding: 40px;
    margin-top: 60px;
    text-align: center;
    position: relative;
}

#divBottom::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

#BlogCopyRight {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#BlogCopyRight a {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Utilities */
.clear {
    clear: both;
}

/* Glitch Effect Animation */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Scanline Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    #divAll {
        padding: 0 15px;
    }
    
    #divTop {
        padding: 40px 20px;
    }
    
    #BlogTitle {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    #divNavBar ul {
        padding: 0 20px;
    }
    
    #divNavBar a {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .post {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post.single {
        padding: 25px;
    }
    
    .post.single .post-title {
        font-size: 1.5rem;
    }
    
    .function {
        padding: 20px;
    }
    
    #divBottom {
        padding: 30px 20px;
    }
}

/* Animations */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.post {
    animation: slideIn 0.5s ease forwards;
}

.post:nth-child(1) { animation-delay: 0.1s; }
.post:nth-child(2) { animation-delay: 0.2s; }
.post:nth-child(3) { animation-delay: 0.3s; }
.post:nth-child(4) { animation-delay: 0.4s; }
.post:nth-child(5) { animation-delay: 0.5s; }

#BlogTitle {
    animation: flicker 3s infinite;
}
