/* 法律协议页面专用样式 */

/* 页面整体样式 */
.legal-page {
    background-color: #f8fafc;
}

.legal-page .navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.legal-page .nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* 页面头部 */
.legal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.legal-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
}

.effective-date {
    font-size: 16px;
    opacity: 0.9;
}

/* 内容区域 */
.legal-content {
    padding: 60px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* 侧边栏导航 */
.sidebar {
    position: sticky;
    top: 100px;
}

.toc {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.toc h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    display: block;
    padding: 8px 12px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toc a:hover {
    background: #f7fafc;
    color: #667eea;
}

.toc a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}

/* 主要内容 */
.main-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-content section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.main-content section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.main-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
}

.main-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 24px 0 12px;
}

.main-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 16px;
}

.main-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.main-content li {
    font-size: 15px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 8px;
}

.main-content strong {
    color: #2d3748;
    font-weight: 600;
}

/* 联系信息 */
.contact-info {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.contact-info p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info i {
    color: #667eea;
    width: 20px;
}

/* 页脚简化版 */
.legal-page .footer {
    background: #1a202c;
    padding: 30px 0;
}

.legal-page .footer-bottom {
    border-top: none;
    padding-top: 0;
}

.legal-page .footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-page .footer-bottom a:hover {
    color: white;
}

/* 打印样式 */
@media print {
    .navbar,
    .sidebar,
    .footer {
        display: none;
    }
    
    .legal-header {
        background: white;
        color: #1a202c;
        padding: 40px 0;
        margin-top: 0;
    }
    
    .main-content {
        box-shadow: none;
        padding: 0;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .toc {
        padding: 16px;
    }
    
    .toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toc li {
        margin-bottom: 0;
    }
    
    .toc a {
        padding: 6px 12px;
        background: #f7fafc;
        border-radius: 20px;
        font-size: 13px;
    }
    
    .main-content {
        order: 1;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .legal-header {
        padding: 100px 0 40px;
    }
    
    .legal-header h1 {
        font-size: 28px;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .main-content h2 {
        font-size: 20px;
    }
    
    .main-content h3 {
        font-size: 16px;
    }
    
    .main-content p,
    .main-content li {
        font-size: 14px;
    }
}

/* 滚动到锚点时调整偏移 */
.main-content section[id] {
    scroll-margin-top: 100px;
}

/* 高亮当前阅读的部分 */
.main-content section:target {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% {
        background: rgba(102, 126, 234, 0.1);
    }
    100% {
        background: transparent;
    }
}
