/* ==========================================================================
   VIBECODING ANIMATION (HOME ROUTES)
   ========================================================================== */
.vibecoding-animation-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 15%;
    overflow: hidden;
}

.vibecoding-wrap {
    --acc: #E8590C;
    --acc-dim: rgba(232, 89, 12, 0.13);
    --mon: #1a1a2e;
    --mbar: #252540;
    --mbr: #3a3a5c;
    --scr: #0f0f1e;
    --desk: #111128;
    --tbar-c: #1c1c38;
    --ico: #252545;
    --icob: #3a3a6a;
    --win: #141428;
    --wbar: #1e1e3c;
    --wbr: #333358;
    --ntf: #1e1e3a;
    --cmuted: #546e7a;
    --ctxt: #d0d0d0;
    --res-bg: #0d2a1a;
    --res-br: #1a5c30;
    --res-tx: #c3e88d;
    --res-lb: #3CA859;
    --boot-tx: #4a9eff;
    --lb: #fff;
    --send-bg: #1a3a1a;
    --send-br: #2a6a2a;
    --send-tx: #7de87d;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    
    /* 340px * 1.35 ~= 459px — это около 70% от квадрата шириной ~653px */
    transform: scale(1.35);
    transform-origin: center center;
}

@media (max-width: 1440px) {
    .vibecoding-wrap {
        transform: scale(1.28);
    }
}

@media (max-width: 1200px) {
    .vibecoding-wrap {
        transform: scale(1.18);
    }
}

@media (max-width: 1024px) {
    .vibecoding-animation-container {
        padding: 11%;
    }

    .vibecoding-wrap {
        transform: scale(1.24);
    }
}

@media (max-width: 768px) {
    .vibecoding-animation-container {
        padding: 8%;
    }

    .vibecoding-wrap {
        transform: scale(1.08);
    }
}

@media (max-width: 480px) {
    .vibecoding-animation-container {
        padding: 5%;
    }

    .vibecoding-wrap {
        transform: scale(0.92);
    }
}

html[data-theme="light"] .vibecoding-wrap {
    --mon: #ccc;
    --mbar: #b5b4ad;
    --mbr: #999;
    --scr: #f0efe8;
    --desk: #e5e4dc;
    --tbar-c: #d0cfca;
    --ico: #fff;
    --icob: #ccc;
    --win: #fafaf8;
    --wbar: #e8e8e6;
    --wbr: #d0d0ca;
    --ntf: #fff;
    --cmuted: #999;
    --ctxt: #222;
    --res-bg: #eaf7ef;
    --res-br: #7dca96;
    --res-tx: #1a6b35;
    --res-lb: #2a9a50;
    --boot-tx: #1a6bcc;
    --lb: #111;
    --send-bg: #eafaea;
    --send-br: #7dca7d;
    --send-tx: #1a6b1a;
    --acc: #E8590C;
}

.vibecoding-monitor {
    width: 340px;
    background: var(--mon);
    border-radius: 12px 12px 5px 5px;
    border: 2px solid var(--mbr);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.vibecoding-mbar {
    background: var(--mbar);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--mbr);
}

.vibecoding-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vibecoding-dr { background: #E04040; }
.vibecoding-dy { background: #E8A000; }
.vibecoding-dg { background: #3CA859; }

.vibecoding-mtitle {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    color: var(--cmuted);
    margin-left: 5px;
}

.vibecoding-lb { color: var(--lb); font-weight: 700; }
.vibecoding-lo { color: var(--acc); font-weight: 700; }

.vibecoding-screen {
    background: var(--scr);
    height: 320px;
    position: relative;
    overflow: hidden;
}

.vibecoding-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.vibecoding-layer.on { opacity: 1; }

/* BOOT */
#vibecoding-lBoot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--scr);
    z-index: 9;
}

.vibecoding-blogo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .05em;
    margin-bottom: 16px;
}

.vibecoding-bbw {
    width: 140px;
    height: 3px;
    background: var(--mbr);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.vibecoding-bbf {
    height: 100%;
    background: var(--acc);
    border-radius: 2px;
    width: 0;
    transition: width 2.2s ease;
}

.vibecoding-bbtx {
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    color: var(--boot-tx);
}

/* DESKTOP */
#vibecoding-lDesk { background: var(--desk); }

.vibecoding-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vibecoding-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 40px;
}

.vibecoding-ibox {
    width: 28px;
    height: 28px;
    background: var(--ico);
    border: 1px solid var(--icob);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.vibecoding-ilb {
    font-family: var(--font-mono, monospace);
    font-size: 7px;
    color: var(--cmuted);
    text-align: center;
}

.vibecoding-tbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: var(--tbar-c);
    border-top: 1px solid var(--mbr);
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.vibecoding-tclk {
    margin-left: auto;
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    color: var(--cmuted);
}

.vibecoding-ntf {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 140px;
    background: var(--ntf);
    border: 1px solid var(--mbr);
    border-radius: 7px;
    padding: 8px 10px;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .4s, transform .4s;
}

.vibecoding-ntf.show {
    opacity: 1;
    transform: translateX(0);
}

.vibecoding-nh {
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    color: var(--acc);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 3px;
}

.vibecoding-ndot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--acc);
}

