/* 全局样式 */
body, html {
    margin: 0; /* 移除默认外边距 */
    padding: 0; /* 移除默认内边距 */
    height: 100%; /* 确保html和body占据整个视口高度 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; /* 优雅的字体 */
    color: #333; /* 默认字体颜色 */
    line-height: 1.6; /* 行高 */
}

/* 头部样式 */
.header {
    background: linear-gradient(to right, #B5EAD7, #C7CEEA); /* 渐变蓝色背景 */ /* 渐变蓝色背景 */
    padding: 13px 50px; /* 上下左右内边距 */
    display: flex; /* 使用 Flexbox 布局 */
    justify-content: space-between; /* 元素两端对齐 */
    align-items: center; /* 垂直居中对齐 */
    box-shadow: 0 6px 20px rgba(0,0,0,0.1); /* 更柔和精致的阴影效果 */
    position: fixed; /* 固定在视口顶部 */
    width: 100%; /* 宽度占满 */
    top: 0; /* 顶部对齐 */
    left: 0; /* 左侧对齐 */
    z-index: 1000; /* 确保头部在其他内容之上 */
    box-sizing: border-box; /* 边框和内边距包含在宽度内 */
}

/* Logo 和标题的容器 */
.logo-container {
    display: flex; /* 使用Flexbox让Logo图片和标题水平对齐 */
    align-items: center; /* 垂直居中对齐 */
}

/* Logo 图片样式 */
.logo-img {
    height: 45px; /* 调整Logo图片的高度 */
    margin-right: 12px; /* Logo图片与标题之间的间距 */
    vertical-align: middle; /* 垂直对齐，确保与文本对齐 */
}

/* Logo 标题样式 */
.logo-title {
    font-size: 32px; /* Logo 字体大小 */
    font-weight: bold; /* 字体加粗 */
    color: #ffffff; /* 白色，在渐变背景下更清晰 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* 添加轻微的文字阴影 */
    text-decoration: none; /* 移除下划线 */
    transition: color 0.3s ease; /* 颜色过渡效果 */
}

.logo-title:hover {
    color: #e0faff; /* 鼠标悬停时的颜色，更亮的白色 */
}

/* 导航样式 */
.main-nav ul {
    list-style: none; /* 移除列表默认样式 */
    margin: 0; /* 移除外边距 */
    padding: 0; /* 移除内边距 */
    display: flex; /* 使用 Flexbox 布局 */
}

.main-nav li {
    margin-left: 35px; /* 列表项之间的左侧间距 */
}

.main-nav a {
    text-decoration: none; /* 移除下划线 */
    color: #ffffff; /* 导航链接颜色 */
    font-size: 19px; /* 字体大小 */
    padding: 8px 0; /* 上下内边距 */
    position: relative; /* 用于下划线动画定位 */
    transition: color 0.3s ease, text-shadow 0.3s ease; /* 颜色和文字阴影过渡效果 */
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
}

.main-nav a:hover {
    color: #f0f8ff; /* 鼠标悬停时的颜色 */
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
}

/* 导航下划线动画效果 */
.main-nav a::before {
    content: ''; /* 伪元素内容为空 */
    position: absolute; /* 绝对定位 */
    width: 0; /* 初始宽度为0 */
    height: 3px; /* 下划线高度 */
    background-color: #f0f8ff; /* 下划线颜色 */
    bottom: 0px; /* 底部对齐 */
    left: 0; /* 左侧对齐 */
    transition: width 0.3s ease; /* 宽度过渡动画 */
}

.main-nav a:hover::before {
    width: 100%; /* 鼠标悬停时宽度变为100% */
}

/* 主内容区域样式 */
.main-content {
    padding-top: 80px; /* 留出头部的高度 */
    min-height: calc(100vh - 120px); /* 视口高度减去头部和底部的总高度 */
    display: flex; /* 使用Flexbox */
    flex-direction: column; /* 垂直排列 */
    justify-content: center; /* 垂直居中 */
    align-items: center; /* 水平居中 */
    text-align: center; /* 文本居中 */
    position: relative; /* 为背景图片设置定位上下文 */
    overflow: hidden; /* 防止背景图片超出容器 */
}

/* 欢迎框样式 */
.welcome-box {
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
    border: 2px solid #3c3c3c;
    padding: 40px 60px;
    border-radius: 15px; /* 圆角 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 更明显的阴影 */
    backdrop-filter: blur(5px); /* 磨砂效果 */
    -webkit-backdrop-filter: blur(5px); /* 兼容 Safari */
    animation: fadeIn 1s ease-out forwards; /* 添加淡入动画 */
}


.welcome-box h1 {
    font-size: 4em; /* 欢迎语字体大小 */
    color: #2193b0; /* 与头部渐变色搭配的蓝色 */
    margin: 0;
    text-shadow: 8px 8px 4px rgba(0, 0, 0, 0.1); /* 欢迎语文字阴影 */
}

.welcome-box_about {
    background-color: rgba(255, 255, 255, 0.7); /* 半透明白色背景，降低透明度，更磨砂 */
    width: 700px; /* 固定宽度 */
    height: 300px; /* 固定高度 */
    padding: 20px; /* 内部填充，可以根据内容调整 */
    border-radius: 15px; /* 圆角 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 更明显的阴影 */
    backdrop-filter: blur(8px); /* 增强磨砂效果 */
    -webkit-backdrop-filter: blur(8px); /* 兼容 Safari */
    animation: fadeIn 1s ease-out forwards; /* 添加淡入动画 */
    overflow: auto; /* 如果内容超出则显示滚动条 */
    display: flex; /* 使用Flexbox让内部内容可以更灵活布局 */
    flex-direction: column; /* 内部内容垂直排列 */
    align-items: center; /* 内部内容水平居中 */
    justify-content: center; /* 内部内容垂直居中 */
    box-sizing: border-box; /* 边框和内边距包含在宽度和高度内 */
}

.welcome-box_about img {
    max-width: 100%; /* 图片最大宽度为父容器的100% */
    height: auto; /* 高度自适应，保持图片比例 */
    margin-bottom: 10px; /* 图片下方间距 */
    border-radius: 8px; /* 图片圆角 */
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 图片阴影 */
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 背景图片容器 */
.background-image-container {
    position: fixed; /* 固定背景图片，使其不随滚动条滚动 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 将背景图片置于最底层 */
    background-image: url('../assets/background.png'); /* 替换为你的背景图片路径 */
    background-size: cover; /* 背景图片覆盖整个容器 */
    background-position: center; /* 背景图片居中显示 */
    background-repeat: no-repeat; /* 背景图片不重复 */
    filter: brightness(0.9) grayscale(0.2); /* 稍微降低亮度并增加灰度，使内容更突出 */
}

/* 备案号区域样式 */
.footer {
    background-image: linear-gradient(to right, #74ebd5, #63e1eb, #72d4f6, #90c5f3, #acb6e5);   
    padding: 10px 50px; /* 上下左右内边距 */
    text-align: center; /* 文本居中 */
    font-size: 14px; /* 字体大小 */
    color: #ffffff; /* 字体颜色 */
    border-top: 1px solid #e0e0e0; /* 顶部细边框，与背景色协调 */
    margin-top: auto; /* 将页脚推到底部 */
}

.footer p {
    margin: 0; /* 移除段落的默认外边距 */
}

/* 教程块容器样式 */
.tutorials-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}



/* 单个教程块样式 */
.tutorial-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 280px;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.tutorial-card-header {
    padding: 15px;
    background-image: linear-gradient(to right, #bbd2c5, #9bb8b1, #7f9d9e, #67838b, #536976);
    color: white;
    text-align: center;
}

.tutorial-card-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.tutorial-card-body {
    padding: 15px;
    text-align: center;
}

.tutorial-card-body p {
    margin: 0 0 10px 0;
    color: #555;
}

/* 可选的响应式设计（根据需要添加） */
@media (max-width: 768px) {
    .header {
        flex-direction: column; /* 小屏幕下头部内容垂直排列 */
        padding: 15px 20px;
    }

    .logo-container {
        justify-content: center; /* 小屏幕下Logo和标题居中 */
        margin-bottom: 10px; /* 与导航的间距 */
    }

    .main-nav ul {
        flex-direction: column; /* 导航项垂直排列 */
    }

    .main-nav li {
        margin: 10px 0; /* 垂直间距 */
    }

    .main-nav a {
        font-size: 16px;
    }

    .logo-img {
        height: 35px; /* 调整小屏幕下Logo图片的高度 */
    }

    .logo-title {
        font-size: 24px;
    }

    .welcome-box {
        padding: 30px 40px;
    }

    .welcome-box h1 {
        font-size: 3em;
    }

    .footer {
        padding: 15px 20px;
    }
}
