* { font-family: 'Inter', 'Noto Sans SC', sans-serif; }

body {
    margin: 0;
    overflow: hidden;
    background: #0f172a;
    color: #f8fafc;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(60px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-60px);
}

.bg-gradient {
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
                #0f172a;
}

.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.25rem;
}

.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.4s ease;
    z-index: 100;
}

.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 20px;
}

.nav-btn:hover { background: rgba(59, 130, 246, 0.3); color: white; }
.nav-btn.prev { left: 1.5rem; }
.nav-btn.next { right: 1.5rem; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.page-indicator {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    color: #94a3b8;
    font-size: 0.875rem;
    z-index: 90;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    z-index: 90;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.4);
}

.slide-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-subtitle { font-size: 1.125rem; color: #94a3b8; margin-bottom: 2rem; }

.slide-number-tag {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

/* 流程步骤 */
.flow-step {
    padding: 1.25rem 1.5rem;
    text-align: center;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    position: relative;
    transition: all 0.3s;
    min-width: 150px;
}

.flow-step:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.flow-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.flow-step-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e2e8f0;
}

.flow-arrow {
    color: #6366f1;
    font-size: 1.5rem;
    font-weight: bold;
    align-self: center;
}

/* 资源卡片 */
.resource-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.resource-card.order::before { background: #8b5cf6; }
.resource-card.zone::before { background: #3b82f6; }
.resource-card.handling::before { background: #f97316; }
.resource-card.container::before { background: #22c55e; }
.resource-card.conveyor::before { background: #06b6d4; }
.resource-card.dock::before { background: #ef4444; }
.resource-card.storage::before { background: #6366f1; }

.resource-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.resource-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e2e8f0;
}

.resource-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.resource-section { margin-top: 0.75rem; }

.resource-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.resource-content {
    font-size: 0.8125rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    margin: 0.125rem;
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.tag.function { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tag.cost { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tag.efficiency { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.tag.simulation { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }
.tag.decision { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* 输出卡片 */
.output-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.output-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
}

.output-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.output-card p {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* 矩阵表格 */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.75rem;
    overflow: hidden;
}

.matrix-table th, .matrix-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: top;
}

/* 列宽控制：资源类别加宽，效率/评估决策收窄 */
.matrix-table th:nth-child(1),
.matrix-table td:nth-child(1) { width: 160px; min-width: 160px; } /* 资源类别 */
.matrix-table th:nth-child(2),
.matrix-table td:nth-child(2) { width: 130px; min-width: 130px; } /* 资源要素 */
.matrix-table th:nth-child(3),
.matrix-table td:nth-child(3) { width: 200px; min-width: 200px; } /* 要素属性 */
.matrix-table th:nth-child(4),
.matrix-table td:nth-child(4) { width: 90px; min-width: 90px; }  /* 函数 */
.matrix-table th:nth-child(5),
.matrix-table td:nth-child(5) { width: 80px; min-width: 80px; }  /* 成本 */
.matrix-table th:nth-child(6),
.matrix-table td:nth-child(6) { width: 110px; min-width: 110px; } /* 效率（作业/空间） */
.matrix-table th:nth-child(7),
.matrix-table td:nth-child(7) { width: 110px; min-width: 110px; } /* 仿真 */
.matrix-table th:nth-child(8),
.matrix-table td:nth-child(8) { width: 110px; min-width: 110px; } /* 评估决策 */

.matrix-table th {
    background: rgba(99, 102, 241, 0.2);
    color: #e2e8f0;
    font-weight: 600;
}

.matrix-table tr:hover { background: rgba(99, 102, 241, 0.08); }

.matrix-table tr.highlight {
    background: rgba(59, 130, 246, 0.12);
    border-left: 3px solid #3b82f6;
}

/* 应用指南 */
.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.75rem;
    transition: all 0.3s;
}

.guide-step:hover {
    transform: translateX(4px);
    border-color: rgba(99, 102, 241, 0.4);
}

.guide-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-step-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.guide-step-content {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* 封面页 */
.cover-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.cover-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 3rem;
}

.cover-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cover-tag {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

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

.slide.active .anim-item {
    animation: fadeInUp 0.5s ease-out backwards;
}

.slide.active .anim-item:nth-child(1) { animation-delay: 0.1s; }
.slide.active .anim-item:nth-child(2) { animation-delay: 0.2s; }
.slide.active .anim-item:nth-child(3) { animation-delay: 0.3s; }
.slide.active .anim-item:nth-child(4) { animation-delay: 0.4s; }
.slide.active .anim-item:nth-child(5) { animation-delay: 0.5s; }
.slide.active .anim-item:nth-child(6) { animation-delay: 0.6s; }
.slide.active .anim-item:nth-child(7) { animation-delay: 0.7s; }
.slide.active .anim-item:nth-child(8) { animation-delay: 0.8s; }

/* 键盘提示 */
.keyboard-hint {
    position: fixed;
    bottom: 1.5rem;
    left: 2rem;
    color: #64748b;
    font-size: 0.75rem;
    z-index: 90;
}

.keyboard-hint kbd {
    padding: 2px 6px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.6875rem;
    color: #94a3b8;
}

/* 浅色主题 */
body.light-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

body.light-theme .top-bar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #334155;
}

body.light-theme .theme-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .slide-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .slide-subtitle { color: #475569; }

body.light-theme .glass-card,
body.light-theme .resource-card,
body.light-theme .output-card,
body.light-theme .guide-step,
body.light-theme .flow-step {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-theme .resource-name,
body.light-theme .output-card h3,
body.light-theme .guide-step-title,
body.light-theme .flow-step-text,
body.light-theme .matrix-table th {
    color: #0f172a;
}

body.light-theme .resource-content,
body.light-theme .output-card p,
body.light-theme .guide-step-content,
body.light-theme .resource-label,
body.light-theme .matrix-table td {
    color: #475569;
}

body.light-theme .resource-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

body.light-theme .tag {
    background: rgba(71, 85, 105, 0.1);
    color: #475569;
}

body.light-theme .tag.function { background: rgba(245, 158, 11, 0.12); color: #b45309; }
body.light-theme .tag.cost { background: rgba(34, 197, 94, 0.12); color: #15803d; }
body.light-theme .tag.efficiency { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
body.light-theme .tag.simulation { background: rgba(139, 92, 246, 0.12); color: #6d28d9; }
body.light-theme .tag.decision { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }

body.light-theme .matrix-table {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .matrix-table th { background: #f1f5f9; }
body.light-theme .matrix-table tr:hover { background: #e2e8f0; }
body.light-theme .matrix-table tr.highlight { background: rgba(59, 130, 246, 0.12); }

body.light-theme .cover-title {
    background: linear-gradient(135deg, #0f172a 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .cover-subtitle { color: #475569; }

body.light-theme .cover-tag {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    color: #4f46e5;
}

body.light-theme .nav-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #334155;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .page-indicator { color: #475569; }
body.light-theme .keyboard-hint { color: #64748b; }

body.light-theme .keyboard-hint kbd {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.light-theme .text-slate-200 { color: #1e293b; }
body.light-theme .text-slate-400 { color: #64748b; }
body.light-theme .text-slate-500 { color: #475569; }
body.light-theme .text-indigo-400 { color: #4f46e5; }

@media (max-width: 1024px) {
    .slide { padding: 2rem; }
    .slide-title { font-size: 1.75rem; }
    .cover-title { font-size: 2.5rem; }
}
