/* ==================== 玻璃态风格主题 CSS ==================== */
/* 配色方案: 深蓝紫渐变背景 + 毛玻璃效果 */

/* ---------------------- CSS变量定义 ---------------------- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dark: #2d3748;
    
    --accent-color: #00d4ff;
    --accent-hover: #00a8cc;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    
    --blur-amount: 16px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------- 全局样式 ---------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--dark-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 40%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ---------------------- 玻璃态容器 ---------------------- */
#divAll {
    max-width: 1280px;
    margin: 30px auto;
    padding: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

#divPage {
    width: 100%;
    padding: 0;
}

#divMiddle {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ---------------------- 顶部区域 ---------------------- */
#divTop {
    padding: 50px 0 30px;
    text-align: center;
    background: var(--primary-gradient);
    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 linear infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#BlogTitle {
    font-size: 3.2em;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

#BlogTitle a {
    color: var(--text-primary);
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#BlogTitle a:hover {
    filter: brightness(1.2);
}

#BlogSubTitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 300;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

/* ---------------------- 导航栏 ---------------------- */
#divNavBar {
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--glass-border);
}

#divNavBar ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

#divNavBar li {
    margin: 0;
}

#divNavBar a {
    display: block;
    padding: 18px 28px;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#divNavBar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

#divNavBar a:hover,
#divNavBar a.on {
    color: var(--text-primary);
}

#divNavBar a:hover::after,
#divNavBar a.on::after {
    width: 80%;
}

/* ---------------------- 主内容区域 ---------------------- */
#divMain {
    width: calc(100% - 320px);
    float: left;
    padding: 30px 0;
}

/* ---------------------- 文章卡片 ---------------------- */
div.post {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    margin-bottom: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

div.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

div.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--glass-highlight);
}

div.post:hover::before {
    transform: scaleX(1);
}

div.post.multi {
    cursor: pointer;
}

.post-date {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-date::before {
    content: '📅';
    font-size: 0.9em;
}

.post-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-title a:hover {
    filter: brightness(1.2);
}

.post-body {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.post-body p {
    margin: 0 0 12px 0;
}

.post-footer {
    font-size: 0.85em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

/* ---------------------- 侧边栏 ---------------------- */
#divSidebar {
    width: 290px;
    float: right;
    padding: 30px 0 30px 30px;
}

.function {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--transition);
}

.function:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.function_t {
    background: var(--primary-gradient);
    color: var(--text-primary);
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: 600;
    position: relative;
}

.function_t::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.function_c {
    padding: 15px 20px;
}

.function_c ul {
    list-style: none;
}

.function_c li {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    padding-left: 20px;
}

.function_c li:last-child {
    border-bottom: none;
}

.function_c li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2em;
    transition: var(--transition);
}

.function_c li:hover::before {
    transform: translateX(5px);
}

.function_c a {
    color: var(--text-secondary);
    display: block;
}

.function_c a:hover {
    color: var(--accent-color);
}

/* ---------------------- 分页 ---------------------- */
.pagebar {
    text-align: center;
    padding: 30px 0;
}

.page {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.page:hover {
    background: var(--primary-gradient);
    color: var(--text-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

.now-page .page {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border-color: transparent;
    font-weight: 600;
}

/* ---------------------- 评论区域 ---------------------- */
#divCommentPost {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    margin-top: 30px;
}

#divCommentPost p {
    margin-bottom: 15px;
}

#divCommentPost a[name='comment'] {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
}

#cancel-reply {
    float: right;
    color: var(--danger-color);
}

#cancel-reply:hover {
    color: #ff8585;
}

input.text,
#txaArticle {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95em;
    transition: var(--transition);
}

input.text:focus,
#txaArticle:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#txaArticle {
    min-height: 120px;
    resize: vertical;
}

input.button {
    padding: 12px 35px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

input.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

/* ---------------------- 评论列表 ---------------------- */
ul.msg {
    list-style: none;
    margin: 20px 0;
}

li.msgname {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
}

li.msgarticle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 15px 20px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

li.msgtime {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 10px;
}

img.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    margin-right: 12px;
}

/* ---------------------- 底部区域 ---------------------- */
#divBottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 30px;
}

#BlogCopyRight {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.8;
}

#BlogCopyRight a {
    color: var(--accent-color);
}

/* ---------------------- 清除浮动 ---------------------- */
.clear {
    clear: both;
}

/* ---------------------- 响应式设计 ---------------------- */
@media (max-width: 1024px) {
    #divMain {
        width: 100%;
        float: none;
    }
    
    #divSidebar {
        width: 100%;
        float: none;
        padding: 30px 0 0 0;
    }
}

@media (max-width: 768px) {
    #divAll {
        margin: 15px;
        border-radius: var(--border-radius-sm);
    }
    
    #divMiddle {
        padding: 0 15px;
    }
    
    #BlogTitle {
        font-size: 2.2em;
    }
    
    #divNavBar a {
        padding: 12px 18px;
        font-size: 0.9em;
    }
    
    div.post {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.3em;
    }
}

/* ---------------------- 动画效果 ---------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

div.post {
    animation: fadeInUp 0.6s ease-out;
}

div.post:nth-child(2) { animation-delay: 0.1s; }
div.post:nth-child(3) { animation-delay: 0.2s; }
div.post:nth-child(4) { animation-delay: 0.3s; }
div.post:nth-child(5) { animation-delay: 0.4s; }

/* ---------------------- 滚动条美化 ---------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gradient);
}

/* ---------------------- 选中文字样式 ---------------------- */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

/* ---------------------- 文章正文样式增强 ---------------------- */
div.post-body h1,
div.post-body h2,
div.post-body h3,
div.post-body h4 {
    color: var(--text-primary);
    margin: 25px 0 15px;
}

div.post-body h1 { font-size: 1.8em; }
div.post-body h2 { font-size: 1.5em; }
div.post-body h3 { font-size: 1.3em; }
div.post-body h4 { font-size: 1.1em; }

div.post-body blockquote {
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

div.post-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

div.post-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 20px 0;
}

div.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

div.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

div.post-body th,
div.post-body td {
    padding: 12px 15px;
    border: 1px solid var(--glass-border);
    text-align: left;
}

div.post-body th {
    background: var(--primary-gradient);
    color: var(--text-primary);
}

div.post-body tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}
