/* 科技风白/浅蓝/淡紫主题 */
:root {
    --primary-light: #F8FBFF;
    --accent-blue: #6C8DFA;
    --accent-purple: #A89EFF;
    --secondary-blue: #A3C3FF;
    --text-dark: #2D3142;
    --border-light: #E0E7FF;
    --hover-bg: #F0F4FF;
    --button-gradient: linear-gradient(135deg, #6C8DFA 0%, #A89EFF 100%);
    --glow-effect: rgba(108, 141, 250, 0.1);
    --header-height: 70px;  /* 根据实际标题高度调整 */
    --footer-height: 80px; /* 根据实际封底高度调整 */
}

.all{
    display: flex;
    gap: 20px; 
}

/* ===== 全局标题系统 ===== */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(145deg, 
        rgba(248, 251, 255, 0.98) 30%,
        rgba(232, 238, 255, 0.95) 100%);
    z-index: 100;
    height: var(--header-height);
    box-shadow: 0 4px 20px rgba(108, 141, 250, 0.1);
}

.main-title {
    font-size: 2.2rem;
    color: var(--text-dark);
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.main-title i {
    margin-right: 1.2rem;
    color: var(--accent-purple);
    filter: drop-shadow(0 2px 4px rgba(168, 158, 255, 0.3));
}

.sub-title {
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin: 0.5rem 0 0 3.4rem;
    font-weight: 400;
}

.title-glow {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 250%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(108, 141, 250, 0.15),
        transparent 60%
    );
    pointer-events: none;
}

/* ===== 封底设计 ===== */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: auto;
    background: linear-gradient(175deg, 
        rgba(248, 251, 255, 0.9) 0%,
        rgba(232, 238, 255, 0.85) 100%);
    padding: 2rem 0 1rem;
    border-top: 1px solid rgba(108, 141, 250, 0.15);
    z-index: 100;
    height: var(--footer-height);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.copyright {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.tech-support {
    display: flex;
    align-items: center;
    color: var(--accent-purple);
    font-size: 0.95rem;
}

.tech-support i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.footer-wave {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 15 q25-15 50 0 t50 0 v5 H0z" fill="%236C8DFA" opacity="0.1"/></svg>');
}

/* 基础样式 */
body {
    background: linear-gradient(45deg, #F0F4FF, #FFFFFF);
    color: var(--text-dark);
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

.main-container {
    position: relative;
    top: 420px; /* 核心修改：向下偏移标题高度的一半 */
    bottom: calc(var(--footer-height) - 20px); /* 新增底部定位锚点 */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    height: 600px;
    background: rgba(248, 251, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 0 30px var(--glow-effect);
    overflow: hidden;
    display:flex;
    z-index: 99; /* 确保在标题下方 */
}

/* 侧边栏系统 */
.sidebar {
    width: 280px;
    background: linear-gradient(160deg, rgba(248, 251, 255, 0.98) 0%, rgba(232, 238, 255, 0.95) 100%);
    backdrop-filter: blur(8px);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(168, 158, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 70px;
    border-right-color: rgba(168, 158, 255, 0.05);
}

/* 动态按钮 */
.toggle-btn {
    position: absolute;
    right: -25px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: var(--button-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 141, 250, 0.3);
}

.toggle-btn:hover {
    filter: hue-rotate(15deg);
    transform: scale(1.05);
}

.sidebar.collapsed .toggle-btn {
    background: var(--accent-purple);
    box-shadow: 0 2px 8px rgba(168, 158, 255, 0.3);
}

/* 侧边栏内容 */
.sidebar-content {
    padding: 20px 30px;
    min-width: 240px;
    opacity: 1;
    transition: opacity 0.2s linear;
    white-space: nowrap;
    color: var(--text-dark);
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
}

.menu-list li:hover {
    background: var(--hover-bg);
    padding-left: 8px;
}

/* 选中分区的样式 */
.menu-list li.active {
    background: var(--hover-bg);
    padding-left: 8px;
}

/* 选中分区的左侧指示条 */
.menu-list li.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-purple);
}

.menu-list li:hover::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-purple);
}

/* 内容区域 */
.content-area {
    flex-grow: 1;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    overflow-y: auto; /* 启用垂直滚动 */
    backdrop-filter: blur(5px);
    max-height: calc(100vh - var(--header-height) - 100px); /* 使用max-height限制最大高度 */
}

/* 链接区块 */
.link-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 强制两列 */
    gap: 25px;
    width: 1000px;
    padding: 20px;
}

.guide-links {
    display: flex;
    gap: 15px;
    width: auto;  /* 改为自动宽度 */
}

