/* 法律页面样式 - 左侧目录 + 右侧内容布局 */

.legal-container {
    display: flex;
    min-height: calc(100vh - 72px);
    background: white;
    padding-top: 72px;
}

/* 左侧目录导航 */
.legal-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    left: 0;
    top: 72px;
    bottom: 0;
    overflow-y: auto;
    padding: 2rem 0;
    z-index: 100;
}

.legal-sidebar::-webkit-scrollbar {
    width: 6px;
}

.legal-sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.legal-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.legal-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: #f9fafb;
    color: #10b981;
    border-left-color: #10b981;
}

.sidebar-nav a.active {
    background: #f0fdf4;
    color: #10b981;
    font-weight: 600;
    border-left-color: #10b981;
}

/* 右侧内容区域 */
.legal-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    max-width: 900px;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-header .update-date {
    color: #6b7280;
    font-size: 0.9375rem;
}

.legal-intro {
    background: #f9fafb;
    padding: 1.5rem;
    border-left: 4px solid #10b981;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #4b5563;
}

.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
}

.legal-section h3 {
    font-size: 1.25rem;
    color: #374151;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.legal-section p {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-section li {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.legal-section strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-section a {
    color: #10b981;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-contact {
    background: #f0fdf4;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
    border: 1px solid #d1fae5;
}

.legal-contact h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.legal-contact p {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.back-to-top.show {
    display: flex;
}

/* 移动端菜单按钮 */
.mobile-sidebar-btn {
    display: none;
    position: fixed;
    left: 1rem;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 1001;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .legal-sidebar {
        width: 240px;
    }
    
    .legal-content {
        margin-left: 240px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .legal-container {
        padding-top: 70px;
    }
    
    .legal-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 280px;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        top: 70px;
    }
    
    .legal-sidebar.active {
        transform: translateX(0);
    }
    
    .legal-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
    }
    
    .legal-section h3 {
        font-size: 1.125rem;
    }
    
    .mobile-sidebar-btn {
        display: flex;
    }
    
    .back-to-top {
        right: 1rem;
        bottom: 5rem;
    }
}

/* 侧边栏遮罩层（移动端） */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

@media (min-width: 769px) {
    .sidebar-overlay {
        display: none !important;
    }
}
