/* ========================================
   Japanese Zen Theme Template
   日式和风禅意主题模板
   ======================================== */

/* CSS Variables - Zen Theme */
:root {
    --bg-washi: #f7f5f0;
    --bg-dark: #2c2c2c;
    --ink-black: #1a1a1a;
    --cinnabar: #c93756;
    --bamboo: #6b8e6b;
    --gold: #c9a227;
    --stone: #8c8c8c;
    --mist: #e8e6e1;
    --text-primary: #2c2c2c;
    --text-secondary: #5c5c5c;
    --text-muted: #8c8c8c;
    --radius: 4px;
    --max-width: 1100px;
    --sidebar-width: 280px;
}

/* 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: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
    font-size: 1rem;
    line-height: 2;
    color: var(--text-primary);
    background: var(--bg-washi);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(201, 55, 86, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(107, 142, 107, 0.03) 0%, transparent 20%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

a {
    color: var(--cinnabar);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cinnabar);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

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

/* Header - Zen Style */
#divTop {
    padding: 80px 0 60px;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

#divTop::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 30px;
    background: var(--stone);
}

#divTop::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stone), transparent);
}

#BlogTitle {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--ink-black);
    letter-spacing: 0.3em;
    writing-mode: horizontal-tb;
}

#BlogTitle a {
    color: inherit;
}

#BlogTitle a::after {
    display: none;
}

#BlogSubTitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    font-weight: 300;
}

/* Navigation - Zen Style */
#divNavBar {
    margin-bottom: 60px;
    padding: 20px 0;
    position: relative;
}

#divNavBar::before,
#divNavBar::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--mist);
}

#divNavBar::before {
    top: 0;
}

#divNavBar::after {
    bottom: 0;
}

#divNavBar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    list-style: none;
}

#divNavBar a {
    display: block;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    transition: all 0.3s ease;
}

#divNavBar a::after {
    bottom: 5px;
    height: 2px;
    background: var(--cinnabar);
}

#divNavBar a:hover {
    color: var(--cinnabar);
}

#divNavBar a.nav-home {
    color: var(--cinnabar);
}

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

/* Post Cards - Zen Style */
.post {
    padding: 50px 0;
    margin-bottom: 0;
    position: relative;
    border-bottom: 1px solid var(--mist);
}

.post:last-child {
    border-bottom: none;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background: var(--cinnabar);
}

.post-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    font-weight: 300;
}

.post-title {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: 0.05em;
}

.post-title a {
    color: inherit;
}

.post-title a::after {
    display: none;
}

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

.post-body {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 25px;
    text-align: justify;
}

.post-footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

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

.post.single .post-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
}

.post.single .post-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--cinnabar);
    margin: 30px auto 0;
}

.post.single .post-body {
    font-size: 1.05rem;
    line-height: 2.2;
}

.post.single .post-body p {
    margin-bottom: 2em;
    text-indent: 2em;
}

/* Sidebar - Zen Style */
#divSidebar {
    position: sticky;
    top: 40px;
}

.function {
    padding: 40px 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--mist);
}

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

.function_t {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    letter-spacing: 0.2em;
    position: relative;
    font-weight: 400;
}

.function_t::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--bamboo);
}

.function_c ul {
    list-style: none;
}

.function li {
    padding: 12px 0;
    border-bottom: 1px dotted var(--mist);
}

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

.function a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.function a:hover {
    color: var(--cinnabar);
}

/* Pagination - Zen Style */
.pagebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 60px 0;
    padding: 30px 0;
    border-top: 1px solid var(--mist);
    border-bottom: 1px solid var(--mist);
}

.pagebar a,
.pagebar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.pagebar a:hover {
    color: var(--cinnabar);
}

.now-page a,
.pagebar .current {
    color: var(--cinnabar);
    border: 1px solid var(--cinnabar);
}

/* Comments - Zen Style */
#divCommentPost {
    padding: 50px 0;
    margin-top: 60px;
    border-top: 1px solid var(--mist);
    position: relative;
}

#divCommentPost::before {
    content: '留言';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-washi);
    padding: 0 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

#txaArticle {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    background: transparent;
    border: 1px solid var(--mist);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 2;
    resize: vertical;
    transition: all 0.3s ease;
}

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

.button,
input[type="submit"] {
    padding: 15px 40px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--bg-washi);
    background: var(--cinnabar);
    border: none;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover,
input[type="submit"]:hover {
    background: var(--bamboo);
}

/* Footer - Zen Style */
#divBottom {
    padding: 60px 0;
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid var(--mist);
    position: relative;
}

#divBottom::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--cinnabar);
    border-radius: 50%;
}

#BlogCopyRight {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

#BlogCopyRight a {
    color: var(--text-secondary);
}

#BlogCopyRight a:hover {
    color: var(--cinnabar);
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post {
    animation: fadeIn 0.8s 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; }

/* Responsive */
@media (max-width: 768px) {
    #divAll {
        padding: 0 25px;
    }
    
    #divTop {
        padding: 60px 0 40px;
    }
    
    #BlogTitle {
        font-size: 2rem;
        letter-spacing: 0.2em;
    }
    
    #divNavBar ul {
        gap: 25px;
    }
    
    .post {
        padding: 35px 0;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .post.single {
        padding: 40px 0;
    }
    
    .post.single .post-title {
        font-size: 1.6rem;
    }
    
    .function {
        padding: 30px 0;
    }
    
    #divBottom {
        padding: 40px 0;
    }
}