/* 新增链接样式 */
.guide-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;  /* 关键定位 */
}

/* 扩展点击区域覆盖整个元素 */
.guide-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* 确保图标与文字间距 */
.guide-link i {
    margin-right: 8px;
}

/* 悬停效果 */
.guide-link:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 默认隐藏所有内容组 */
.content-group {
    display: none;
}

/* 确保内容组显示 */
.content-group.active {
    display: grid !important; /* 覆盖隐藏状态 */
}

/* 系统设置特殊处理 */
#system-settings-content {
    padding: 30px;
    text-align: center;
    color: var(--text-dark);
}

/* 自定义滚动条 */
.content-area::-webkit-scrollbar {
    width: 8px;
    background: rgba(168, 158, 255, 0.1);
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

.link-box {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 158, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-direction: column; /* 改为纵向排列 */
    gap: 15px; /* 图标与标题间距 */
    align-items: flex-start; /* 左对齐 */
}

/* 新增标题行容器 */
.link-box-header {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%; /* 重要：强制占据整行 */
    margin-bottom: 15px; /* 与下方元素间距 */
}

/* 标题点击样式 */
.link-box h3 {
    display: block;
    width: 100%;
    flex-grow: 1; /* 标题区域自动扩展 */
    margin: 0; /* 清除默认边距 */
    padding: 10px 20px;  /* 增加左右内边距，扩大点击区域 */
    cursor: pointer;
    color: var(--accent-blue);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    position: relative;  /* 为伪元素定位提供上下文 */
}

/* 创建伪元素覆盖整个文字区域 */
.link-box h3::before {
    content: "";
    position: absolute;
    top: 0;
    left: -15px;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: transparent;
    transition: background 0.3s ease;
    width: calc(100% + 15px); /* 覆盖图标与标题间距 */
}

/* 悬停效果 */
.link-box h3:hover {
    transform: translateX(8px);
    text-shadow: 0 2px 8px rgba(108, 141, 250, 0.3);
}

/* 悬停时伪元素背景渐变 */
.link-box h3:hover::before {
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(168, 158, 255, 0.1) 100%
    );
}

/* 点击效果 */
.link-box h3:active {
    transform: translateX(4px);
}

.link-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 25px rgba(108, 141, 250, 0.15);
}

.link-box::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(108, 141, 250, 0.1),
        rgba(168, 158, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.link-box:hover::before {
    animation: gradientFlow 3s linear infinite;
}

/* 图标系统 */
.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(168, 158, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid rgba(108, 141, 250, 0.1);
    margin-bottom: 0; /* 移除原下边距 */
    flex-shrink: 0; /* 禁止图标压缩 */
}

.link-box:first-child .icon-wrapper {
    background: 
        linear-gradient(45deg, rgba(108, 141, 250, 0.1), rgba(168, 158, 255, 0.2)),
        url('/static/bk1.png') center/cover;
    border-radius: 12px;
    overflow: hidden;
}

.link-box:first-child .icon-wrapper i {
    display: none;
}

/* === 统一链接点击区域优化 === */

/* 确保链接组独立成行 */
.link-group {
    width: 100%;
}

/* 应用到所有直接子元素 */
.link-group > * {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px 0;
    overflow: hidden;
}

/* 创建全尺寸点击层 */
.link-group > *::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    z-index: 0;
    background: rgba(108, 141, 250, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 图标与文字对齐 */
.link-group > * i {
    margin-right: 12px;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
}

/* 悬停效果 */
.link-group > *:hover {
    transform: translateX(8px);
    background: linear-gradient(
        to right,
        rgba(232, 238, 255, 0.3),
        rgba(248, 251, 255, 0.2)
    );
}

.link-group > *:hover::before {
    opacity: 1;
}

/* 点击反馈 */
.link-group > *:active {
    transform: translateX(4px);
    transition-duration: 0.1s;
}

@media (max-width: 768px) {
    .link-box {
        gap: 10px; /* 缩小间距 */
        flex-wrap: wrap; /* 超长标题换行 */
    }
    
    .icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .link-box h3 {
        padding: 8px 15px;
    }
    
    /* 移动端悬停效果优化 */
    .link-box h3:hover {
        transform: translateX(5px); /* 缩小移动幅度 */
    }
}

/* 动画 */
@keyframes gradientFlow {
    0% { transform: rotate(45deg) translateX(-50%); }
    100% { transform: rotate(45deg) translateX(50%); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .global-header {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .sub-title {
        font-size: 1rem;
        margin-left: 2.5rem;
    }
    .page-footer {
        padding: 1.5rem 0;
    }
    
    .main-container {
        padding-bottom: 45px;
    }
}