.vibecoding-ntitle {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    font-weight: 500;
    color: var(--ctxt);
    margin-bottom: 1px;
}

.vibecoding-nsub {
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    color: var(--cmuted);
    margin-bottom: 5px;
}

.vibecoding-nbtn {
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    color: var(--acc);
    border: 1px solid var(--acc);
    border-radius: 4px;
    padding: 2px 7px;
    background: var(--acc-dim);
    display: inline-block;
    transition: transform .1s, background .1s;
}

.vibecoding-nbtn.pressed {
    transform: scale(.94);
    background: rgba(232, 89, 12, .3);
}

/* APP */
#vibecoding-lApp { background: var(--win); }

.vibecoding-wbar {
    background: var(--wbar);
    padding: 6px 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid var(--wbr);
}

.vibecoding-wtitle {
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    color: var(--cmuted);
    margin-left: 3px;
}

.vibecoding-wc { padding: 9px 13px; }

.vibecoding-wtabs {
    display: flex;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--wbr);
}

.vibecoding-wtab {
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    padding: 3px 8px;
    color: var(--cmuted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.vibecoding-wtab.active {
    color: var(--acc);
    border-bottom-color: var(--acc);
}

.vibecoding-cbox {
    height: 108px;
    overflow: hidden;
}

.vibecoding-cl {
    font-family: var(--font-mono, monospace);
    font-size: 10.5px;
    line-height: 1.7;
    white-space: pre;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
}

.vibecoding-kw { color: #c792ea; }
.vibecoding-fn { color: #82aaff; }
.vibecoding-str { color: #c3e88d; }
.vibecoding-cm2 { color: #546e7a; }
.vibecoding-pl { color: #89ddff; }
.vibecoding-tx { color: var(--ctxt); }

html[data-theme="light"] .vibecoding-kw { color: #7c3aed !important; }
html[data-theme="light"] .vibecoding-fn { color: #1d4ed8 !important; }
html[data-theme="light"] .vibecoding-str { color: #15803d !important; }
html[data-theme="light"] .vibecoding-cm2 { color: #aaa !important; }
html[data-theme="light"] .vibecoding-pl { color: #0369a1 !important; }

.vibecoding-caret {
    display: inline-block;
    width: 5px;
    height: 12px;
    background: var(--acc);
    border-radius: 1px;
    vertical-align: middle;
    opacity: 0;
}

.vibecoding-caret.blink {
    animation: vibecoding-cb .85s step-end infinite;
}

@keyframes vibecoding-cb {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes vibecoding-tyIn {
    from { max-width: 0; opacity: 1; }
    to { max-width: 300px; opacity: 1; }
}

.vibecoding-resbox {
    margin-top: 6px;
    background: var(--res-bg);
    border: 1px solid var(--res-br);
    border-radius: 5px;
    padding: 6px 10px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .4s, transform .4s;
    font-family: var(--font-mono, monospace);
}

.vibecoding-resbox.show {
    opacity: 1;
    transform: translateY(0);
}

.vibecoding-rlb {
    color: var(--res-lb);
    font-size: 8px;
    margin-bottom: 2px;
    letter-spacing: .05em;
}

.vibecoding-rtx {
    color: var(--res-tx);
    font-size: 10px;
    font-weight: 500;
}

.vibecoding-sendrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 7px;
    opacity: 0;
    transition: opacity .3s;
}

.vibecoding-sendrow.show { opacity: 1; }

.vibecoding-sendbtn {
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    color: var(--send-tx);
    border: 1px solid var(--send-br);
    border-radius: 4px;
    padding: 3px 9px;
    background: var(--send-bg);
    transition: transform .1s, background .1s;
    white-space: nowrap;
}

.vibecoding-sendbtn.pressed {
    transform: scale(.94);
    background: rgba(40, 160, 40, .25);
}

/* CURSOR */
#vibecoding-cur {
    position: absolute;
    z-index: 20;
    pointer-events: none;
    transition: left .6s cubic-bezier(.4, 0, .2, 1), top .6s cubic-bezier(.4, 0, .2, 1);
    opacity: 0;
}

#vibecoding-cur svg {
    filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, .35));
}

.vibecoding-stand {
    width: 80px;
    height: 12px;
    background: var(--mbar);
    border-radius: 0 0 4px 4px;
    margin: 0 auto;
    border: 2px solid var(--mbr);
    border-top: none;
}

.vibecoding-base {
    width: 130px;
    height: 7px;
    background: var(--mon);
    border-radius: 4px;
    margin: 0 auto;
    border: 1.5px solid var(--mbr);
}

/* Скрытие старых стилей для automation блока */
.route-visual-shell .route-grid-backdrop,
.automation-flow-line,
.automation-node,
.automation-metric {
    display: none !important;
}