/* ========================================
   Industrial Brutalist Theme Template
   工业粗野主义主题模板
   ======================================== */

/* CSS Variables - Industrial Theme */
:root {
    --bg-concrete: #2a2a2a;
    --bg-dark: #1a1a1a;
    --rust-orange: #c75b39;
    --steel-blue: #4a5568;
    --warning-yellow: #f6e05e;
    --danger-red: #e53e3e;
    --text-light: #e2e8f0;
    --text-muted: #a0aec0;
    --border-heavy: 4px solid #000;
    --radius: 0px;
    --max-width: 1400px;
    --sidebar-width: 350px;
}

/* 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: 'Roboto Mono', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-concrete);
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0,0,0,.1) 35px, rgba(0,0,0,.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(0,0,0,.05) 35px, rgba(0,0,0,.05) 70px);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    color: var(--rust-orange);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--rust-orange);
    transition: all 0.2s ease;
}

a:hover {
    background: var(--rust-orange);
    color: var(--bg-dark);
    padding: 2px 4px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.2);
    border: 3px solid #000;
}

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

#divMiddle {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 0;
    align-items: start;
    border: var(--border-heavy);
    border-top: none;
}

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

/* Header - Industrial Style */
#divTop {
    padding: 60px 40px;
    background: var(--bg-dark);
    border: var(--border-heavy);
    border-bottom: 8px solid var(--rust-orange);
    position: relative;
    overflow: hidden;
}

#divTop::before {
    content: '⚠ CAUTION ⚠';
    position: absolute;
    top: 10px;
    left: -50px;
    background: var(--warning-yellow);
    color: #000;
    padding: 5px 60px;
    font-size: 0.75rem;
    font-weight: 900;
    transform: rotate(-45deg);
    letter-spacing: 3px;
}

#divTop::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--warning-yellow) 0px,
        var(--warning-yellow) 20px,
        #000 20px,
        #000 40px
    );
}

#BlogTitle {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 4px 4px 0 #000;
    letter-spacing: 5px;
}

#BlogTitle a {
    color: inherit;
    border: none;
}

#BlogTitle a:hover {
    background: none;
    color: var(--rust-orange);
}

#BlogSubTitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Navigation - Industrial Style */
#divNavBar {
    background: var(--steel-blue);
    border: var(--border-heavy);
    border-top: none;
    padding: 0;
    margin: 0;
}

#divNavBar ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

#divNavBar li {
    flex: 1;
    min-width: 120px;
    border-right: 2px solid #000;
}

#divNavBar li:last-child {
    border-right: none;
}

#divNavBar a {
    display: block;
    padding: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    border: none;
    transition: all 0.2s ease;
}

#divNavBar a:hover {
    background: var(--rust-orange);
    color: #000;
    padding: 20px;
}

#divNavBar a.nav-home {
    background: var(--rust-orange);
    color: #000;
}

/* Main Content */
#divMain {
    min-width: 0;
    border-right: var(--border-heavy);
    padding: 40px;
}

@media (max-width: 1024px) {
    #divMain {
        border-right: none;
        border-bottom: var(--border-heavy);
    }
}

/* Post Cards - Industrial Style */
.post {
    background: var(--bg-dark);
    border: 3px solid #000;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

.post::before {
    content: '◆';
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--rust-orange);
    color: #000;
    padding: 5px 15px;
    font-weight: 900;
    border: 2px solid #000;
}

.post-date {
    display: inline-block;
    padding: 8px 16px;
    margin-bottom: 20px;
    background: var(--steel-blue);
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #000;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.post-title a {
    color: inherit;
    border: none;
}

.post-title a:hover {
    background: none;
    color: var(--rust-orange);
}

.post-body {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-left: 4px solid var(--rust-orange);
}

.post-footer {
    font-size: 0.85rem;
    color: var(--warning-yellow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-top: 20px;
    border-top: 2px dashed var(--steel-blue);
}

/* Single Post */
.post.single {
    padding: 40px;
}

.post.single .post-title {
    font-size: 2rem;
    color: var(--rust-orange);
}

/* Sidebar - Industrial Style */
#divSidebar {
    background: var(--bg-dark);
    padding: 40px;
}

