/* ===================== 液态/有机设计风格 - Organic Liquid Theme ===================== */

/* ---------- CSS 变量定义 ---------- */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    --organic-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --organic-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --organic-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d299c2 100%);
    --organic-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --organic-dark: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-lg: 32px;
    --radius-xl: 50px;
    --radius-full: 50%;
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ---------- 全局重置与基础样式 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 有机气泡背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(99, 102, 241, 0.2) 0%, transparent 40%);
    animation: bubbleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

a {
    color: #667eea;
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: #764ba2;
    transform: translateY(-2px);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* ---------- 主容器 - 有机形态 ---------- */
#divAll {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0;
    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(--glass-shadow);
    overflow: hidden;
    position: relative;
}

#divAll::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--organic-green);
    border-radius: var(--radius-full);
    opacity: 0.3;
    filter: blur(60px);
    animation: organicPulse 8s ease-in-out infinite;
}

#divAll::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: var(--organic-purple);
    border-radius: var(--radius-full);
    opacity: 0.3;
    filter: blur(50px);
    animation: organicPulse 10s ease-in-out infinite reverse;
}

@keyframes organicPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.5; }
}

#divPage {
    position: relative;
    z-index: 1;
    padding: 0 0 30px;
}

#divMiddle {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.clear {
    clear: both;
}

/* ---------- 顶部区域 - 有机曲线 ---------- */
#divTop {
    position: relative;
    padding: 60px 0 40px;
    text-align: center;
    background: var(--organic-blue);
    margin: 0 -40px 30px;
    border-radius: 0 0 50% 50% / 0 0 100px 100px;
    overflow: hidden;
}

#divTop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 50%, rgba(255,255,255,0.2) 0%, transparent 30%),
        radial-gradient(circle at 90% 50%, rgba(255,255,255,0.15) 0%, transparent 25%);
}

#BlogTitle {
    position: relative;
    font-size: 3em;
    font-weight: 700;
    margin: 0 0 15px;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 40px rgba(0,0,0,0.1);
    letter-spacing: -1px;
}

#BlogTitle a {
    color: inherit;
    -webkit-text-fill-color: transparent;
}

#BlogTitle a:hover {
    transform: scale(1.05);
    display: inline-block;
}

#BlogSubTitle {
    position: relative;
    font-size: 1.1em;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---------- 导航栏 - 液态药丸设计 ---------- */
#divNavBar {
    margin: 30px 0;
    padding: 0;
    text-align: center;
}

#divNavBar ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    background: rgba(255,255,255,0.7);
    padding: 10px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

#divNavBar li {
    display: inline-block;
}

#divNavBar a {
    display: block;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95em;
    border-radius: var(--radius-xl);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

#divNavBar a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    transition: var(--transition-smooth);
    z-index: -1;
}

#divNavBar a:hover,
#divNavBar a.on {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#divNavBar a:hover::before,
#divNavBar a.on::before {
    width: 150%;
    height: 150%;
}

/* ---------- 主内容区与侧边栏布局 ---------- */
#divMain {
    float: left;
    width: calc(100% - 320px);
    padding-right: 40px;
}

#divSidebar {
    float: right;
    width: 280px;
}

/* ---------- 文章卡片 - 有机玻璃态 ---------- */
.post {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.6);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.post:hover::before {
    opacity: 1;
}

.post.multi {
    cursor: pointer;
}

.post.single {
    background: rgba(255,255,255,0.95);
}

.post-title {
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease;
}

.post-title a:hover {
    background-size: 100% 100%;
    -webkit-text-fill-color: transparent;
}

.post.single .post-title {
    font-size: 2em;
    text-align: center;
    margin-bottom: 25px;
}

.post-date {
    display: inline-block;
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-xl);
    font-weight: 500;
}

.post-body {
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 1.05em;
}

.post-body p {
    margin-bottom: 18px;
}

.post-body a {
    color: #667eea;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 2px;
}

.post-body a:hover {
    border-bottom-color: #667eea;
}

.post-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 0.9em;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- 侧边栏组件 - 液态卡片 ---------- */
.function {
    background: rgba(255,255,255,0.85);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.function:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.function_t {
    font-size: 1.15em;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid transparent;
    border-image: var(--organic-green);
    border-image-slice: 1;
    position: relative;
}

.function_t::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.function_c ul {
    padding: 0;
}

.function_c li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    padding-left: 20px;
    transition: var(--transition-smooth);
}

.function_c li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--organic-blue);
    border-radius: var(--radius-full);
    transition: var(--transition-bounce);
}

.function_c li:hover::before {
    transform: translateY(-50%) scale(1.5);
    background: var(--primary-gradient);
}

.function_c li:last-child {
    border-bottom: none;
}

.function_c a {
    color: var(--text-secondary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.function_c a:hover {
    color: #667eea;
    padding-left: 8px;
}

/* ---------- 分页 ---------- */
.pagebar {
    text-align: center;
    padding: 30px 0;
}

.page {
    display: inline-block;
    margin: 0 5px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.8);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-bounce);
    border: 1px solid rgba(255,255,255,0.6);
}

.page:hover,
.now-page {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* ---------- 评论区域 ---------- */
.msg {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.msgname {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msgarticle {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 50px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---------- 评论表单 ---------- */
#divCommentPost {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

#divCommentPost p:first-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1em;
}

#txaArticle {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    transition: var(--transition-smooth);
    background: rgba(255,255,255,0.8);
}

#txaArticle:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.button {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: var(--radius-xl);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

/* ---------- 底部 ---------- */
#divBottom {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    background: var(--organic-dark);
    border-radius: 50% 50% 0 0 / 100px 100px 0 0;
    position: relative;
    overflow: hidden;
    clear: both;
    width: 100%;
}

#divBottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.08) 0%, transparent 25%);
}

#BlogCopyRight {
    position: relative;
    color: rgba(255,255,255,0.9);
    font-size: 0.95em;
    line-height: 2;
}

#BlogCopyRight a {
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    margin: 0 5px;
}

#BlogCopyRight a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 1024px) {
    #divAll {
        margin: 20px;
    }
    
    #divMiddle {
        padding: 0 25px;
    }
    
    #divMain {
        width: calc(100% - 280px);
        padding-right: 25px;
    }
    
    #divSidebar {
        width: 255px;
    }
}

@media (max-width: 768px) {
    #divMiddle {
        padding: 0 20px;
    }
    
    #divMain,
    #divSidebar {
        float: none;
        width: 100%;
        padding: 0;
    }
    
    #divSidebar {
        margin-top: 30px;
    }
    
    #BlogTitle {
        font-size: 2em;
    }
    
    #divNavBar ul {
        gap: 8px;
    }
    
    #divNavBar a {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .post {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.3em;
    }
    
    .function {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    #divAll {
        margin: 10px;
        border-radius: var(--radius-md);
    }
    
    #divTop {
        padding: 40px 0 30px;
    }
    
    #BlogTitle {
        font-size: 1.6em;
    }
    
    #divNavBar a {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .post {
        padding: 18px;
    }
}

/* ---------- 特殊效果 ---------- */
/* 浮动动画 */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 发光效果 */
.glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* 有机形状遮罩 */
.organic-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--organic-dark);
}
