:root {
    --bg-color: #05070a;
    --card-bg: rgba(16, 24, 39, 0.6);
    --card-border: rgba(0, 210, 255, 0.2);
    --primary-color: #00f2ff;
    --secondary-color: #0066ff;
    --accent-color: #00ff9d;
    --feishu-color: #3370ff;
    --protocol-color: #ff9f1c;
    --text-primary: #ffffff;
    --text-secondary: #b4c6ef;
    --glow-primary: 0 0 20px rgba(0, 242, 255, 0.3);
    --glow-accent: 0 0 15px rgba(0, 255, 157, 0.3);
    --font-main: 'Outfit', sans-serif;
    --font-cn: 'Noto Sans SC', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main), var(--font-cn);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

.nav-body {
    overflow: hidden;
}

/* Dynamic Starry Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(162, 132, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

header {
    padding: 15px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #fff, var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
}

.subtitle {
    color: var(--primary-color);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.stage-shell {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.layout-shell {
    display: flex;
    gap: 8px;
    padding: 8px 8px 12px;
    min-height: calc(100vh - 120px);
}

.arch-tabs {
    width: 56px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.arch-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border-radius: 9px;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    transition: all 0.18s ease;
    font-weight: 600;
    letter-spacing: 0.4px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.76rem;
    gap: 6px;
    position: relative;
}

.arch-tab:hover {
    transform: translateX(2px);
    color: var(--text-primary);
}

.arch-tab.active {
    color: var(--text-primary);
}

.arch-tab::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: transparent;
}

.arch-tab.active::before {
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.8), rgba(0, 102, 255, 0.5));
}

.arch-tab span {
    line-height: 1.1;
}

.stage {
    position: relative;
    width: var(--stage-width, 1920px);
    height: var(--stage-height, 1080px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(var(--stage-scale, 1));
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.25s ease-out;
}

.flow-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    gap: 10px;
    overflow: hidden;
    perspective: 1000px;
}

.ba-container {
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
}

.ba-board {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: stretch;
}

.ba-left {
    display: grid;
    grid-template-rows: repeat(8, 1fr);
    gap: 8px;
}

.ba-right {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 10px;
    align-content: start;
}

.dept-card {
    background: rgba(16, 24, 39, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-left: 3px solid rgba(0, 242, 255, 0.6);
    border-radius: 12px;
    padding: 0 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: float-card 6s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes float-card {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.dept-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.3), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.dept-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(16, 24, 39, 0.6);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    z-index: 10;
}

.dept-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dept-card:hover .dept-icon {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color);
}

.dept-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
    opacity: 0.7;
    font-weight: 400;
}

.dept-card[data-color="blue"] {
    border-left-color: rgba(0, 242, 255, 0.6);
}

.dept-card[data-color="teal"] {
    border-left-color: rgba(0, 255, 157, 0.6);
}

.dept-card[data-color="orange"] {
    border-left-color: rgba(255, 159, 28, 0.6);
}

.dept-card[data-color="yellow"] {
    border-left-color: rgba(255, 223, 99, 0.6);
}

.dept-card[data-color="purple"] {
    border-left-color: rgba(162, 132, 255, 0.6);
}

.dept-card[data-color="pink"] {
    border-left-color: rgba(255, 128, 197, 0.6);
}

.dept-card[data-color="blue"]:hover {
    border-color: rgba(0, 242, 255, 0.8);
    box-shadow: 0 5px 20px rgba(0, 242, 255, 0.15);
}

.dept-card[data-color="teal"]:hover {
    border-color: rgba(0, 255, 157, 0.8);
    box-shadow: 0 5px 20px rgba(0, 255, 157, 0.15);
}

.dept-card[data-color="orange"]:hover {
    border-color: rgba(255, 159, 28, 0.8);
    box-shadow: 0 5px 20px rgba(255, 159, 28, 0.15);
}

.dept-card[data-color="yellow"]:hover {
    border-color: rgba(255, 223, 99, 0.8);
    box-shadow: 0 5px 20px rgba(255, 223, 99, 0.15);
}

.dept-card[data-color="purple"]:hover {
    border-color: rgba(162, 132, 255, 0.8);
    box-shadow: 0 5px 20px rgba(162, 132, 255, 0.15);
}

.dept-card[data-color="pink"]:hover {
    border-color: rgba(255, 128, 197, 0.8);
    box-shadow: 0 5px 20px rgba(255, 128, 197, 0.15);
}

.module-card {
    background: rgba(16, 24, 39, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    box-shadow: inset 0 0 30px rgba(0, 242, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(8px);
    animation: float-card 7s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.module-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.15), inset 0 0 20px rgba(0, 242, 255, 0.05);
    background: rgba(16, 24, 39, 0.7);
    z-index: 10;
}

.module-card:hover .card-icon {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.module-card:hover::before {
    opacity: 1;
}

.module-card[data-color="blue"]:hover {
    border-color: rgba(0, 242, 255, 0.6);
}

.module-card[data-color="teal"]:hover {
    border-color: rgba(0, 255, 157, 0.6);
}

.module-card[data-color="orange"]:hover {
    border-color: rgba(255, 159, 28, 0.6);
}

.module-card[data-color="yellow"]:hover {
    border-color: rgba(255, 223, 99, 0.6);
}

.module-card[data-color="purple"]:hover {
    border-color: rgba(162, 132, 255, 0.6);
}

.module-card[data-color="pink"]:hover {
    border-color: rgba(255, 128, 197, 0.6);
}

.module-card[data-color="blue"] .card-icon {
    color: #00f2ff;
}

.module-card[data-color="teal"] .card-icon {
    color: #00ff9d;
}

.module-card[data-color="orange"] .card-icon {
    color: #ff9f1c;
}

.module-card[data-color="yellow"] .card-icon {
    color: #ffdf63;
}

.module-card[data-color="purple"] .card-icon {
    color: #a284ff;
}

.module-card[data-color="pink"] .card-icon {
    color: #ff80c5;
}

.ba-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.placeholder-container {
    justify-content: center;
}

.placeholder-card {
    padding: 18px 24px;
    border-radius: 14px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(12, 24, 40, 0.6);
    color: var(--text-secondary);
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.placeholder-card.locked-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 360px;
    max-width: 520px;
    text-align: center;
}

.placeholder-card.locked-card::before {
    content: '';
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 242, 255, 0.1), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(255, 0, 85, 0.06), transparent 42%),
        linear-gradient(135deg, rgba(0, 242, 255, 0.12), rgba(0, 0, 0, 0));
    opacity: 0.7;
    pointer-events: none;
}

.locked-card .lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 242, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    color: #00f2ff;
    font-size: 1.2rem;
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.35);
}

.locked-card .lock-title {
    font-weight: 700;
    color: #dfe8f3;
    letter-spacing: 0.3px;
}

.locked-card .lock-note {
    font-size: 0.85rem;
    color: rgba(223, 232, 243, 0.75);
}

.flow-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 15px;
    height: 620px;
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(0, 242, 255, 0.05);
}

.flow-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(0, 242, 255, 0.5), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.flow-section:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 242, 255, 0.15), inset 0 0 30px rgba(0, 242, 255, 0.1);
    border-color: var(--primary-color);
    z-index: 5;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.icon-box {
    width: 45px;
    height: 45px;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    box-shadow: var(--glow-primary), inset 0 0 15px rgba(0, 242, 255, 0.1);
    transition: transform 0.3s ease;
}

.flow-section:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: rgba(0, 242, 255, 0.1);
}

.title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.en-title {
    font-size: 0.65rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Source Systems */
