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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-header .icon {
    width: 48px;
    height: 48px;
}

.page-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
}

/* 标签导航 */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 24px;
    border: 2px solid transparent;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #e6e6e6;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab-icon {
    font-size: 20px;
}

.tab-text {
    font-size: 16px;
}

/* 标签内容 */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片 */
.card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 步骤标题 */
.step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-number {
    background-color: #1890ff;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.step-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 警告框 */
.alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.alert-description {
    font-size: 0.95rem;
    line-height: 1.6;
}

.alert-info {
    background-color: #e6f7ff;
    border-left-color: #1890ff;
    color: #0050b3;
}

.alert-success {
    background-color: #f6ffed;
    border-left-color: #52c41a;
    color: #389e0d;
}

.alert-warning {
    background-color: #fffbe6;
    border-left-color: #faad14;
    color: #d48806;
}

/* 代码块 */
.code-block {
    background-color: #1f1f1f;
    color: #e6e6e6;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.code-title {
    color: #52c41a;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.code-block pre {
    margin: 0;
    white-space: pre;
    line-height: 1.6;
}

code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

/* 折叠面板 */
.collapse {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.collapse-header {
    background: #fafafa;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-header:hover {
    background: #f0f0f0;
}

.collapse-header::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 8px;
    font-size: 0.8em;
}

.collapse[open] .collapse-header::before {
    transform: rotate(90deg);
}

.collapse-content {
    padding: 20px;
    background: white;
    border-top: 1px solid #e8e8e8;
}

/* 工具网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background: #fafafa;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
    transform: translateY(-2px);
}

.tool-card h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #333;
}

.tool-card p {
    margin-top: 12px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 页脚 */
.page-footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 48px;
    color: #666;
    border-top: 1px solid #e8e8e8;
}

/* 列表样式 */
ol, ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

ol li, ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

p {
    margin-bottom: 12px;
    line-height: 1.6;
}

h4 {
    margin-top: 16px;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

strong {
    font-weight: 600;
    color: #333;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .page-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
    }

    .page-header .subtitle {
        font-size: 1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: auto;
        width: 100%;
    }

    .card {
        padding: 20px;
    }

    .step-title h3 {
        font-size: 1.2rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .code-block {
        font-size: 12px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 24px 16px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .alert {
        flex-direction: column;
        gap: 8px;
    }
}
