/* conda_style.css */

/* 全局样式 - 覆盖或增强公共样式 */
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: static; /* 固定在视口顶部 */
    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: 70px; /* 留出头部的高度 */
    display: block; /* 移除flex布局，使其自然文档流 */
    max-width: 1200px; /* 设置最大宽度 */
    margin: 20px auto; /* 居中显示，但内容靠左 */
    padding: 0 20px; /* 左右内边距 */
    text-align: left; /* 文本靠左 */
}

/* 教程内容容器 */
.tutorial-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.8;
}

.tutorial-content h1 {
    color: #21b06a;
    font-size: 2.5em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.tutorial-content h2 {
    color: #4CAF50;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.8em;
}

.tutorial-content h3 {
    color: #333;
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 15px;
}

.tutorial-content p {
    margin-bottom: 15px;
}

/* 命令部分 */
.commands-section {
    margin-bottom: 30px;
}

.command-item {
    margin-bottom: 30px;
}

.command-title {
    font-size: 1.4em;
    color: #21b06a;
    margin-bottom: 15px;
    font-weight: bold;
}

/* 代码块样式 */
.code-container {
    position: relative;
    background-color: #2d3748; /* 深色背景 */
    color: #e2e8f0; /* 浅色文字 */
    padding: 20px;
    border-radius: 8px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: auto;
    border-left: 4px solid #4CAF50; /* 绿色边框 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    margin-bottom: 20px;
}

.code-container .code-block {
    margin: 0;
    padding-right: 40px; /* 为复制按钮留出空间 */
}

/* 注释颜色 */
.code-container .comment {
    color: #a0aec0;
}

/* 复制按钮 */
.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.copy-button:hover {
    background-color: #45a049;
}

.copy-button:active {
    background-color: #3e8e41;
}

/* 返回按钮 */
.back-button {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background: linear-gradient(to right, #6deda1, #21b06a);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


/* 背景图片容器 */
.background-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../assets/background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* 降低透明度，作为更柔和的背景 */
    z-index: -1;
}

/* 页脚样式 - 继承或调整公共样式 */
.footer {
    background-image: linear-gradient(to right, #A8E063, #56AB2F); /* 绿色渐变 */
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px; /* 增加页脚上方间距 */
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 10px 15px;
    }

    .logo-container {
        justify-content: center;
        margin-bottom: 10px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav li {
        margin: 8px 0;
    }

    .main-content {
        padding: 0 15px;
    }

    .tutorial-content {
        padding: 20px;
    }

    .tutorial-content h1 {
        font-size: 2em;
    }

    .tutorial-content h2 {
        font-size: 1.5em;
    }

    .command-title {
        font-size: 1.2em;
    }

    .code-container {
        padding: 15px;
        font-size: 14px;
    }

    .copy-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}
