
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #f5f5f5); /* 渐变背景色 */
    color: #333;
}

/* 顶部导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

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

/* 侧边导航栏样式 */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 220px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

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

.sidebar a:hover {
    color: #4caf50; /* 悬停颜色变化 */
}

/* 主内容区域样式 */
.main-content {
    margin-left: 250px; /* 侧边栏宽度 */
    padding: 100px 30px 30px 30px; /* 内边距，上方留空 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 玻璃拟态卡片样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 25px;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: scale(1.05); /* 悬停放大效果 */
}

/* 按钮样式 */
.button {
    background: #ff9800;
    border: none;
    padding: 12px 25px;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background: #e68900;
    transform: scale(1.05); /* 悬停放大效果 */
}

/* 代码块样式 */
pre code {
    display: block;
    padding: 15px;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 5px;
    overflow: auto;
    position: relative;
}

pre code::before {
    content: "代码示例";
    position: absolute;
    top: -25px;
    left: 10px;
    background: #444;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

/* 文章标题样式 */
.article-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

/* 文章副标题样式 */
.article-subtitle {
    font-size: 1.5em;
    margin: 15px 0;
    color: #555;
}

/* 文章段落样式 */
.article-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
}

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

.article-content img:hover {
    transform: scale(1.05); /* 悬停放大效果 */
}

/* 关键帧动画 - 粒子移动 */
@keyframes moveParticles {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(50px, 50px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* 动态粒子样式 */
.particle {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    position: absolute;
    animation: moveParticles 10s infinite;
}

/* 仪表盘布局 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* 仪表盘模块样式 */
.dashboard-module {
    background: var(--background-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

/* 主题切换变量 */
:root {
    --primary-color: #ff9800;
    --secondary-color: #4caf50;
    --background-color: rgba(255, 255, 255, 0.2);
}

/* 深色主题 */
.theme-dark {
    --primary-color: #ff9800;
    --secondary-color: #4caf50;
    --background-color: rgba(0, 0, 0, 0.5);
}

/* 浅色主题 */
.theme-light {
    --primary-color: #ff9800;
    --secondary-color: #4caf50;
    --background-color: rgba(255, 255, 255, 0.2);
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        margin-left: 200px;
        padding: 90px 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 80px 15px 15px 15px;
    }
}