.function {
    background: var(--bg-concrete);
    border: 3px solid #000;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    position: relative;
}

.function::before {
    content: '▣';
    position: absolute;
    top: -15px;
    left: 15px;
    background: var(--warning-yellow);
    color: #000;
    padding: 5px 15px;
    font-weight: 900;
    border: 2px solid #000;
}

.function_t {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--rust-orange);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.function_c ul {
    list-style: none;
}

.function li {
    padding: 12px 0;
    border-bottom: 1px solid var(--steel-blue);
    position: relative;
    padding-left: 25px;
}

.function li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--rust-orange);
    font-weight: 700;
}

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

.function a {
    color: var(--text-muted);
    font-size: 0.9rem;
    border: none;
}

.function a:hover {
    background: none;
    color: var(--rust-orange);
    padding: 0;
}

/* Pagination - Industrial Style */
.pagebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 40px 0;
    flex-wrap: wrap;
    border: 2px solid #000;
}

.pagebar a,
.pagebar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 15px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--steel-blue);
    border-right: 2px solid #000;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s ease;
}

.pagebar a:last-child,
.pagebar span:last-child {
    border-right: none;
}

.pagebar a:hover {
    background: var(--rust-orange);
    color: #000;
}

.now-page a,
.pagebar .current {
    background: var(--warning-yellow);
    color: #000;
    font-weight: 900;
}

/* Comments - Industrial Style */
#divCommentPost {
    background: var(--bg-concrete);
    border: 3px solid #000;
    padding: 35px;
    margin-top: 40px;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    position: relative;
}

#divCommentPost::before {
    content: '⚡ INPUT ⚡';
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--danger-red);
    color: #fff;
    padding: 5px 20px;
    font-weight: 900;
    border: 2px solid #000;
    letter-spacing: 3px;
}

#txaArticle {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    background: #000;
    border: 3px solid var(--steel-blue);
    color: var(--warning-yellow);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

#txaArticle:focus {
    outline: none;
    border-color: var(--rust-orange);
}

.button,
input[type="submit"] {
    padding: 18px 45px;
    font-size: 1rem;
    font-weight: 900;
    color: #000;
    background: var(--warning-yellow);
    border: 3px solid #000;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #000;
}

.button:hover,
input[type="submit"]:hover {
    background: var(--rust-orange);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

/* Footer - Industrial Style */
#divBottom {
    background: var(--bg-dark);
    border: var(--border-heavy);
    border-top: 8px solid var(--rust-orange);
    padding: 50px;
    margin-top: 0;
    text-align: center;
    position: relative;
}

#divBottom::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--warning-yellow) 0px,
        var(--warning-yellow) 20px,
        #000 20px,
        #000 40px
    );
}

#BlogCopyRight {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#BlogCopyRight a {
    color: var(--rust-orange);
    border: none;
}

#BlogCopyRight a:hover {
    background: none;
    color: var(--warning-yellow);
}

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

/* Animations */
@keyframes warning-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post {
    animation: slide-up 0.4s ease forwards;
}

.post:nth-child(1) { animation-delay: 0.05s; }
.post:nth-child(2) { animation-delay: 0.1s; }
.post:nth-child(3) { animation-delay: 0.15s; }
.post:nth-child(4) { animation-delay: 0.2s; }
.post:nth-child(5) { animation-delay: 0.25s; }

#divTop::before {
    animation: warning-pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    #BlogTitle {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    #divNavBar li {
        flex: 1 1 50%;
        border-right: none;
        border-bottom: 2px solid #000;
    }
    
    #divNavBar li:nth-child(even) {
        border-right: none;
    }
    
    #divMain {
        padding: 25px;
    }
    
    .post {
        padding: 25px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post.single {
        padding: 30px;
    }
    
    .post.single .post-title {
        font-size: 1.5rem;
    }
    
    #divSidebar {
        padding: 25px;
    }
    
    .function {
        padding: 20px;
    }
    
    #divBottom {
        padding: 35px 25px;
    }
}
