/* ===== CSS变量 ===== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #0891b2;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-header: #2d2d30;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #e2e8f0;
    --border: #e2e8f0;
    
    --comparing: #ec4899;
    --swapping: #0891b2;
    --sorted: #10b981;
    --pivot: #f59e0b;
    --found: #22c55e;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    
    --header-height: 48px;
    --sidebar-width: 180px;
    --code-panel-width: 320px;
}

[data-theme="dark"] {
    --bg: #1e1e1e;
    --bg-card: #252526;
    --bg-elevated: #333333;
    --text: #d4d4d4;
    --text-muted: #808080;
    --text-light: #c6c6c6;
    --border: #3c3c3c;
    --bg-header: #323233;
}

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

body {
    font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== 头部 ===== */
.header {
    background: var(--bg-header);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.1rem;
}

.logo-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.algo-tabs {
    display: flex;
    gap: 2px;
}

.algo-tab {
    padding: 6px 14px;
    background: transparent;
    border: none;
    color: #858585;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.algo-tab:hover {
    color: var(--text-light);
    background: rgba(255,255,255,0.05);
}

.algo-tab.active {
    color: var(--text-light);
    background: rgba(255,255,255,0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-algo-name {
    font-size: 0.8rem;
    color: var(--primary-light);
}

.theme-toggle {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* ===== 主布局 ===== */
.main-container {
    display: flex;
    height: calc(100vh - var(--header-height));
}

/* ===== 左侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.algorithm-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.algorithm-item {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.algorithm-item:hover {
    background: var(--bg-elevated);
}

.algorithm-item.active {
    background: var(--primary);
    color: white;
}

.algorithm-item-icon {
    font-size: 0.85rem;
}

.algorithm-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 中间区域 ===== */
.center-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    overflow: hidden;
}

/* 信息栏 */
.info-bar {
    display: flex;
    gap: 16px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.info-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    color: var(--text);
    font-weight: 500;
    min-width: 40px;
}

/* 可视化容器 */
.viz-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.viz-container:active {
    cursor: grabbing;
}

.viz-container-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viz-canvas {
    transform-origin: center center;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 50px;
}

/* 连线SVG层 */
.viz-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.viz-lines line, .viz-lines path {
    stroke: #6366f1;
    stroke-width: 2;
    fill: none;
    pointer-events: stroke;
}

.viz-lines .line-selected {
    stroke: #f59e0b;
    stroke-width: 3;
}

.viz-lines .line-temp {
    stroke: #94a3b8;
    stroke-dasharray: 5, 5;
}

/* 可拖拽元素 */
.viz-canvas .draggable {
    cursor: grab;
    user-select: none;
    position: relative;
    z-index: 20;
}

.viz-canvas .draggable:active {
    cursor: grabbing;
    z-index: 100;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.placeholder-message p {
    font-size: 0.9rem;
}

/* ===== 数组可视化 ===== */
.array-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 100%;
    padding-bottom: 30px;
}

.array-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s;
    position: relative;
}

.array-bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.array-bar-inner {
    width: 32px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.3s;
}

.array-bar-index {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.array-bar.comparing .array-bar-inner {
    background: linear-gradient(180deg, #f472b6, var(--accent));
}

.array-bar.swapping .array-bar-inner {
    background: linear-gradient(180deg, #22d3ee, var(--secondary));
}

.array-bar.sorted .array-bar-inner {
    background: linear-gradient(180deg, #34d399, var(--success));
}

.array-bar.pivot .array-bar-inner {
    background: linear-gradient(180deg, #fbbf24, var(--pivot));
}

.array-bar.current .array-bar-inner {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.array-bar.found .array-bar-inner {
    background: linear-gradient(180deg, #4ade80, var(--success));
    box-shadow: 0 0 10px var(--success);
}

/* ===== 栈可视化 ===== */
.stack-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    height: 100%;
    padding-top: 20px;
}

.stack-item {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #b45309;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #92400e;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stack-item.top {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-light);
}

.stack-item.current {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    border-color: var(--primary);
}

.stack-label {
    position: absolute;
    right: -60px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stack-base {
    width: 80px;
    height: 8px;
    background: linear-gradient(180deg, #78716c, #57534e);
    border-radius: 4px;
    margin-top: 10px;
    position: relative;
}

.stack-pointer {
    position: absolute;
    top: -20px;
    right: 90px;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
}

@keyframes stackPush {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes stackPop {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-20px); opacity: 0; }
}

/* ===== 队列可视化 ===== */
.queue-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    padding: 0 20px;
}

.queue-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid #2563eb;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #1e40af;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.queue-item.head {
    border-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.queue-item.tail {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.queue-item.enqueue {
    animation: queueEnqueue 0.3s ease-out;
}

.queue-item.dequeue {
    animation: queueDequeue 0.3s ease-out;
}

.queue-item.current {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    border-color: var(--primary);
}

.queue-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 0 2px;
}

.queue-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

.queue-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes queueEnqueue {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes queueDequeue {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(20px); opacity: 0; }
}

/* ===== 控制栏 ===== */
.control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    gap: 16px;
}

.control-left,
.control-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctrl-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text);
}

.ctrl-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.ctrl-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ctrl-btn.primary:hover {
    background: var(--primary-dark);
}

.step-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
    width: 0%;
}

.speed-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.speed-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--bg-elevated);
    border-radius: 2px;
    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.speed-value {
    font-size: 0.75rem;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    min-width: 28px;
}

/* ===== 数据输入 ===== */
.input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.input-bar label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.input-bar input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-card);
    color: var(--text);
}