.source-systems {
    flex: 0 0 230px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    overflow-y: auto;
    padding: 2px;
}

.system-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.system-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.system-card:hover::after {
    transform: translateX(100%);
}

.system-card:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 1.1rem;
    color: var(--accent-color);
    filter: drop-shadow(0 0 5px rgba(0, 255, 157, 0.5));
}

.system-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Connector Lines */
.connector-path {
    flex: 0 0 50px;
    height: 100px;
    position: relative;
    min-width: 40px;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3));
}

.path-line {
    fill: none;
    stroke: rgba(0, 242, 255, 0.15);
    stroke-width: 2;
    stroke-dasharray: 10, 5;
}

.request-line {
    stroke: rgba(200, 200, 200, 0.4);
    /* Light gray for request */
    stroke-dasharray: 5, 5;
}

.fan-connector {
    height: 480px;
    /* 固定高度配合stage等比例缩放 */
    min-width: 80px;
    /* Wider for better curves */
    flex: 0 0 100px;
}

.tech-line {
    fill: none;
    stroke: rgba(0, 242, 255, 0.4);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 2px rgba(0, 242, 255, 0.5));
}

.tech-node {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px var(--primary-color));
}

.tech-packet {
    fill: none;
    stroke: #fff;
    stroke-width: 4px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 5px #fff);
}

