/* ==================== 玻璃态模板 - Glass Morphism Theme ==================== */
/* 干净玻璃态风格 - 轻量化设计 */

/* -------------------- CSS变量定义 -------------------- */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-hover: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-border-strong: rgba(255, 255, 255, 0.35);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* -------------------- 基础重置与全局 -------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.clear {
    clear: both;
}

/* -------------------- 玻璃态卡片通用样式 -------------------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-strong);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* -------------------- 主容器 -------------------- */
#divAll {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#divPage {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#divMiddle {
    padding: 30px;
}

/* -------------------- 顶部标题区域 -------------------- */
#divTop {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

#divTop::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

#BlogTitle {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

#BlogTitle a {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(99, 102, 241, 0.3);
}

#BlogTitle a:hover {
    text-shadow: 0 4px 30px rgba(99, 102, 241, 0.5);
}

#BlogSubTitle {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* -------------------- 导航栏 -------------------- */
#divNavBar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 30px;
}

#divNavBar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 0;
}

#divNavBar li {
    position: relative;
}

#divNavBar a {
    display: block;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

#divNavBar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-md);
}

#divNavBar a:hover::before,
#divNavBar a.on::before {
    opacity: 1;
}

#divNavBar a:hover,
#divNavBar a.on {
    color: #fff;
}

/* -------------------- 主内容区域布局 -------------------- */
#divMain {
    width: calc(70% - 20px);
    float: left;
}

#divSidebar {
    width: 30%;
    float: right;
}

/* -------------------- 文章卡片 -------------------- */
.post {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.post:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-strong);
    box-shadow: var(--shadow-medium);
    transform: translateY(-3px);
}

.post.multi {
    position: relative;
    overflow: hidden;
}

.post.multi::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post.multi:hover::after {
    opacity: 1;
}

.post.single {
    background: rgba(255, 255, 255, 0.2);
}

.post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-title a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.post-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 10px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    width: fit-content;
}

.post-date::before {
    content: '📅';
    font-size: 0.9em;
}

.post-body {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.post-body p {
    margin-bottom: 12px;
}

.post-footer {
    font-size: 0.85em;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

/* -------------------- 文章内容页样式 -------------------- */
.post.single .post-title {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 20px;
}

.post.single .post-date {
    display: block;
    text-align: center;
    margin: 0 auto 20px;
}

.post.single .post-body {
    color: var(--text-primary);
    font-size: 1.05em;
    line-height: 1.9;
}

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5, .post-body h6 {
    margin: 25px 0 15px;
    font-weight: 600;
}

.post-body h1 { font-size: 1.6em; }
.post-body h2 { font-size: 1.4em; }
.post-body h3 { font-size: 1.25em; }

.post-body blockquote {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-body code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
}

.post-body pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 20px 0;
}

.post-body img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin: 20px 0;
}

.post-body ul, .post-body ol {
    margin: 15px 0 15px 25px;
}

.post-body ul li {
    list-style: disc;
    margin-bottom: 8px;
}

.post-body ol li {
    list-style: decimal;
    margin-bottom: 8px;
}

/* -------------------- 侧边栏 -------------------- */
.function {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.function:hover {
    border-color: var(--glass-border-strong);
    box-shadow: var(--shadow-medium);
}

.function_t {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: #fff;
    padding: 15px 20px;
    font-size: 1.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.function_t::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.5) 100%);
    border-radius: 2px;
}

.function_c {
    padding: 15px;
}

.function_c ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.function_c ul li:last-child {
    border-bottom: none;
}

.function_c ul li:hover {
    padding-left: 8px;
}

.function_c a {
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.function_c a:hover {
    color: var(--primary);
}

/* 友情链接特殊样式 */
#divLinkage .function_c ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#divLinkage .function_c li {
    padding: 0;
    border: none;
}

#divLinkage .function_c a {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

#divLinkage .function_c a:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--glass-border-strong);
    color: var(--primary-dark);
}

/* -------------------- 分页 -------------------- */
.pagebar {
    text-align: center;
    padding: 30px 0;
}

.page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    margin: 0 5px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.page:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-strong);
    color: var(--primary);
    transform: translateY(-2px);
}

.now-page .page,
.page.on {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* -------------------- 评论区域 -------------------- */
#divCommentPost {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-top: 20px;
}

#divCommentPost p:first-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1em;
}

#txaArticle {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    transition: all 0.3s ease;
}

#txaArticle:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.button {
    padding: 12px 35px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 评论列表 */
ul.msg {
    margin: 20px 0;
}

li.msgname {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

li.msgarticle {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 15px;
}

/* -------------------- 底部版权 -------------------- */
#divBottom {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    padding: 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

#BlogCopyRight {
    font-size: 0.9em;
    line-height: 1.8;
}

#BlogCopyRight a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

#BlogCopyRight a:hover {
    color: #fff;
}

/* -------------------- 响应式设计 -------------------- */
@media (max-width: 992px) {
    body {
        padding: 10px;
    }
    
    #divMiddle {
        padding: 20px;
    }
    
    #divMain,
    #divSidebar {
        width: 100%;
        float: none;
    }
    
    #divSidebar {
        margin-top: 30px;
    }
    
    #BlogTitle {
        font-size: 2em;
    }
    
    #divNavBar ul {
        justify-content: center;
    }
    
    .post.single .post-title {
        font-size: 1.4em;
    }
}

@media (max-width: 576px) {
    #divMiddle {
        padding: 15px;
    }
    
    #BlogTitle {
        font-size: 1.6em;
    }
    
    #BlogSubTitle {
        font-size: 0.95em;
    }
    
    #divNavBar {
        padding: 0 15px;
    }
    
    #divNavBar a {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .post {
        padding: 20px;
    }
    
    .function_t {
        padding: 12px 15px;
    }
    
    .function_c {
        padding: 12px;
    }
}

/* -------------------- 动画效果 -------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post {
    animation: fadeInUp 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; }
