
/* 全局样式设置 */
/* 设置网页的基本字体、背景、颜色以及响应式布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    font-size: 16px; /* 正文字号 */
    line-height: 1.6;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 动态渐变背景 */
    color: #ffffff; /* 文字颜色 */
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff9800; /* 点缀色 */
}

/* 主内容区域 */
.main-content {
    padding: 100px 50px 50px 50px; /* 顶部留出导航栏空间 */
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
}

/* 侧边导航栏 */
.sidebar {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.sidebar a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 10px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #ff9800;
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8.5px);
    -webkit-backdrop-filter: blur(8.5px);
}

article h2, article h3 {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

article h2::after, article h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ff9800; /* 点缀色 */
    margin: 10px auto 0;
    border-radius: 2px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article p {
    font-size: 16px;
    color: #f0f0f0;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 代码块样式 */
article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #ff9800;
    font-size: 14px;
}

/* 图片样式 */
.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.article-images img {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
.button-highlight {
    background-color: #ff5722; /* 点缀色 */
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button-highlight:hover {
    background-color: #e64a19;
    transform: scale(1.1);
}

/* 折叠菜单样式 */
.details-toggle summary {
    cursor: pointer;
    font-weight: bold;
    color: #ff9800;
    margin-bottom: 10px;
}

.details-toggle summary:hover {
    color: #ffffff;
}

.details-toggle [open] summary::after {
    content: "▲";
    float: right;
}

.details-toggle summary::after {
    content: "▼";
    float: right;
}

.details-toggle ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px;
    }
    .navbar a {
        margin: 0 10px;
        font-size: 14px;
    }
    .main-content {
        padding: 100px 20px 20px 20px;
    }
    article {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    article h2, article h3 {
        font-size: 18px;
    }
    .button-highlight {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}

/* 提示信息样式 */
.reference-note {
    text-align: center;
    font-size: 18px;
    color: #ff9800; /* 点缀色 */
    margin: 20px 0;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

/* 导航跳转按钮样式 */
.nav-button {
    background-color: transparent;
    border: none;
    color: #ff9800;
    cursor: pointer;
    font-size: 16px;
    margin: 5px 0;
    text-align: left;
    padding: 5px;
    transition: color 0.3s ease;
}

.nav-button:hover {
    color: #ffffff;
}

/* 全局交互动效 */
button, .module, .card {
    transition: all 0.3s ease;
}

button:hover, .module:hover, .card:hover {
    transform: scale(1.05);
}

/* 点缀线条 */
.decorative-line {
    width: 100px;
    height: 3px;
    background: #ff9800;
    margin: 10px auto;
    border-radius: 2px;
}

/* 视觉层次 */
.section-block {
    margin-bottom: 40px;
}

/* 图标按钮样式 */
.fingerprint-button, .voice-control {
    background-size: 40px 40px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fingerprint-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.7);
}

.voice-control:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
}

/* 代码示例块特定样式 */
.code-sample {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-sample code {
    color: #ff9800;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 点缀性装饰元素 */
.decorative-element {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #ff9800;
    border-radius: 50%;
    top: 20px;
    right: 20px;
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

