
/* 全局样式重置，确保不同浏览器的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 定义色彩变量，遵循黄金比例配色 */
:root {
    --main-color: #1a237e; /* 深蓝色，主色调 */
    --secondary-color: #ff9800; /* 橙色，辅助色 */
    --accent-color: #4caf50; /* 绿色，点缀色 */
    --background-color: #f0f2f5; /* 背景色，避免使用白色 */
    --text-color: #333333; /* 主要文字颜色 */
    --header-height: 60px; /* 导航栏高度 */
}

/* body整体样式 */
body {
    font-family: 'Roboto', sans-serif; /* 现代感强的无衬线字体 */
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    padding-top: var(--header-height);
}

/* 顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(26, 35, 126, 0.9); /* 主色调带透明度 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .logo {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: var(--secondary-color);
}

/* 侧边快捷导航栏样式 */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 50px;
    height: 100%;
    background: rgba(51, 51, 51, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

.sidebar a {
    color: #bbb;
    margin: 20px 0;
    transition: color 0.3s;
    text-decoration: none;
}

.sidebar a:hover {
    color: var(--secondary-color);
}

/* 主要内容区域样式 */
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 英雄区样式 */
.hero-section {
    background: linear-gradient(135deg, var(--main-color), #512da8);
    color: #ffffff;
    padding: 100px 20px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
}

/* 卡片式模块样式 */
.card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 64px 0 rgba(31, 38, 135, 0.5);
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3, article h4 {
    color: var(--main-color);
    margin-bottom: 15px;
}

article h2 {
    font-size: 2em;
}

article h3 {
    font-size: 1.5em;
}

article pre {
    background: #2e3440;
    color: #d8dee9;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.9em;
}

article code {
    font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 5px;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.button:hover {
    background-color: #fb8c00;
    transform: translateY(-2px);
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 渐变线条分隔 */
.divider {
    height: 2px;
    background: linear-gradient(to right, var(--main-color), var(--secondary-color));
    margin: 40px 0;
    border: none;
}

/* 导航系统样式 */
.nav-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-sections a {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-sections a:hover {
    background: #fb8c00;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 代码示例区块样式 */
.code-sample {
    background: #2e3440;
    color: #d8dee9;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* 提示信息样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; 
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 强调文本样式 */
.highlight {
    color: var(--secondary-color);
    font-weight: bold;
}

/* 底部教育专区样式 */
.education-section {
    background: linear-gradient(180deg, #512da8, var(--main-color));
    padding: 50px 20px;
    color: #fff;
    border-radius: 10px;
    position: relative;
}

.education-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    transition: transform 0.3s;
}

.education-card:hover {
    transform: scale(1.05);
}

/* 安全交易模块样式 */
.security-section {
    background: var(--main-color);
    color: #fff;
    padding: 40px 20px;
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.security-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    opacity: 0.3;
    border-radius: 10px;
}

.security-section .content {
    position: relative;
    z-index: 1;
}

.security-section .highlight {
    color: var(--secondary-color);
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    background: rgba(26, 35, 126, 0.9);
    color: #fff;
    border-radius: 10px;
    margin-top: 40px;
}

/* 提示信息位置样式 */
.prominent-note {
    background: var(--secondary-color);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* 多语言选择器样式 */
.language-selector {
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
}

.language-selector select {
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    background-color: var(--secondary-color);
    color: #fff;
    transition: background-color 0.3s;
    cursor: pointer;
}

.language-selector select:hover {
    background-color: #fb8c00;
}