.input-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.apply-btn {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

/* ===== 右侧代码面板 ===== */
.code-panel {
    width: var(--code-panel-width);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.code-header {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 变体切换Tab */
.variant-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.variant-tab {
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.variant-tab:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary);
}

.variant-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.code-content {
    flex: 1;
    overflow: auto;
    min-height: 150px;
}

.code-block {
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text);
}

.code-line {
    display: block;
    padding: 2px 6px;
    border-radius: 2px;
    transition: background 0.2s;
}

.code-line.highlight {
    background: rgba(99,102,241,0.2);
}

/* 代码行指示针 */
.code-line-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.code-line-wrapper .line-marker {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    margin-right: 4px;
}

.code-line-wrapper.current .line-marker {
    opacity: 1;
}

.code-line-wrapper.current .code-line {
    background: rgba(99,102,241,0.2);
}

.code-keyword { color: #c586c0; }
.code-function { color: #dcdcaa; }
.code-number { color: #b5cea8; }
.code-string { color: #ce9178; }
.code-comment { color: #6a9955; }
.code-variable { color: #9cdcfe; }

/* ===== 过程记录 ===== */
.process-section {
    border-top: 1px solid var(--border);
    max-height: 250px;
    display: flex;
    flex-direction: column;
}

.process-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-elevated);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.process-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.process-clear:hover {
    opacity: 1;
}

.process-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.process-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.process-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 0.72rem;
    transition: all 0.15s;
    cursor: pointer;
    border-left: 2px solid transparent;
}

.process-item:hover {
    background: var(--bg-elevated);
}

.process-item.active {
    background: rgba(99,102,241,0.1);
    border-left-color: var(--primary);
}

.process-item.current {
    background: rgba(8,145,178,0.15);
    border-left-color: var(--secondary);
}

.process-step-num {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    min-width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.process-step-content {
    flex: 1;
    color: var(--text);
    line-height: 1.4;
    word-break: break-all;
}

.process-step-type {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 0.6rem;
    margin-left: 4px;
}

.type-compare { background: rgba(236,72,153,0.15); color: var(--accent); }
.type-swap { background: rgba(8,145,178,0.15); color: var(--secondary); }
.type-visit { background: rgba(99,102,241,0.15); color: var(--primary); }
.type-loop { background: rgba(245,158,11,0.15); color: var(--warning); }
.type-complete { background: rgba(16,185,129,0.15); color: var(--success); }
.type-default { background: var(--bg-elevated); color: var(--text-muted); }

/* ===== 图例 ===== */
.viz-legend {
    display: flex;
    gap: 12px;
    padding: 6px 16px;
    background: var(--bg-elevated);
    font-size: 0.7rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-color.comparing { background: var(--accent); }
.legend-color.swapping { background: var(--secondary); }
.legend-color.sorted { background: var(--success); }
.legend-color.pivot { background: var(--pivot); }

/* ===== 链表可视化 ===== */
.linked-list-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px;
}

.ll-node {
    display: flex;
    align-items: center;
}

.ll-node-box {
    display: flex;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ll-node-data {
    padding: 10px 16px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-card);
}

.ll-node-pointer {
    padding: 10px 12px;
    background: var(--bg-elevated);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ll-arrow {
    width: 30px;
    height: 2px;
    background: var(--text-muted);
    position: relative;
}

.ll-arrow::after {
    content: '→';
    position: absolute;
    right: -8px;
    top: -10px;
    color: var(--text-muted);
}

.ll-node.inserting .ll-node-box {
    border-color: var(--success);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

/* ===== 树可视化（家谱样式）===== */
.tree-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    min-width: 600px;
    min-height: 400px;
}

.tree-node {
    position: absolute;
    min-width: 50px;
    height: 36px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #b45309;
    border-radius: 6px;
    color: #78350f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Noto Sans SC', 'KaiTi', serif;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.tree-node::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #b45309;
    opacity: 0;
}

.tree-node.current {
    background: linear-gradient(135deg, #fca5a5, #f87171);
    border-color: #dc2626;
    color: #7f1d1d;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
    z-index: 20;
}

.tree-node.current::before {
    opacity: 1;
}

.tree-node.visited {
    background: linear-gradient(135deg, #86efac, #22c55e);
    border-color: #16a34a;
    color: #14532d;
}

.tree-node.highlight {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    border-color: #d97706;
    color: #78350f;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.tree-edge {
    position: absolute;
    background: #92400e;
    height: 2px;
    transform-origin: left center;
    z-index: 1;
}

/* 家谱样式 - 垂直连接线 */
.tree-vertical-line {
    position: absolute;
    background: #92400e;
    width: 2px;
    z-index: 1;
}

/* 家谱样式 - 水平分支线 */
.tree-horizontal-line {
    position: absolute;
    background: #92400e;
    height: 2px;
    z-index: 1;
}

/* 根节点特殊样式 */
.tree-node.root {
    background: linear-gradient(135deg, #ddd6fe, #a78bfa);
    border-color: #7c3aed;
    color: #4c1d95;
}

/* 叶子节点样式 */
.tree-node.leaf {
    background: linear-gradient(135deg, #ecfccb, #a3e635);
    border-color: #65a30d;
    color: #3f6212;
}

/* ===== 图可视化 ===== */
.graph-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.graph-node {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.3s;
}

.graph-node.visited {
    background: var(--success);
}

.graph-node.current {
    background: var(--secondary);
    box-shadow: 0 0 15px var(--secondary);
    transform: translate(-50%, -50%) scale(1.15);
}

.graph-node.queue {
    background: var(--warning);
}

.graph-edge {
    position: absolute;
    height: 2px;
    background: var(--border);
    transform-origin: left center;
    z-index: 1;
}

.graph-edge.active {
    background: var(--secondary);
}

.graph-edge.visited {
    background: var(--success);
}

.graph-weight {
    position: absolute;
    background: var(--bg-card);
    padding: 2px 6px;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 3px;
    transform: translate(-50%, -50%);
}
