
    /* 根变量定义 */
    :root {
        --primary-color: #0d47a1; /* 深蓝色 */
        --secondary-color: #000000; /* 黑色 */
        --accent-color1: #7e57c2; /* 青紫色 */
        --accent-color2: #00e5ff; /* 蓝绿色 */
        --text-color: #ffffff; /* 白色 */
        --gradient-bg: linear-gradient(135deg, #0d47a1, #7e57c2, #00e5ff);
        --font-family: 'Montserrat', sans-serif;
        --header-shadow: 2px 2px 10px rgba(126, 87, 194, 0.5);
        --button-gradient: linear-gradient(to right, #ff9800, #f44336);
        --navbar-gradient: linear-gradient(to right, #4CAF50, #00bcd4);
    }

    /* 全局样式 */
    body {
        margin: 0;
        padding: 0;
        background: var(--gradient-bg);
        font-family: var(--font-family);
        color: var(--text-color);
        line-height: 1.6;
    }

    /* 导航栏样式 */
    .navbar {
        position: fixed;
        top: 0;
        width: 100%;
        background: var(--navbar-gradient);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: top 0.3s;
    }

    .navbar.hidden {
        top: -60px;
    }

    .navbar ul {
        list-style: none;
        display: flex;
        justify-content: center;
        padding: 20px;
        margin: 0;
    }

    .navbar ul li {
        margin: 0 15px;
    }

    .navbar ul li a {
        color: var(--text-color);
        text-decoration: none;
        font-size: 18px;
        transition: color 0.3s;
    }

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

    /* 主要内容样式 */
    .container {
        max-width: 1200px;
        margin: 100px auto 50px;
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .main-content {
        flex: 1 1 60%;
        padding: 20px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .sidebar {
        flex: 1 1 35%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    /* 文章样式 */
    article {
        max-width: 100%;
    }

    article h2, article h3 {
        color: var(--accent-color1);
        text-shadow: var(--header-shadow);
        margin-top: 20px;
    }

    article p {
        margin: 15px 0;
        font-size: 16px;
    }

    article pre {
        background: #1e1e1e;
        padding: 15px;
        border-radius: 5px;
        overflow-x: auto;
    }

    article code {
        color: #00e5ff;
        font-family: 'Courier New', Courier, monospace;
    }

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

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

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

    th {
        background: #0d47a1;
    }

    /* 列表样式 */
    ul {
        list-style: disc inside;
        margin: 15px 0;
    }

    ul li {
        margin: 10px 0;
    }

    /* 按钮样式 */
    .button {
        background: var(--button-gradient);
        border: none;
        border-radius: 25px;
        padding: 10px 20px;
        color: var(--text-color);
        cursor: pointer;
        transition: transform 0.3s ease-in-out, background 0.3s;
        font-size: 16px;
    }

    .button:hover {
        transform: scale(1.1);
        background: #e53935;
    }

    /* 图片样式 */
    .images {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 20px 0;
    }

    .images img {
        width: 100%;
        max-width: 320px;
        height: auto;
        border-radius: 10px;
    }

    /* 代码块样式 */
    .code-block {
        background: #1e1e1e;
        padding: 15px;
        border-radius: 5px;
        overflow-x: auto;
        margin: 20px 0;
    }

    .code-block code {
        color: #00e5ff;
        font-family: 'Courier New', Courier, monospace;
    }

    /* 动画效果 */
    @keyframes typing {
        from { width: 0; }
        to { width: 100%; }
    }

    @keyframes blink-caret {
        from, to { border-color: transparent; }
        50% { border-color: orange; }
    }

    .typing-effect {
        overflow: hidden;
        white-space: nowrap;
        border-right: .15em solid orange;
        animation: typing 2s steps(30, end), blink-caret .75s step-end infinite;
    }

    .loader {
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 1s linear infinite;
    }

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

    /* 响应式设计 */
    @media (max-width: 1440px) {
        .container {
            max-width: 1100px;
        }
    }

    @media (max-width: 1200px) {
        .container {
            max-width: 900px;
        }
    }

    @media (max-width: 1024px) {
        .container {
            flex-direction: column;
            align-items: center;
        }

        .main-content, .sidebar {
            flex: 1 1 100%;
            max-width: 100%;
        }
    }

    @media (max-width: 768px) {
        article h2 {
            font-size: 24px;
        }

        article h3 {
            font-size: 20px;
        }

        article p, table, ul, .button {
            font-size: 14px;
        }

        .images img {
            max-width: 100%;
        }
    }

    @media (max-width: 480px) {
        .navbar ul {
            flex-direction: column;
        }

        .navbar ul li {
            margin: 10px 0;
        }

        .button {
            width: 100%;
            text-align: center;
        }
    }

    @media (max-width: 320px) {
        .navbar ul li a {
            font-size: 16px;
        }

        article p, table, ul, .button {
            font-size: 12px;
        }
    }

