/* ========================================
   通用文档标准样式库
   版本: v1.0
   用途: 项目文档HTML页面统一样式
   作者: 项目团队
   日期: 2025-12-27
   说明: 可复用于任何项目的文档页面
   ======================================== */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 全局样式 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 20px;
}

/* ===== 容器布局 ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
}

/* ===== 导航栏 ===== */
.nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 24px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== 标题样式 ===== */
h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
}

h2 {
    color: #34495e;
    margin: 40px 0 25px;
    padding-left: 15px;
    border-left: 4px solid #3498db;
    font-size: 24px;
    font-weight: 600;
}

h3 {
    color: #555;
    margin: 25px 0 15px;
    font-size: 20px;
    font-weight: 600;
}

h4 {
    color: #666;
    margin: 20px 0 12px;
    font-size: 18px;
}

h5 {
    color: #777;
    margin: 18px 0 10px;
    font-size: 16px;
}

h6 {
    color: #888;
    margin: 15px 0 8px;
    font-size: 14px;
}

/* ===== 段落和文本 ===== */
p {
    margin: 12px 0;
    color: #555;
    line-height: 1.8;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: #2c3e50;
}

em {
    font-style: italic;
    color: #555;
}

/* ===== 卡片系统 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin: 25px 0;
}

.card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #9b59b6);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.card:hover::before {
    transform: scaleY(1);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-4px);
    border-color: #3498db;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.card-content p {
    margin: 10px 0;
}

.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== 标签系统 ===== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: default;
}

.tag.primary {
    background: #e3f2fd;
    color: #1976d2;
}

.tag.success {
    background: #e8f5e9;
    color: #388e3c;
}

.tag.warning {
    background: #fff3e0;
    color: #f57c00;
}

.tag.danger {
    background: #ffebee;
    color: #d32f2f;
}

.tag.info {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tag.secondary {
    background: #f5f5f5;
    color: #666;
}

.tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== 列表样式 ===== */
ul, ol {
    margin: 20px 0;
    padding-left: 30px;
}

li {
    margin: 10px 0;
    color: #555;
    line-height: 1.8;
}

ul li::marker {
    color: #3498db;
}

ol li::marker {
    color: #3498db;
    font-weight: 600;
}

ul ul, ol ul, ul ol, ol ol {
    margin: 8px 0;
}

/* ===== 表格样式 ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

th {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: #555;
}

tbody tr {
    transition: background 0.3s;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* 斑马纹表格 */
tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:nth-child(even):hover {
    background: #f1f3f5;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ===== 代码块样式 ===== */
pre {
    background: #282c34;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

code {
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    color: #e74c3c;
    background: #f6f8fa;
    padding: 3px 8px;
    border-radius: 4px;
}

pre code {
    background: none;
    padding: 0;
    color: #abb2bf;
}

/* ===== 提示框样式 ===== */
.alert {
    padding: 18px 24px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.alert strong {
    font-weight: 600;
}

.alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #0d47a1;
}

.alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #1b5e20;
}

.alert-danger {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* ===== 面板样式 ===== */
.panel {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.panel-header {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e1e8ed;
}

.panel-body {
    color: #555;
    line-height: 1.8;
}

.panel-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e1e8ed;
    color: #999;
    font-size: 14px;
}

/* ===== 徽章样式 ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.badge-primary { background: #3498db; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-warning { background: #ffc107; color: #333; }
.badge-danger { background: #dc3545; color: white; }
.badge-info { background: #17a2b8; color: white; }
.badge-secondary { background: #6c757d; color: white; }

/* ===== 进度条样式 ===== */
.progress {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.6s ease;
}

.progress-bar-success {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-bar-warning {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.progress-bar-danger {
    background: linear-gradient(90deg, #dc3545 0%, #e83e8c 100%);
}

/* ===== 分隔线样式 ===== */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e1e8ed, transparent);
    margin: 40px 0;
}

/* ===== 引用块样式 ===== */
blockquote {
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    color: #555;
    font-style: italic;
}

blockquote p {
    margin: 8px 0;
}

/* ===== 页脚样式 ===== */
.footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e1e8ed;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.footer p {
    margin: 8px 0;
    color: #999;
}

.footer a {
    color: #3498db;
}

/* ===== 图片样式 ===== */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== 表单元素样式 ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 8px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px;
    }
    
    .card {
        padding: 16px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .nav, .btn, .badge {
        display: none;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    pre {
        border: 1px solid #ddd;
    }
}

/* ===== 深色模式支持（可选） ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .container {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .card {
        background: #333;
        border-color: #444;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #fff;
    }
    
    .card-title {
        color: #fff;
    }
    
    .card-content {
        color: #ccc;
    }
    
    p, li {
        color: #ccc;
    }
    
    table {
        background: #2d2d2d;
    }
    
    th {
        background: #444;
    }
    
    td {
        color: #ccc;
        border-bottom-color: #444;
    }
    
    tbody tr:hover {
        background: #3a3a3a;
    }
    
    code {
        background: #3a3a3a;
        color: #f8f8f2;
    }
    
    .panel {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .alert-info {
        background: #1e3a5f;
        color: #90caf9;
    }
    
    .alert-success {
        background: #1b5e20;
        color: #a5d6a7;
    }
    
    .alert-warning {
        background: #5d4037;
        color: #ffcc80;
    }
    
    .alert-danger {
        background: #b71c1c;
        color: #ef9a9a;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63388b 100%);
}

/* ========================================
   index.html 文档总览专用样式
   版本: v2.0
   更新: 2026-02-25
   说明: 用于需求文档总览入口页面
   ======================================== */

/* ===== 渐变背景主题（用于 index.html 等） ===== */
body.theme-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

body.theme-gradient .container {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* ===== Header 标题区（渐变背景页） ===== */
.header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
}

.header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 0;
}

.header p {
    font-size: 18px;
    opacity: 0.9;
    color: white;
}

.header .subtitle {
    font-size: 16px;
    margin-top: 15px;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
}

/* ===== Section 标题（渐变背景页） ===== */
.section-title {
    color: white;
    font-size: 28px;
    margin: 40px 0 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    border: none;
    padding: 0;
}

/* ===== 文档卡片网格 ===== */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.doc-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-decoration: none;
}

.doc-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.doc-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.doc-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.doc-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.doc-tag {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
}

/* ===== 摘要盒子 ===== */
.summary-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.summary-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== 价格卡片网格 ===== */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.price-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #e9ecef;
}

