/* 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #f5f7fa; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航 */
header { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: white; padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.logo span { color: #00d4ff; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: white; text-decoration: none; transition: color 0.3s; }
.nav-links a:hover { color: #00d4ff; }

/* 英雄区 */
.hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: white; padding: 4rem 0; text-align: center; }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.3rem; opacity: 0.9; margin-bottom: 2rem; }
.btn { display: inline-block; padding: 12px 30px; background: #00d4ff; color: #1a1a2e; text-decoration: none; border-radius: 6px; font-weight: bold; transition: transform 0.3s, box-shadow 0.3s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,212,255,0.4); }

/* 内容卡片 */
.section { padding: 3rem 0; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 2rem; color: #1a1a2e; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }
.card h3 { color: #1a1a2e; margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.card-icon { font-size: 2rem; }

/* 流程图样式 */
.diagram { background: white; padding: 2rem; border-radius: 12px; margin: 2rem 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); overflow-x: auto; }
.diagram-title { font-size: 1.3rem; margin-bottom: 1.5rem; color: #1a1a2e; text-align: center; }
.flowchart { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; }
.flow-node { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 25px; border-radius: 8px; font-weight: 500; min-width: 120px; text-align: center; }
.flow-arrow { color: #667eea; font-size: 1.5rem; font-weight: bold; }
.flow-node.start { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.flow-node.end { background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); }
.flow-node.process { background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%); }
.flow-node.decision { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

/* 时序图 */
.sequence-diagram { display: flex; flex-direction: column; gap: 10px; }
.sequence-row { display: flex; align-items: center; gap: 10px; }
.sequence-label { min-width: 100px; padding: 8px 15px; background: #f0f0f0; border-radius: 5px; font-size: 0.9rem; font-weight: 500; text-align: center; }
.sequence-line { flex: 1; height: 2px; background: #ddd; position: relative; }
.sequence-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; top: -5px; }
.sequence-msg { padding: 5px 10px; background: #e3f2fd; border-radius: 5px; font-size: 0.85rem; margin-left: 10px; }

/* 代码块 */
pre { background: #1a1a2e; color: #e0e0e0; padding: 1.5rem; border-radius: 8px; overflow-x: auto; margin: 1rem 0; }
code { font-family: 'Fira Code', monospace; }
.inline-code { background: #f0f0f0; padding: 2px 8px; border-radius: 4px; font-family: monospace; }

/* 标签页 */
.tabs { display: flex; gap: 5px; margin-bottom: 1rem; }
.tab { padding: 10px 20px; background: #e0e0e0; border: none; border-radius: 5px 5px 0 0; cursor: pointer; transition: background 0.3s; }
.tab.active { background: #1a1a2e; color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #1a1a2e; color: white; }
tr:hover { background: #f9f9f9; }

/* 页脚 */
footer { background: #1a1a2e; color: white; padding: 2rem 0; text-align: center; margin-top: 3rem; }

/* 响应式 */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .grid { grid-template-columns: 1fr; }
}

/* 动画 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate { animation: fadeIn 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
