
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 统一盒模型 */
}

body {
    font-family: 'Roboto', sans-serif; /* 设置全局字体 */
    background-color: #F5F5F5; /* 页面背景颜色 */
    color: #12263A; /* 文字主色调 */
    line-height: 1.6;
    overflow-x: hidden; /* 防止左右滚动条出现 */
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background-color: #12263A; /* 导航栏背景 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar a {
    color: #fff; /* 链接文字颜色 */
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease; /* 过渡效果 */
}

.navbar a:hover {
    color: #FFC107; /* 悬停时颜色变化 */
}

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px; /* 顶部留白为导航栏高度 */
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 内容区域阴影 */
}

/* 文章样式 */
article h2 {
    font-size: 24px;
    color: #12263A;
    margin-bottom: 20px;
    position: relative;
}

article h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #FFC107;
    margin-top: 10px;
    border-radius: 2px;
}

article h3 {
    font-size: 20px;
    color: #3E8E41;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    font-size: 16px;
    color: #12263A;
    margin-bottom: 15px;
}

article strong {
    color: #3E8E41; /* 加粗文字颜色 */
}

article code {
    background-color: #F5F5F5;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #C7254E;
}

article pre {
    background-color: #272822;
    color: #F8F8F2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
article img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

/* 按钮样式 */
.button {
    background-color: #FFC107; /* 按钮背景色 */
    color: #fff; /* 按钮文字颜色 */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #FFA000; /* 悬停时颜色变化 */
    transform: translateY(-2px); /* 微动效 */
}

.button:active {
    transform: translateY(0); /* 按下时恢复 */
}

/* 卡片布局 */
.card {
    background-color: #F5F5F5;
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px); /* 悬停时上升 */
}

/* 响应式网格 */
.content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 40px);
    }
}

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

/* 实时数据可视化图表 */
.chart {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
}

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

.chart:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* 交易模拟器按钮 */
.trading-simulator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFC107;
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.trading-simulator:hover {
    background-color: #FFA000;
    transform: translateY(-3px);
}

.trading-simulator:active {
    transform: translateY(0);
}

/* 加载动画 */
.loader {
    border: 6px solid #f3f3f3; /* 边框颜色 */
    border-top: 6px solid #12263A; /* 顶部边框颜色 */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页面过渡效果 */
.page-transition {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.page-transition.loaded {
    opacity: 1;
}

/* 字体与图标统一 */
h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

p, span {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

.icon {
    width: 24px;
    height: 24px;
    fill: #FFC107;
    transition: fill 0.3s ease;
}

.icon:hover {
    fill: #FFA000;
}

/* 视觉提示 */
.notice {
    text-align: center;
    padding: 20px;
    background-color: #3E8E41;
    color: #fff;
    font-size: 18px;
    border-radius: 5px;
    margin-bottom: 30px;
}

/* 信息层次 */
.section-title {
    font-size: 18px;
    color: #3E8E41;
    margin-top: 30px;
    margin-bottom: 10px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #12263A;
    color: #fff;
}

/* 链接样式 */
a {
    color: #3E8E41;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFC107;
}

/* Footer样式 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #12263A;
    color: #fff;
    border-radius: 0 0 10px 10px;
    margin-top: 50px;
}

/* 背景渐变 */
.gradient-background {
    background: linear-gradient(135deg, #12263A, #3E8E41);
    color: #fff;
    padding: 50px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
}

