/* ============================================
   AIL0 博客园 - 圆润玻璃框架CSS
   基于实际HTML结构设计，确保生效
   ============================================ */

/* ===== 0. 全局背景设置 ===== */
body {
    /* 背景图片设置 */
    background-image: url('https://img2024.cnblogs.com/blog/3769841/202603/3769841-20260318132248751-84491881.jpg');
    background-attachment: fixed; /* 固定背景，滚动时不动 */
    background-size: cover; /* 覆盖整个屏幕 */
    background-position: center center; /* 居中显示 */
    background-repeat: no-repeat; /* 不重复 */
  
    /* 背景颜色作为备用 */
    background-color: #f0f2f5;
  
    /* 最小高度确保背景完整显示 */
    min-height: 100vh;
  
    /* 添加柔和的渐变遮罩，让文字更清晰 */
    position: relative;
}

/* 为背景添加一层半透明遮罩，提高文字可读性 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.15) 100%
    );
    pointer-events: none; /* 不干扰鼠标事件 */
    z-index: -1;
}

/* ===== 1. 全局基础设置 ===== */
:root {
    /* 颜色系统 - 调整为与背景更协调 */
    --frame-bg: rgba(255, 255, 255, 0.92);
    --frame-border: rgba(255, 255, 255, 0.75);
    --frame-border-inner: rgba(255, 255, 255, 0.35);
    --frame-shadow: rgba(0, 0, 0, 0.15);
    --frame-glow: rgba(255, 255, 255, 0.85);
  
    /* 圆角系统 */
    --radius-large: 20px;     /* 大圆角 */
    --radius-medium: 16px;    /* 中圆角 */
    --radius-small: 12px;     /* 小圆角 */
    --radius-tiny: 8px;       /* 微圆角 */
  
    /* 边框系统 */
    --border-thick: 2px solid var(--frame-border);
    --border-thin: 1px solid var(--frame-border-inner);
  
    /* 阴影系统 */
    --shadow-soft: 0 10px 40px var(--frame-shadow);
    --shadow-light: 0 6px 20px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 25px var(--frame-glow);
}

/* ===== 2. 主容器 - 基于实际结构 ===== */
#wrapper {
    /* 圆润边框 */
    border-radius: var(--radius-large);
  
    /* 多层边框效果 */
    border: var(--border-thick);
    box-shadow: 
        var(--shadow-soft),
        var(--shadow-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  
    /* 玻璃背景 - 增强透明度以显示背景 */
    background: var(--frame-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
  
    /* 内部间距 */
    margin: 30px auto;
    max-width: 1200px;
  
    /* 优雅过渡 */
    transition: all 0.4s ease;
  
    /* 确保在主背景之上 */
    position: relative;
    z-index: 1;
}

/* ===== 3. 头部区域 ===== */
#header {
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    border-bottom: var(--border-thin);
    padding: 30px 35px;
    margin: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.88) 100%
    );
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* 博客标题 */
.blog-title {
    border-radius: var(--radius-small);
    padding: 18px 25px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#Header1_HeaderTitle {
    font-size: 2.6em;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== 4. 主要内容区域 ===== */
#main_container {
    padding: 25px 35px;
}

#main_content {
    border-radius: var(--radius-medium);
    border: var(--border-thin);
    padding: 30px;
    margin: 25px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 文章列表容器 */
.post {
    border-radius: var(--radius-medium);
    border: var(--border-thin);
    padding: 30px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.post:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.92);
}

/* 文章标题 */
.postTitle2 {
    display: block;
    border-radius: var(--radius-small) var(--radius-small) 0 0;
    border-bottom: var(--border-thin);
    padding: 18px 25px;
    margin: -30px -30px 25px -30px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.92),
        rgba(255, 255, 255, 0.82)
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1.6em;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
}

.postTitle2:hover {
    color: #3498db;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.85)
    );
}

/* 文章摘要 */
.c_b_p_desc {
    border-radius: var(--radius-small);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 18px;
    margin: 18px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== 5. 侧边栏 ===== */
#leftmenu {
    border-radius: var(--radius-medium);
    border: var(--border-thick);
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* 导航菜单 */
#leftmenu h3 {
    border-radius: var(--radius-tiny);
    border-bottom: var(--border-thin);
    padding: 12px 18px;
    margin: -25px -25px 18px -25px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333;
    font-size: 1.2em;
}

#leftmenu ul {
    list-style: none;
    padding: 0;
}

#leftmenu li {
    margin-bottom: 10px;
}

#leftmenu .menu {
    display: block;
    border-radius: var(--radius-tiny);
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #555;
    text-decoration: none;
    transition: all 0.25s ease;
}

#leftmenu .menu:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== 6. 页脚 ===== */
#footer {
    border-radius: 0 0 var(--radius-medium) var(--radius-medium);
    border-top: var(--border-thick);
    padding: 30px 35px;
    margin: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    color: #666;
}

/* ===== 7. 日期标签 ===== */
.date {
    border-radius: var(--radius-tiny);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-block;
    margin-bottom: 18px;
    font-weight: 500;
}

/* ===== 8. 文章底部信息 ===== */
.postfoot {
    border-radius: var(--radius-tiny);
    border-top: var(--border-thin);
    padding-top: 18px;
    margin-top: 25px;
    color: #666;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* ===== 9. 按钮和交互元素 ===== */
/* 圆润按钮 */
input[type="submit"],
input[type="button"],
button {
    border-radius: var(--radius-tiny) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    padding: 10px 24px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    transition: all 0.25s ease !important;
    font-weight: 500 !important;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 输入框 */
input[type="text"],
input[type="password"],
textarea {
    border-radius: var(--radius-tiny) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    padding: 12px 18px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    transition: all 0.25s ease !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
    outline: none !important;
}

/* ===== 10. 特殊效果 ===== */
/* 鼠标悬停时的发光效果 */
#wrapper:hover {
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.18),
        0 0 40px rgba(255, 255, 255, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* 选中状态 */
.post:active {
    transform: translateY(2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== 11. 响应式调整 ===== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll; /* 移动端取消固定背景 */
    }
  
    #wrapper {
        border-radius: var(--radius-medium);
        margin: 15px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
  
    #header,
    #footer {
        border-radius: var(--radius-small);
        padding: 20px 25px;
    }
  
    .post {
        border-radius: var(--radius-small);
        padding: 20px;
    }
  
    #main_container {
        padding: 20px;
    }
  
    .blog-title {
        padding: 15px 20px;
    }
  
    #Header1_HeaderTitle {
        font-size: 2em;
    }
}

/* ===== 12. 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-tiny);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-tiny);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ===== 13. 顶部导航栏调整 ===== */
#top_nav {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: var(--border-thin);
}

/* ===== 14. 清除浮动 ===== */
.clear {
    clear: both;
}

/* ===== 15. 背景图片加载优化 ===== */
@media (prefers-reduced-motion: no-preference) {
    body {
        animation: fadeInBackground 1.5s ease-out;
    }
  
    @keyframes fadeInBackground {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
}

/* ===== 16. 打印样式优化 ===== */
@media print {
    body {
        background: white !important;
    }
  
    #wrapper {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        backdrop-filter: none !important;
    }
}