
/* 通用样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0d47a1, #424242);
    color: #ffffff;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.9);
}

.navbar .logo {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: bold;
}

.menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu-item {
    position: relative;
}

.menu-item a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    transition: color 0.3s ease;
}

.menu-item a:hover {
    color: #ff9800;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.menu-item:hover .submenu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.submenu a {
    display: block;
    padding: 5px 0;
    color: #ffffff;
    font-size: 14px;
}

.submenu a:hover {
    color: #4caf50;
}

/* 渐变和背景效果 */
.background {
    background: linear-gradient(135deg, #0d47a1, #424242);
    color: #ffffff;
    padding-top: 80px; /* 避免与固定导航栏重叠 */
}

/* 留白与布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 章节导航 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 8px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-nav li {
    margin-bottom: 10px;
}

.chapter-nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #ff9800;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

article h2, article h3 {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

article h2 {
    font-size: 24px;
    margin-top: 20px;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 10px;
}

article h3 {
    font-size: 20px;
    margin-top: 15px;
    border-bottom: 1px solid #4caf50;
    padding-bottom: 5px;
}

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

article pre {
    background: #333333;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

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

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

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

/* 按钮样式 */
.button {
    background-color: #ff9800;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: #fb8c00;
    transform: scale(1.05);
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* 磨砂玻璃效果 */
.frosted-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 10px;
    padding: 20px;
}

/* 视差效果 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.5s ease;
}

.parallax:hover {
    transform: scale(1.05);
}

/* 动画与过渡 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 字体样式 */
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

p {
    font-size: 16px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chapter-nav {
        display: none;
    }

    .menu {
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 60px;
        right: 20px;
        padding: 20px;
        border-radius: 8px;
        display: none;
    }

    .menu.active {
        display: flex;
    }

    .menu-item {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }

    article {
        padding: 20px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    p {
        font-size: 15px;
    }
}

/* 代码块样式 */
.code-sample {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

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

/* 点缀与装饰 */
.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, #ff9800, #4caf50);
    margin: 30px 0;
    border: none;
}

.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #ff9800;
}

.footer a {
    color: #ff9800;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* 虚拟助手按钮 */
.virtual-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #ff9800;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.virtual-assistant:hover {
    transform: scale(1.1);
}

/* 用户内容模块 */
.user-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.user-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* 按钮悬停效果 */
.button:hover {
    background-color: #fb8c00;
    transform: scale(1.05);
}

/* 虚拟助手悬浮效果 */
.virtual-assistant:hover {
    transform: scale(1.1);
}

