/* 基本样式 */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    height: 100%; /* 确保 body 和 html 的高度为 100% */
    background: url('../../img/loading.gif') no-repeat center center fixed; /* 设置背景图 */
    background-size: cover; /* 使背景图覆盖整个视口 */
}

.wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 确保 wrap 的最小高度为视口高度 */
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    background: white; /* 白色背景 */
    border-radius: 10px; /* 圆角 */
    overflow: hidden; /* 防止内容溢出 */
    position: relative; /* 使 wrap 成为定位上下文 */
    z-index: 1; /* 确保 wrap 在 canvas 之下 */
    transition: opacity 1s ease; /* 平滑过渡 */
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

.Header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: linear-gradient(135deg, #007bff, #0056b3); /* 渐变背景 */
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 底部边框 */
    border-radius: 10px; /* 添加圆角 */
    overflow: hidden; /* 确保子元素的圆角不会超出父元素 */
}

.Logo a {
    font-size: 24px;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.site-name {
    text-align: center;
    flex: 1; /* 使 site-name 占据剩余的空间 */
    font-size: 18px;
    font-weight: bold;
    margin: 0 auto; /* 居中对齐 */
}

.Nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.Nav li {
    margin: 0 15px;
}

.Nav a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 30px; /* 圆角 */
    transition: background-color 0.3s ease, transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1); /* 背景透明度 */
}

.Nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05); /* 放大效果 */
}

.Container {
    flex: 1; /* 使 Container 占据剩余的空间 */
    padding: 20px 0;
}

.FirstBlock__items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.FirstBlock__item {
    flex: 1 0 20%;
    box-sizing: border-box;
    margin-bottom: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.FirstBlock__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.FirstBlock__item-inner {
    text-align: center;
    padding: 20px;
}

.nav-icon {
    max-width: 100%;
    height: auto;
    width: 123px;
    height: 20px;
}

.FirstBlock__item p {
    margin: 10px 0;
    font-size: 16px;
    color: #555;
}

.smoothing {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.smoothing:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.Footer {
    background: linear-gradient(135deg, #007bff, #0056b3); /* 渐变背景 */
    color: white;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* 顶部边框 */
    border-radius: 10px; /* 添加圆角 */
    overflow: hidden; /* 确保子元素的圆角不会超出父元素 */
}

.Footer__copy {
    margin: 0;
    font-size: 14px;
}

/* Canvas 样式 */
.canvas {
    position: fixed; /* 固定位置，覆盖整个视口 */
    top: 0;
    left: 0;
    z-index: 2; /* 将 canvas 放在所有内容的前面 */
    width: 100%;
    height: 100%;
    pointer-events: none; /* 防止 canvas 捕获鼠标事件 */
    background: linear-gradient(135deg, #ffffff, #ffffff); /* 渐变背景 */
}

/* 媒体查询 */
@media (max-width: 992px) {
    .Nav ul {
        flex-wrap: wrap;
    }

    .Nav li {
        margin: 5px 10px;
    }

    .FirstBlock__item {
        flex: 1 0 30%;
    }

    .nav-icon {
        width: 80px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .Header {
        flex-direction: column;
        align-items: center; /* 移动设备上垂直居中 */
    }

    .Nav ul {
        flex-direction: column;
        width: 100%;
    }

    .Nav li {
        margin: 10px 0;
    }

    .Nav a {
        width: 100%;
        text-align: center;
    }

    .FirstBlock__item {
        flex: 1 0 45%;
    }

    .nav-icon {
        width: 60px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .FirstBlock__item {
        flex: 1 0 100%;
    }

    .nav-icon {
        width: 80px;
        height: auto;
    }
}