.price-card.highlight {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

.price-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.price-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.price-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.price-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ===== 流程步骤 ===== */
.flow-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 4px;
}

.flow-step {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #f0f4ff;
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 80px;
}

.flow-num {
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 6px;
}

.flow-step span:not(.flow-num):not(.flow-detail) {
    font-weight: 500;
    color: #333;
}

.flow-detail {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    text-align: center;
}

.flow-arrow {
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
}

/* ===== 页面与线稿区块 ===== */
.pages-section {
    margin-bottom: 40px;
}

.pages-group {
    margin-bottom: 30px;
}

.pages-group-title {
    color: white;
    font-size: 20px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.pages-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ===== 迷你文档卡片（页面列表用） ===== */
.doc-card.mini {
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.doc-card.mini .doc-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.doc-card.mini .doc-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.doc-card.mini .doc-desc {
    font-size: 12px;
    margin-bottom: 10px;
    color: #888;
}

/* ===== 线稿预览缩略图 ===== */
.page-wireframe {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.95);
    width: 280px;
    flex-shrink: 0;
}

.wireframe-thumb {
    display: block;
    width: 280px;
    height: 200px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.wireframe-thumb iframe {
    width: 560px;
    height: 400px;
    border: none;
    transform: scale(0.5);
    transform-origin: 0 0;
    pointer-events: none;
}

.wireframe-thumb .thumb-hint {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    color: #667eea;
    background: rgba(255,255,255,0.95);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== 模态框（线稿大图预览） ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-wrap {
    width: min(1280px, 95vw);
    height: min(720px, 85vh);
    max-width: 95vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-wrap.mobile {
    width: min(375px, 92vw);
    height: min(667px, 90vh);
    max-width: 92vw;
    max-height: 90vh;
    aspect-ratio: 9 / 16;
}

.modal-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    display: block;
}

.modal-wrap.mobile iframe {
    min-height: 0;
}

.modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
}

/* ===== 功能模块网格 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.feature-card ul {
    list-style: none;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.8;
    padding: 0;
    margin: 0;
}

.feature-card li {
    color: white;
    margin: 5px 0;
}

.feature-card li::before {
    content: "•";
    margin-right: 8px;
    color: #ffd700;
}

/* ===== 角色卡片网格 ===== */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.role-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.role-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.role-card p {
    font-size: 13px;
    opacity: 0.9;
    color: white;
    margin: 0;
}

/* ===== 图表区块（interaction_map / database_er） ===== */
.diagram-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.diagram-section .section-title {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: none;
}

.section-icon {
    font-size: 32px;
}

.diagram-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    overflow-x: auto;
}

.mermaid {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: center;
}

/* ===== 表格卡片网格（database_er） ===== */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table-card {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.table-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.table-name {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

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

.field-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-item:last-child {
    border-bottom: none;
}

.field-name {
    color: #2c3e50;
    font-weight: 500;
}

.field-type {
    color: #7f8c8d;
    font-size: 12px;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== 管理端模块与页面卡片（admin_pages） ===== */
.module {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.module-title {
    font-size: 24px;
    color: #3b7af4;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b7af4;
}

.page-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.page-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s;
}

.page-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.page-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.page-path {
    font-size: 12px;
    color: #666;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    background: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
}

.page-features {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* ===== 返回链接 ===== */
.back-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s;
}

.back-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* ===== 提示框（渐变背景页用） ===== */
.note-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.note-title {
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 8px;
}

.note-content {
    color: #1565c0;
    line-height: 1.6;
}

/* ===== 页面结构页 CSS 变量 ===== */
:root {
    --primary-color: #667eea;
    --primary-light: #f0f5ff;
    --secondary-color: #764ba2;
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #999;
    --border-color: #e0e0e0;
    --bg-gray: #f9f9f9;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --card-radius: 6px;
    --card-padding: 15px;
    --card-gap: 20px;
    --card-min-width: 320px;
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

/* ===== 响应式设计（index.html 专用补充） ===== */
@media (max-width: 768px) {
    body.theme-gradient {
        padding: 20px 10px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .doc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-steps {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .role-grid {
        grid-template-columns: 1fr;
    }
    
    .table-grid {
        grid-template-columns: 1fr;
    }
    
    .page-list {
        grid-template-columns: 1fr;
    }
    
    .doc-card.mini {
        width: 100%;
    }
    
    .page-wireframe {
        width: 100%;
        max-width: 280px;
    }
    
    .wireframe-thumb {
        width: 100%;
        max-width: 280px;
    }
}

/* =====================================================================
   API 文档专用样式 (api_list.html)
   ===================================================================== */

/* ===== 侧边栏导航 ===== */
.nav-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    overflow-y: auto;
    padding: 20px 0;
    z-index: 100;
}

.nav-sidebar h2 {
    padding: 0 20px;
    font-size: 16px;
    margin-bottom: 15px;
    color: #ecf0f1;
}

.nav-sidebar ul {
    list-style: none;
}

.nav-sidebar li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-sidebar a {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-sidebar .nav-section {
    font-weight: bold;
    color: #667eea;
    padding: 15px 20px 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
}

/* ===== 主内容区（带侧边栏） ===== */
body.has-sidebar .main-content {
    margin-left: 260px;
    padding: 40px;
}

/* ===== 状态标签 ===== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.tag-done {
    background: #27ae60;
    color: white;
}

.tag-todo {
    background: #e74c3c;
    color: white;
}

.tag-extend {
    background: #f39c12;
    color: white;
}

/* ===== 模块头 ===== */
.module-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0 20px;
}

.module-header h2 {
    color: white;
    border: none;
    margin: 0;
    padding: 0;
}

.module-header p {
    margin-top: 8px;
    opacity: 0.9;
    font-size: 14px;
}

.module-header.todo {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.module-header.common {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

/* ===== API 卡片 ===== */
.api-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
}

.api-card.todo {
    border-left-color: #e74c3c;
}

.api-card.extend {
    border-left-color: #f39c12;
}

.api-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.api-method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.api-method.get {
    background: #27ae60;
}

.api-method.post {
    background: #3498db;
}

.api-method.put {
    background: #f39c12;
}

.api-method.delete {
    background: #e74c3c;
}

.api-path {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 6px 12px;
    border-radius: 4px;
}

.api-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.api-meta-item {
    font-size: 13px;
}

.api-meta-item label {
    color: #7f8c8d;
    display: block;
    margin-bottom: 3px;
}

.api-meta-item span {
    color: #2c3e50;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
}

/* ===== 参数表格 ===== */
.param-table th {
    background: #34495e;
}

.param-required {
    color: #e74c3c;
    font-weight: bold;
}

/* ===== 接口列表表格 ===== */
.api-list-table {
    margin: 20px 0;
}

.api-list-table .tag {
    margin-left: 0;
}

.api-list-table code {
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* ===== 统计网格 ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.summary-card .number.todo {
    color: #e74c3c;
}

.summary-card .number.extend {
    color: #f39c12;
}

.summary-card .label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* ===== API 文档响应式 ===== */
@media (max-width: 900px) {
    .nav-sidebar {
        display: none;
    }
    
    body.has-sidebar .main-content {
        margin-left: 0;
    }
    
    .api-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .api-meta {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