.response-line {
    stroke: rgba(0, 242, 255, 0.3);
}

.particle {
    fill: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.request-particle {
    fill: #a0a0a0;
    /* Gray for request */
    filter: drop-shadow(0 0 5px #a0a0a0);
}

.response-particle {
    fill: var(--primary-color);
}

/* ETL Platform */
.etl-platform {
    flex: 0 0 210px;
}

.etl-core {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.etl-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}

.etl-spinner::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid transparent;
    border-left-color: var(--accent-color);
    border-right-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 2s reverse cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.etl-spinner::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.etl-icon {
    font-size: 2rem;
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.db-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

.db-block,
.protocol-block {
    position: relative;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 10px 10px 14px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.25);
}

.rail-label {
    position: absolute;
    top: -10px;
    left: 10px;
    writing-mode: horizontal-tb;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    opacity: 0.9;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.35));
}

.db-rail {
    color: #7fd0ff;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.45), 0 0 4px rgba(0, 0, 0, 0.6);
}

.protocol-rail {
    color: #7fd0ff;
    opacity: 0.95;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5), 0 0 4px rgba(0, 0, 0, 0.6);
}

.db-block>*:not(.rail-label),
.protocol-block>*:not(.rail-label) {
    position: relative;
    z-index: 1;
}

.db-tag {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.db-tag:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color);
}

.protocol-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    justify-items: center;
    margin-top: 14px;
    margin-bottom: 8px;
}

.protocol-list .db-tag {
    position: relative;
    width: 100%;
    text-align: center;
    background: linear-gradient(145deg, rgba(12, 16, 24, 0.95), rgba(6, 8, 12, 0.9));
    background-image:
        linear-gradient(90deg, rgba(0, 242, 255, 0.08) 0, rgba(0, 242, 255, 0.08) 40%, transparent 40%, transparent 100%),
        linear-gradient(180deg, rgba(12, 16, 24, 0.95), rgba(6, 8, 12, 0.9));
    border: 1px solid rgba(0, 242, 255, 0.28);
    border-left: 3px solid var(--primary-color);
    color: #d6e8ff;
    font-size: 0.62rem;
    padding: 5px 8px;
    border-radius: 4px;
    letter-spacing: 0.6px;
    box-shadow: inset 0 0 8px rgba(0, 242, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
    overflow: hidden;
}

.protocol-list .db-tag::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 3px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

.protocol-list .db-tag:hover {
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: inset 0 0 10px rgba(0, 242, 255, 0.18), 0 8px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

/* Data Middle Ground */
.data-middle {
    flex: 0 0 210px;
}

.data-lake-visual {
    position: relative;
    width: 110px;
    height: 130px;
    margin: 20px 0;
    transform-style: preserve-3d;
    transform: rotateX(10deg);
}

.lake-layer {
    position: absolute;
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(0, 102, 255, 0.1));
    border: 1px solid rgba(0, 242, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1), inset 0 0 20px rgba(0, 242, 255, 0.1);
    transition: all 0.3s;
}

.layer-1 {
    bottom: 0;
    animation: float 4s ease-in-out infinite;
    z-index: 3;
}

.layer-2 {
    bottom: 30px;
    animation: float 4s ease-in-out infinite 0.5s;
    z-index: 2;
    scale: 0.9;
}

.layer-3 {
    bottom: 60px;
    animation: float 4s ease-in-out infinite 1s;
    z-index: 1;
    scale: 0.8;
}

.lake-icon {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #fff;
    z-index: 10;
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: pulse-glow 3s infinite;
}

.status-text {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--accent-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.sync-ticker {
    width: 100%;
    margin-top: 14px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 10px rgba(0, 242, 255, 0.05);
}

.ticker-track {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    animation: tickerScroll 18s linear infinite;
    will-change: transform;
}

.ticker-item {
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.08), rgba(255, 255, 255, 0));
    color: #e3f6ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticker-item::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    background: currentColor;
}

.ticker-item.success {
    color: #6fffe0;
}

.ticker-item.info {
    color: #8ae4ff;
}

.ticker-item.warn {
    color: #ffb347;
}

@keyframes tickerScroll {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* FeishuSyncEngine */
.sync-engine {
    flex: 0 0 210px;
}

.engine-visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 800px;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    animation: spin-3d-1 4s linear infinite;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-left: 2px solid var(--accent-color);
    border-right: 2px solid var(--primary-color);
    animation: spin-3d-2 5s linear infinite reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-top: 2px solid #fff;
    border-bottom: 2px solid var(--accent-color);
    animation: spin-3d-3 3s linear infinite;
}

