/* ===== Liquidity vessel (lab sample) view ===== */

.viz-switch { display: flex; gap: 8px; margin: 0 0 12px; }
.viz-btn {
    cursor: pointer; font-family: 'Rajdhani', sans-serif; font-weight: 800;
    font-size: 0.84rem; letter-spacing: 0.6px; text-transform: uppercase;
    padding: 6px 14px; border-radius: 20px;
    color: #9fb2c6; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.18s ease;
}
.viz-btn:hover { color: #fff; border-color: rgba(0, 213, 255, 0.45); }
.viz-btn.active {
    color: #04150a; background: linear-gradient(135deg, #00ff41, #00d5ff);
    border-color: transparent; box-shadow: 0 0 16px rgba(0, 255, 65, 0.35);
}

.vessel-block {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
    align-items: center;
    margin-bottom: 14px;
}

.vessel-stage { position: relative; display: flex; align-items: flex-end; gap: 12px; padding: 8px 0 4px; }

.vessel-scale {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 300px; padding: 2px 0; font-family: 'Rajdhani', monospace;
}
.vessel-mark { display: flex; align-items: center; gap: 5px; font-size: 0.66rem; color: #7d8fa1; }
.vessel-mark i { display: block; width: 9px; height: 1px; background: rgba(255, 255, 255, 0.28); }

.vessel-jar { position: relative; width: 132px; }
.vessel-neck {
    width: 74px; height: 16px; margin: 0 auto -1px;
    border: 2px solid rgba(190, 225, 255, 0.4);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, rgba(190, 225, 255, 0.14), rgba(190, 225, 255, 0.03));
}
.vessel-glass {
    position: relative;
    height: 300px;
    border: 2px solid rgba(190, 225, 255, 0.42);
    border-top: 2px solid rgba(190, 225, 255, 0.22);
    border-radius: 12px 12px 26px 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(160, 200, 255, 0.07));
    box-shadow: inset 0 0 26px rgba(140, 200, 255, 0.16), 0 18px 34px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backdrop-filter: blur(2px);
}
.vessel-base {
    width: 150px; height: 10px; margin: -2px auto 0;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(180deg, rgba(190, 225, 255, 0.28), rgba(190, 225, 255, 0.06));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

.vessel-liquid {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column-reverse;
    height: 100%;
    transform-origin: bottom;
}
.vessel-liquid.vessel-fill { animation: vesselPour 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vesselPour {
    from { transform: scaleY(0.02); opacity: 0.4; }
    to { transform: scaleY(1); opacity: 1; }
}

.vessel-layer {
    position: relative;
    flex: 0 0 auto;
    min-height: 3px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--lc) 78%, transparent),
        color-mix(in srgb, var(--lc) 46%, transparent));
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--lc) 40%, transparent);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .vessel-layer { background: var(--lc); opacity: 0.72; }
}
.vessel-layer.active { filter: brightness(1.25) saturate(1.2); box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.35); }
.vessel-layer-top {
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: vesselWave 3.4s ease-in-out infinite;
}
@keyframes vesselWave {
    0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.5; }
    50% { transform: translateY(1.5px) scaleX(1.04); opacity: 0.9; }
}
.vessel-layer-inner { display: flex; align-items: center; gap: 6px; z-index: 2; padding: 0 6px; }
.vessel-layer-txt {
    font-family: 'Rajdhani', sans-serif; font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.4px; color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px;
}
.vessel-ico {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    object-fit: contain; flex: 0 0 18px;
}
.vessel-ico.sm { width: 15px; height: 15px; flex: 0 0 15px; }
.vessel-ico-txt {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.56rem; font-weight: 800; color: #fff; letter-spacing: -0.2px;
}

.vessel-bubble {
    position: absolute; bottom: -6px;
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
    animation: vesselBubble 4.5s linear infinite;
    opacity: 0;
}
.vessel-bubble.b1 { left: 22%; animation-duration: 5s; animation-delay: 0.2s; }
.vessel-bubble.b2 { left: 52%; width: 4px; height: 4px; animation-duration: 6.5s; animation-delay: 1.6s; }
.vessel-bubble.b3 { left: 78%; width: 8px; height: 8px; animation-duration: 7.5s; animation-delay: 3s; }
@keyframes vesselBubble {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    12% { opacity: 0.85; }
    100% { transform: translateY(-300px) scale(1.15); opacity: 0; }
}

.vessel-shine {
    position: absolute; top: 0; bottom: 0; left: 12px; width: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04));
    border-radius: 12px; filter: blur(1px); pointer-events: none;
}
.vessel-gloss {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 42%);
}

.vessel-total { position: absolute; right: -4px; bottom: 16px; text-align: right; }
.vessel-total b { display: block; font-family: 'Rajdhani', monospace; font-size: 1.18rem; color: #fff; }
.vessel-total span { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.8px; color: #7d8fa1; }

.vessel-side { min-width: 0; }
.vessel-legend { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; max-height: 250px; overflow-y: auto; }
.vessel-legend-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 9px; border-radius: 8px; cursor: pointer;
    background: rgba(255, 255, 255, 0.03); border: 1px solid transparent;
    transition: all 0.16s ease;
}
.vessel-legend-item:hover, .vessel-legend-item.active {
    background: rgba(255, 255, 255, 0.08); border-color: rgba(0, 213, 255, 0.35);
}
.vessel-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.vessel-legend-label {
    flex: 1; min-width: 0; font-size: 0.8rem; color: #dbe6f0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vessel-legend-val { font-family: 'Rajdhani', monospace; font-size: 0.8rem; color: #9fe8ff; font-weight: 700; }

@media (max-width: 820px) {
    .vessel-block { grid-template-columns: 1fr; justify-items: center; }
    .vessel-side { width: 100%; }
    .vessel-total { position: static; text-align: center; margin-top: 8px; }
}

/* ===== canvas starfield layer ===== */
#starCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.95;
}
