/* Mawhiba Animated Brain & Neural Knowledge Feeds */
.brain-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.brain-art {
    flex: none;
    width: 100%;
    max-width: min(880px, calc((100svh - 90px) * 1.15));
    aspect-ratio: 900 / 760;
    position: relative;
    margin: auto;
}

.brain-scene {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* External & Lateral Knowledge Feed Buttons */
.source {
    position: absolute;
    transform: translateY(-50%);
    width: 22%;
    text-align: right;
    direction: rtl;
    background: linear-gradient(110deg, rgba(6, 26, 22, 0.92), rgba(3, 18, 14, 0.95));
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
    border-radius: 12px;
    color: #e2f4ed;
    padding: 9px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.source:hover, .source.active {
    color: #ffffff;
    border-color: var(--c);
    box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent);
    transform: translateY(-50%) scale(1.03);
}

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

.source .symbol {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 15%, transparent);
    border-radius: 8px;
    flex: none;
}

.source svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

.source strong {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source small {
    display: block;
    font-size: 9px;
    color: #8daaa0;
    margin-top: 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source.left {
    left: 0.5%;
}

.source.right {
    right: 0.5%;
}

/* External top & bottom source pills */
.source.external-source {
    width: 26%;
    padding: 7px 10px;
    text-align: center;
}

.source.external-source .row {
    justify-content: center;
}

.source.external-source strong {
    font-size: 10px;
}

.source-heading {
    position: absolute;
    top: 4px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #5eead4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Motion control toggle */
.motion-toggle {
    position: absolute;
    top: 14px;
    left: 16px;
    background: rgba(6, 78, 59, 0.4);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    z-index: 20;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.motion-toggle:hover {
    background: rgba(6, 78, 59, 0.8);
    color: #ffffff;
    border-color: rgba(52, 211, 153, 0.5);
}

@media (max-width: 1023px) {
    .source strong { font-size: 10px; }
    .source small { display: none; }
    .source .symbol { width: 20px; height: 20px; }
    .source svg { width: 13px; height: 13px; }
}

@media (max-width: 639px) {
    .source { padding: 5px 6px; width: 30%; }
    .source strong { font-size: 8px; }
    .source.external-source { display: none; }
}