.core-glow {
    position: absolute;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.5;
    animation: pulse-core 2s ease-in-out infinite;
}

.core-icon {
    position: relative;
    font-size: 2rem;
    color: #fff;
    z-index: 10;
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: float-core 3s ease-in-out infinite;
}

@keyframes spin-3d-1 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg);
    }
}

@keyframes spin-3d-2 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(180deg) rotateY(360deg) rotateZ(180deg);
    }
}

@keyframes spin-3d-3 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg);
    }
}

@keyframes pulse-core {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes float-core {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 15px;
    align-items: center;
}

.step-flow-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.step-flow {
    width: 2px;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.flow-dot {
    width: 100%;
    height: 60%;
    background: var(--accent-color);
    position: absolute;
    top: -100%;
    opacity: 0;
    box-shadow: 0 0 5px var(--accent-color);
}

/* Sequential Animation Logic */
/* Total cycle: 3s */
/* Step 1: 0s - 1s */
/* Flow 1: 0.5s - 1.5s */
/* Step 2: 1s - 2s */
/* Flow 2: 1.5s - 2.5s */
/* Step 3: 2s - 3s */

.step {
    background: rgba(255, 255, 255, 0.02);
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    padding-left: 0;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 255, 157, 0.1);
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.2), transparent);
    transform: translateX(-100%);
}

.step-1 {
    animation: step-highlight 3s infinite;
}

.step-2 {
    animation: step-highlight 3s infinite 1s;
}

.step-3 {
    animation: step-highlight 3s infinite 2s;
}

.flow-group-1 .flow-dot {
    animation: dropFlow 3s infinite 0.5s;
}

.flow-group-2 .flow-dot {
    animation: dropFlow 3s infinite 1.5s;
}

/* Stagger internal dots slightly for effect */
.step-flow:nth-child(1) .flow-dot {
    animation-delay: calc(var(--base-delay) + 0s);
}

.step-flow:nth-child(2) .flow-dot {
    animation-delay: calc(var(--base-delay) + 0.1s);
}

.step-flow:nth-child(3) .flow-dot {
    animation-delay: calc(var(--base-delay) + 0.2s);
}

.step-flow:nth-child(4) .flow-dot {
    animation-delay: calc(var(--base-delay) + 0.15s);
}

.step-flow:nth-child(5) .flow-dot {
    animation-delay: calc(var(--base-delay) + 0.05s);
}

.flow-group-1 {
    --base-delay: 0.5s;
}

.flow-group-2 {
    --base-delay: 1.5s;
}

@keyframes step-highlight {

    0%,
    100% {
        border-color: rgba(0, 255, 157, 0.1);
        box-shadow: none;
        background: rgba(255, 255, 255, 0.02);
    }

    10%,
    40% {
        border-color: var(--accent-color);
        box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
        background: rgba(0, 255, 157, 0.1);
    }
}

