* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    padding: 40px 0;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

main {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-height: 500px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 1.8em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    color: #764ba2;
    margin: 20px 0 10px 0;
}

h4 {
    color: #333;
    margin: 15px 0 10px 0;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5568d3;
}

/* 首页软件卡片 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.software-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    color: white;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.software-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.software-card h3 {
    color: white;
    margin-bottom: 10px;
}

.software-card p {
    font-size: 0.9em;
    opacity: 0.9;
}

/* 模块卡片 */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.module-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.module-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-3px);
}

.module-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.module-card p {
    font-size: 0.9em;
    color: #666;
}

/* 内容区域 */
.content-section {
    line-height: 1.8;
}

.content-section p {
    margin-bottom: 15px;
}

.content-section ul,
.content-section ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-section li {
    margin-bottom: 8px;
}

.content-section li.no-number {
    list-style-type: none;
}

.content-section code {
    background: #f0f4ff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #667eea;
}

.content-section .img-example {
    display: block;
    margin: 15px auto;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-section .img-caption {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* 占位页面 */
.placeholder-content {
    text-align: center;
    padding: 60px 20px;
}

.placeholder-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.placeholder-content h3 {
    color: #666;
    margin-bottom: 15px;
}

.placeholder-content p {
    color: #999;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .software-grid,
    .module-grid {
        grid-template-columns: 1fr;
    }
}
