/* 泽信网盘帮助文档系统样式 */

:root {
    --bg-body: #f5f7fa;
    --bg-sidebar: #ffffff;
    --bg-content: #ffffff;
    --bg-header: #ffffff;
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --sidebar-width: 280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-body);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 顶部导航 */
.doc-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 100;
}

.doc-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.doc-brand img {
    height: 28px;
    width: auto;
}

.doc-back {
    color: var(--text-secondary);
    font-size: 13px;
}

.doc-back:hover {
    color: var(--primary);
}

.doc-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

/* 主体布局 */
.doc-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 56px;
    min-height: 100vh;
}

/* 侧边栏 */
.doc-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 20px 0;
    z-index: 90;
}

.doc-nav {
    padding: 0 16px;
}

.doc-nav-group {
    margin-bottom: 20px;
}

.doc-nav-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.doc-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-nav-list li {
    margin-bottom: 2px;
}

.doc-nav-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}

.doc-nav-list a:hover {
    background-color: var(--bg-body);
    color: var(--primary);
    text-decoration: none;
}

.doc-nav-list a.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.doc-nav-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.doc-nav-list a:hover .doc-nav-arrow,
.doc-nav-list a.active .doc-nav-arrow {
    opacity: 1;
}

.doc-subnav {
    list-style: none;
    margin: 4px 0 0 0;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--border-color);
    margin-left: 12px;
    display: none;
}

.doc-subnav.open {
    display: block;
}

.doc-subnav a {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.doc-subnav a.active {
    background-color: transparent;
    color: var(--primary);
    font-weight: 500;
}

/* 内容区 */
.doc-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    max-width: calc(100% - var(--sidebar-width));
}

.doc-content-inner {
    background-color: var(--bg-content);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 40px;
    min-height: calc(100vh - 120px);
}

.doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.doc-breadcrumb a {
    color: var(--text-secondary);
}

.doc-breadcrumb a:hover {
    color: var(--primary);
}

.doc-breadcrumb-sep {
    color: var(--text-muted);
}

.doc-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.doc-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.doc-content h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 28px 0 12px 0;
    color: var(--text-main);
}

.doc-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.doc-content p {
    margin: 0 0 14px 0;
    color: var(--text-secondary);
}

.doc-content ul,
.doc-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.doc-content li {
    margin-bottom: 8px;
}

.doc-content strong {
    color: var(--text-main);
    font-weight: 600;
}

.doc-content code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    color: var(--danger);
}

.doc-content pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 0 0 16px 0;
}

.doc-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
}

.doc-content blockquote {
    border-left: 4px solid var(--primary);
    background-color: var(--primary-light);
    margin: 0 0 16px 0;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
}

.doc-content blockquote p {
    margin: 0;
    color: var(--text-main);
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
    font-size: 13px;
}

.doc-content th,
.doc-content td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.doc-content th {
    background-color: var(--bg-body);
    font-weight: 600;
    color: var(--text-main);
}

.doc-content tr:nth-child(even) {
    background-color: #fafafa;
}

.doc-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 32px 0;
}

/* 提示框 */
.doc-tip {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid;
}

.doc-tip-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.doc-tip-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.doc-tip-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.doc-tip-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.doc-tip-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.doc-tip p {
    margin: 0;
    color: inherit;
}

/* 步骤卡片 */
.doc-steps {
    counter-reset: step;
}

.doc-step {
    position: relative;
    padding-left: 48px;
    margin-bottom: 24px;
}

.doc-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.doc-step h4 {
    margin-top: 0;
    line-height: 32px;
}

/* 标签 */
.doc-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.doc-tag-new {
    background-color: #dcfce7;
    color: #166534;
}

.doc-tag-fix {
    background-color: #fee2e2;
    color: #991b1b;
}

.doc-tag-opt {
    background-color: #dbeafe;
    color: #1e40af;
}

/* 版本项 */
.doc-changelog-item {
    margin-bottom: 32px;
}

.doc-changelog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.doc-changelog-version {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.doc-changelog-date {
    color: var(--text-muted);
    font-size: 13px;
}

/* 页脚 */
.doc-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* 首页卡片 */
.doc-home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.doc-home-card {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s;
}

.doc-home-card:hover {
    box-shadow: var(--shadow-card);
    border-color: var(--primary);
}

.doc-home-card-icon {
    width: 44px;
    height: 44px;
    background-color: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
}

.doc-home-card h3 {
    margin: 0 0 10px 0;
    font-size: 17px;
}

.doc-home-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 991px) {
    .doc-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        box-shadow: var(--shadow-card);
    }

    .doc-sidebar.open {
        transform: translateX(0);
    }

    .doc-content {
        margin-left: 0;
        max-width: 100%;
        padding: 24px;
    }

    .doc-menu-toggle {
        display: block;
    }

    .doc-home-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .doc-content {
        padding: 16px;
    }

    .doc-content-inner {
        padding: 24px;
    }

    .doc-content h1 {
        font-size: 22px;
    }

    .doc-content h2 {
        font-size: 18px;
    }
}