@keyframes dropFlow {
    0% {
        top: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    40% {
        top: 100%;
        opacity: 1;
    }

    41% {
        top: 100%;
        opacity: 0;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Feishu Target */
.feishu-target {
    flex: 0 0 230px;
    border-color: rgba(51, 112, 255, 0.3);
    background: linear-gradient(145deg, rgba(51, 112, 255, 0.05), rgba(16, 24, 39, 0.8));
}

.feishu-target:hover {
    border-color: var(--feishu-color);
    box-shadow: 0 10px 40px rgba(51, 112, 255, 0.2);
}

.feishu-logo img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 10px rgba(51, 112, 255, 0.5));
}

.module-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    overflow-y: auto;
    padding-right: 5px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(51, 112, 255, 0.05);
    border: 1px solid rgba(51, 112, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(51, 112, 255, 0.1);
    border-radius: 6px;
    animation: slideIn 0.5s ease-out forwards;
    animation-delay: var(--delay, 0s);
    /* slideIn delay, pulse delay (matched to particle arrival) */
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.module-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: refresh-scan 8s infinite;
    animation-delay: var(--pulse-delay, var(--delay, 0s));
}

.module-item:hover {
    background: rgba(51, 112, 255, 0.2);
    transform: translateX(5px);
    border-color: var(--feishu-color);
    box-shadow: 0 0 15px rgba(51, 112, 255, 0.1);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.module-item .name {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes pulse-border {

    0%,
    100% {
        border-left-color: var(--accent-color);
        opacity: 1;
    }

    50% {
        border-left-color: transparent;
        opacity: 0.5;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 15px var(--primary-color));
    }

    50% {
        filter: drop-shadow(0 0 25px var(--primary-color));
    }
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes module-pulse {

    0%,
    100% {
        background: rgba(51, 112, 255, 0.05);
        border-color: rgba(51, 112, 255, 0.1);
        box-shadow: none;
    }

    2% {
        background: rgba(51, 112, 255, 0.15);
        /* Subtle bg change */
        border-color: rgba(51, 112, 255, 0.5);
        /* Subtle border */
        box-shadow: 0 0 10px rgba(51, 112, 255, 0.1);
        /* Very subtle glow */
    }

    10% {
        background: rgba(51, 112, 255, 0.05);
        border-color: rgba(51, 112, 255, 0.1);
    }
}

@keyframes refresh-scan {
    0% {
        transform: translateX(-100%);
    }

    5% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Constellation Network */
.constellation-line {
    stroke: rgba(0, 242, 255, 0.15);
    stroke-width: 0.5;
    fill: none;
    stroke-dasharray: 2, 2;
    filter: drop-shadow(0 0 2px rgba(0, 242, 255, 0.3));
}

.star-node {
    fill: #fff;
    filter: drop-shadow(0 0 4px #fff);
    animation: pulse-node 3s infinite ease-in-out;
}

@keyframes pulse-node {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.data-particle {
    fill: #fff;
    filter: drop-shadow(0 0 4px #00f2ff);
}

/* =========================================
   New Business Architecture Page Styles
   ========================================= */

.ba-stage {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 10px 20px 20px;
    /* Reduced top padding */
    gap: 15px;
}

.connections-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Modules Layer (Top 70%) --- */
.modules-layer {
    flex: 7;
    display: grid;
    grid-template-columns: repeat(13, minmax(140px, 1fr));
    grid-auto-rows: 1fr;
    grid-auto-flow: column;
    gap: 10px;
    padding: 6px 6px 14px;
    z-index: 2;
    overflow: hidden;
}

.modules-track {
    display: flex;
    align-items: stretch;
    width: max-content;
    will-change: transform;
    transition: transform 0.6s ease;
}

.module-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Enhanced Module Card */
.module-card {
    flex: 1;
    min-height: 0;
    /* Allow shrinking */
    padding: 10px 12px;
    gap: 8px;
    position: relative;
    overflow: hidden;

    /* Glassmorphism & Gradient */
    background: linear-gradient(145deg, rgba(20, 30, 48, 0.7), rgba(10, 15, 25, 0.8));
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-top: 1px solid rgba(0, 242, 255, 0.3);
    /* Highlight top border */
    border-radius: 12px;

    backdrop-filter: blur(12px);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 242, 255, 0.02);

    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow:
        0 8px 25px rgba(0, 242, 255, 0.15),
        inset 0 0 20px rgba(0, 242, 255, 0.05);
    transform: translateY(-4px) scale(1.01);
    z-index: 10;
    background: linear-gradient(145deg, rgba(25, 40, 60, 0.8), rgba(15, 25, 40, 0.9));
}

.module-card.active-highlight {
    border-color: var(--accent-color);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.25);
    background: linear-gradient(145deg, rgba(20, 40, 50, 0.9), rgba(10, 25, 35, 0.95));
}

.module-card.scanning::before {
    content: '';
    position: absolute;
    inset: -15%;
    background:
        repeating-linear-gradient(to bottom, rgba(0, 255, 220, 0.1) 0, rgba(0, 255, 220, 0.08) 2px, transparent 8px),
        repeating-linear-gradient(to right, rgba(80, 200, 255, 0.06) 0, rgba(80, 200, 255, 0.04) 2px, transparent 10px);
    mix-blend-mode: screen;
    opacity: 0.9;
    pointer-events: none;
    animation: scan-grid 2.8s linear infinite;
}

.module-card.scanning::after {
    content: '';
    position: absolute;
    inset: -40% -15%;
    background:
        radial-gradient(circle at 50% 10%, rgba(0, 255, 200, 0.16), transparent 45%),
        linear-gradient(to bottom, rgba(0, 255, 200, 0.35), rgba(0, 140, 255, 0.12), rgba(0, 255, 200, 0.08));
    filter: blur(4px);
    animation: scan-beam 2.4s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.95;
}

.module-card.dimmed {
    opacity: 0.4;
    filter: grayscale(0.6) blur(1px);
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.9) 0%, rgba(0, 242, 255, 0.7) 60%, transparent 80%);
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.6), 0 0 14px rgba(0, 242, 255, 0.4);
    flex-shrink: 0;
}

.card-header span {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.6px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    align-content: start;
}

.card-list li {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 4px 2px;
    position: relative;
    line-height: 1.3;
    transition: all 0.2s;

    /* Box Style */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-list li.alert-warning {
    color: #ff9f1c;
    background: rgba(255, 159, 28, 0.12);
    border-color: rgba(255, 159, 28, 0.35);
    box-shadow: 0 0 6px rgba(255, 159, 28, 0.28);
    animation: none;
}

.card-list li.alert-error {
    color: #ff0055;
    background: rgba(255, 0, 85, 0.12);
    border-color: rgba(255, 0, 85, 0.35);
    box-shadow: 0 0 7px rgba(255, 0, 85, 0.25);
    animation: none;
}

.card-list li.alert-ok {
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.1);
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 6px rgba(0, 255, 157, 0.22);
    animation: none;
}

.card-list li::before {
    display: none;
    /* Remove bullet points */
}

.module-card:hover .card-list li {
    color: #fff;
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 5px rgba(0, 242, 255, 0.1);
}

/* --- Department Layer (Bottom 30%) --- */
.dept-layer {
    flex: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    /* Tighter gap for more items */
    padding: 15px 30px;

    /* Base Platform Look */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 20, 40, 0.4) 100%);
    border-radius: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.dept-separator {
    width: 1px;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 0 15px;
}

.dept-slot {
    position: relative;
    width: 100px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    /* Slot Style */
    background: rgba(16, 24, 39, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 10px;

    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    overflow: hidden;
}

/* Bottom Glow Bar */
.dept-slot::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 -2px 10px var(--primary-color);
    opacity: 0.3;
    transition: all 0.3s;
}

.dept-slot:hover,
.dept-slot.active-highlight {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    background: rgba(16, 24, 39, 0.8);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 242, 255, 0.15);
}

