
/* 
    整体页面样式定义
    使用现代CSS3技术，实现响应式布局与未来感设计
*/

/* 定义根变量，方便主题色彩管理 */
:root {
    --primary-color: #1E3A8A; /* 主色调 - 深蓝色 */
    --secondary-color: #6B7280; /* 辅色调 - 灰色 */
    --accent-orange: #F97316; /* 点缀色 - 亮橙色 */
    --accent-green: #10B981; /* 点缀色 - 绿色 */
    --background-gradient: linear-gradient(135deg, #1E3A8A, #3B82F6); /* 背景渐变 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--background-gradient);
    color: var(--secondary-color);
    line-height: 1.6;
    transition: background 0.5s ease;
}

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

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-item a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
}

.nav-item:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--secondary-color);
    padding: 10px;
    border-radius: 4px;
}

.submenu a {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-color);
    margin: 80px 30px 20px 30px; /* 顶部留白避免导航栏覆盖 */
}

.breadcrumb a {
    color: var(--accent-orange);
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb span {
    margin-right: 5px;
}

/* 主要内容容器 */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 30px;
}

/* 模块样式 */
.module {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 40px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

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

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Helvetica', sans-serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 文字段落样式 */
p {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

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

.button:hover {
    background-color: var(--accent-green);
    transform: scale(1.05);
}

/* 图片样式 */
img.decorative {
    max-width: 800px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

img.decorative:hover {
    transform: scale(1.02);
}

/* 代码块样式 */
pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 关键帧动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* 焦点引导样式 */
.focus-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 折叠区域样式 */
.collapsible {
    background-color: #e2e8f0;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.active, .collapsible:hover {
    background-color: var(--accent-green);
    color: #ffffff;
}

.content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}

