/* ================= 基础重置 ================= */
/* 通配符选择器重置所有元素的默认样式 */
* {
    margin: 0;
    /* 清除默认外边距 */
    padding: 0;
    /* 清除默认内边距 */
    box-sizing: border-box;
    /* 盒模型设置为边框盒，方便尺寸计算 */
}
 
/* 全局页面基础样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    /* 优先使用微软雅黑字体 */
}
 
/* ================= 背景设置 ================= */
.background {
    position: fixed;
    /* 固定定位覆盖全屏 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/background.jpg') center/cover;
    /* 背景图居中并充满容器 */
    filter: brightness(0.7);
    /* 降低背景亮度提升前景可读性 */
    z-index: -1;
    /* 置于内容层下方 */
}
 
nav {
    position: fixed;
    /* 固定定位，使导航栏始终在顶部 */
    top: 0;
    /* 从顶部开始 */
    width: 100%;
    /* 导航栏宽度占满整个屏幕 */
    padding: 1rem;
    /* 导航栏内边距，1rem 约等于 16px */
    background: transparent;
    /* 设置导航栏背景为完全透明 */
    display: flex;
    /* 使用弹性布局 */
    justify-content: center;
    /* 水平居中对齐导航项 */
    gap: 2rem;
    /* 导航项之间的间距 */
    margin-top: -50px;
 
}
 
/* ================= 主容器样式 ================= */
.container {
    max-width: 1200px;
    /* 最大内容宽度限制 */
    margin: 20px auto;
    /* 上下边距20px，水平居中 */
    padding: 30px;
    /* 内边距营造呼吸空间 */
 
    /* 玻璃拟态效果实现 */
    background: rgba(255, 255, 255, 0.2);
    /* 半透明白色背景 */
    backdrop-filter: blur(10px);
    /* 背景模糊效果 */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 半透明边框 */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    /* 柔和阴影增强立体感 */
 
    border-radius: 15px;
    /* 圆角设计 */
    margin-top: 50px;
}
 
/* 文字内容增强可读性 */
.container h1,
.container h2,
.container p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    /* 添加轻微文字阴影防止背景融合 */
}
 
/* ================= 头像样式 ================= */
.avatar {
    width: 150px;
    /* 固定尺寸 */
    height: 150px;
    border-radius: 50%;
    /* 圆形裁剪 */
    display: block;
    /* 块级元素居中 */
    margin: 0 auto 20px;
    /* 下边距20px */
    border: 3px solid #fff;
    /* 白色边框 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* 立体阴影效果 */
}
 
/* ================= 照片墙布局 ================= */
.gallery {
    display: grid;
    /* 使用网格布局 */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* 自适应列宽 */
    gap: 15px;
    /* 网格间隙 */
    margin: 20px 0;
    /* 上下外边距 */
}
 
/* 图片项样式 */
.gallery img {
    width: 100%;
    /* 充满网格容器 */
    height: 200px;
    /* 固定高度统一尺寸 */
    object-fit: cover;
    /* 保持比例裁剪填充 */
    border-radius: 8px;
    /* 圆角设计 */
    transition: transform 0.3s;
    /* 缩放动画过渡 */
}
 
/* 图片悬停效果 */
.gallery img:hover {
    transform: scale(2);
    /* 悬停放大2倍 */
}
 
/* ================= 小部件容器 ================= */
.widgets {
    display: flex;
    /* 弹性布局横向排列 */
    gap: 20px;
    /* 元素间距 */
    justify-content: center;
    /* 水平居中 */
    margin-top: 30px;
    /* 顶部外边距 */
    background: rgba(255, 255, 255, 0.2) !important;
    /* 半透明白背景 */
}
 
/* 通用小部件样式 */
#clock,
#weather {
    padding: 15px 25px;
    /* 内边距 */
    background: rgba(255, 255, 255, 0.95);
    /* 高透明度背景 */
    border-radius: 10px;
    /* 圆角设计 */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    /* 立体阴影 */
}