.dept-slot:hover::after,
.dept-slot.active-highlight::after {
    opacity: 1;
    height: 4px;
    box-shadow: 0 -4px 15px var(--primary-color);
}

.dept-slot.dimmed {
    opacity: 0.3;
    transform: scale(0.95);
}

.dept-icon {
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: all 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.dept-icon svg {
    width: 1.8rem;
    height: 1.2rem;
}

.dept-slot:hover .dept-icon,
.dept-slot.active-highlight .dept-icon {
    color: #fff;
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--primary-color));
}

.dept-slot span {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.2;
    padding: 0 5px;
}

.dept-slot:hover span,
.dept-slot.active-highlight span {
    color: #fff;
}

.slot-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.dept-slot:hover .slot-glow,
.dept-slot.active-highlight .slot-glow {
    opacity: 1;
}

/* --- SVG Lines --- */
.connection-line {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 1.5;
    /* Thinner, more elegant lines */
    stroke-dasharray: 8;
    opacity: 0;
    transition: opacity 0.3s;
    filter: drop-shadow(0 0 4px var(--primary-color));
}

.connection-line.active {
    opacity: 0.8;
    animation: dash-flow 0.8s linear infinite;
    /* Faster flow */
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -16;
        /* Match dasharray * 2 */
    }
}

@keyframes scan-sweep {
    from {
        transform: translateY(-65%) skewY(-1deg);
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
    to {
        transform: translateY(65%) skewY(-1deg);
        opacity: 0.9;
    }
}

@keyframes scan-grid {
    from {
        transform: translateY(-20%);
    }
    to {
        transform: translateY(20%);
    }
}

@keyframes scan-beam {
    from {
        transform: translateY(-75%) scaleY(0.9);
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
    to {
        transform: translateY(75%) scaleY(1.05);
        opacity: 0.9;
    }
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 3px rgba(240, 213, 138, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 10px rgba(240, 213, 138, 0.5);
        transform: scale(1.015);
    }
    100% {
        box-shadow: 0 0 3px rgba(240, 213, 138, 0.3);
        transform: scale(1);
    }
}

@keyframes pulse-error {
    0% {
        box-shadow: 0 0 4px rgba(255, 138, 128, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 138, 128, 0.55);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 4px rgba(255, 138, 128, 0.3);
        transform: scale(1);
    }
}
