
/* 
整体页面样式设计
采用深色系为主色调，结合霓虹蓝和紫色点缀，营造数字星河和磨砂玻璃质感的高科技视觉效果。
确保页面在不同设备上响应式布局，无论在320px还是1920px宽度下都能良好显示。
通过Flexbox和Grid布局实现多样化的排版，增加页面层次感和视觉趣味性。
*/

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #00c6ff;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 60px;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid #00c6ff;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.75em;
    margin-top: 40px;
}

h4 {
    font-size: 1.5em;
    margin-top: 30px;
}

/* 段落样式 */
p {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 30px;
}

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

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

th, td {
    border: 1px solid #00c6ff;
    padding: 10px;
    text-align: center;
}

th {
    background: rgba(0, 198, 255, 0.2);
}

.increase {
    color: #00ff00;
}

.decrease {
    color: #ff0000;
}

/* 加载动画样式 */
.loader {
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-top: 8px solid #00c6ff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.navbar a:hover {
    color: #00c6ff;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    width: 250px;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    transition: left 0.3s ease;
    padding: 20px;
}

.sidebar.active {
    left: 0;
}

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

.sidebar a:hover {
    color: #00c6ff;
}

/* 卡片式布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 20px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    width: 300px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.5);
}

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

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .card-container {
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .interactive-button {
        width: 100%;
        padding: 15px;
    }
}

/* 导航系统样式 */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-size: 16px;
    font-weight: bold;
}

.sidebar-toggle {
    cursor: pointer;
    font-size: 24px;
    color: #00c6ff;
    transition: color 0.3s ease;
}

.sidebar-toggle:hover {
    color: #ffffff;
}

/* 章节导航样式 */
.chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.chapter-nav a {
    background: rgba(0, 198, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: #00c6ff;
    transition: background 0.3s ease, color 0.3s ease;
}

.chapter-nav a:hover {
    background: #00c6ff;
    color: #ffffff;
}

/* 动态星空背景 */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

/* 按钮样式 */
.interactive-button {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
}

.interactive-button:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #0072ff, #00c6ff);
}

/* 图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    transition: fill 0.3s ease;
}

.icon:hover {
    fill: #00c6ff;
}

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

.dashboard-module {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-module:hover {
    transform: translateY(-5px);
}

/* 黄金比例配色 */
.primary-color {
    color: #00c6ff; /* 70% 主色 */
}

.secondary-color {
    color: #0072ff; /* 25% 辅色 */
}

.accent-color {
    color: #ff4081; /* 5% 点缀色 */
}


