@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --bg: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --border: rgba(255, 255, 255, 0.07);
    --amber: #f59e0b;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --green: #4ade80;
    --purple: #a855f7;
    --red: #f87171;
    --text: #f8fafc;
    --muted: #64748b;
    --data-bus: #22d3ee;
    --addr-bus: #a855f7;
    --ctrl-bus: #fbbf24;
}

#phet-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    transform-origin: top left;
    touch-action: none;
    /* Disable browser gestures for Bionic Scaling */
}

body.sim-page {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: none;
    /* Force zero-latency for Bionic Engine interactions */
}

/* --- PREMIUM SCIENCE-SIM NAVIGATION --- */
.sim-nav {
    position: relative !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 2rem;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 200;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.sim-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
    color: #f59e0b;
}

.logo-thin {
    font-weight: 300;
}

.nav-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.nav-breadcrumbs a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.2s;
}

.nav-breadcrumbs a:hover {
    color: #fff;
}

.nav-breadcrumbs .sep {
    opacity: 0.3;
    color: #fff;
}

.nav-breadcrumbs .current {
    font-weight: 700;
    color: #fff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

/* MAIN */
.sim-main {
    flex: 1;
    padding: 10px 16px 20px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

/* BANNER */
.analogy-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.banner-icons {
    font-size: 1.3rem;
    flex-shrink: 0;
    letter-spacing: 0.2rem;
}

.banner-text {
    flex: 1;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.45;
    min-width: 200px;
}

.banner-text strong {
    color: var(--text);
}

.banner-text em {
    color: var(--amber);
    font-style: normal;
    font-weight: 700;
}

.guided-btn {
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #020617;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: 0.3s;
    flex-shrink: 0;
    font-family: inherit;
}

.guided-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

/* SCENARIO BAR */
.scenario-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 0.9rem;
}

.bar-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.sc-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.25rem 0.7rem;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.sc-btn:hover {
    border-color: var(--amber);
    color: var(--amber);
}

.sc-btn.active {
    background: var(--amber);
    border-color: var(--amber);
    color: #020617;
}

.ctrl-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.ctrl-btn.step {
    background: var(--blue);
    color: #fff;
}

.ctrl-btn.step:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.ctrl-btn.auto {
    background: var(--green);
    color: #020617;
}

.ctrl-btn.auto:hover {
    background: #22c55e;
    transform: translateY(-1px);
}

.ctrl-btn.reset {
    background: rgba(248, 113, 113, 0.1);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.ctrl-btn.reset:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* SIM LAYOUT */
.sim-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0.7rem;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* DIAGRAM WRAP — FULLY ISOLATED — no child can expand this */
.diagram-wrap {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: stretch;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    contain: layout size;
    /* isolate: children cannot affect this element's size */
}


/* IO ROW — top strip, hard-locked to parent width */
.io-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem 0.5rem;
    z-index: 2;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.input-group,
.output-group {
    display: flex;
    gap: 0.5rem;
}

/* BUS SPINE — fixed height, fixed width, no layout changes on active */
.bus-spine {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    margin: 0 0.5rem;
    z-index: 1;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2px 0;
    min-height: 66px;
    max-height: 66px;
    overflow: hidden;
    /* no child can expand this */
    box-sizing: border-box;
    width: calc(100% - 1rem);
    /* match the margin */
}

/* Individual bus lane */
.bus-lane {
    display: flex;
    align-items: center;
    gap: 0;
    height: 22px;
    /* fixed — never changes */
    position: relative;
    transition: background 0.25s;
    border-radius: 3px;
    flex-shrink: 0;
}

.bus-lane.active {
    background: rgba(255, 255, 255, 0.03);
}

/* Left label — flexible, shrinks on narrow viewports */
.lane-label {
    font-size: 0.6rem;
    font-weight: 800;
    flex: 0 0 96px;
    /* fixed flex-basis, not min-width */
    text-align: right;
    padding-right: 0.5rem;
    letter-spacing: 0.3px;
    opacity: 0.55;
    transition: opacity 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.bus-lane.active .lane-label {
    opacity: 1;
}

.ctrl-lbl {
    color: var(--ctrl-bus);
}

.data-lbl {
    color: var(--data-bus);
}

.addr-lbl {
    color: var(--addr-bus);
}

/* The track line — FIXED height, no layout changes on active */
.lane-track {
    flex: 1;
    height: 2px;
    /* stays 2px always — no layout shift */
    border-radius: 1px;
    opacity: 0.25;
    transition: opacity 0.25s, box-shadow 0.25s;
}

.ctrl-track {
    background: var(--ctrl-bus);
}

.data-track {
    background: var(--data-bus);
}

.addr-track {
    background: var(--addr-bus);
}

/* Active: only opacity + glow — NO height/size change */
.bus-lane.active .lane-track {
    opacity: 1;
}

.bus-lane.active .ctrl-track {
    box-shadow: 0 0 8px var(--ctrl-bus), 0 0 16px rgba(251, 191, 36, 0.25);
}

.bus-lane.active .data-track {
    box-shadow: 0 0 8px var(--data-bus), 0 0 16px rgba(34, 211, 238, 0.25);
}

.bus-lane.active .addr-track {
    box-shadow: 0 0 8px var(--addr-bus), 0 0 16px rgba(168, 85, 247, 0.25);
}

/* Right desc — flexible */
.lane-desc {
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--muted);
    flex: 0 0 160px;
    /* fixed flex-basis, not min-width */
    padding-left: 0.5rem;
    opacity: 0.4;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}

.bus-lane.active .lane-desc {
    opacity: 0.9;
    color: var(--text);
}

/* Remove old bus-spine-label */
.bus-spine-label {
    display: none;
}

/* COMP BOXES */
.comp-box {
    position: relative;
    z-index: 2;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.comp-box.active {
    border-color: var(--amber);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
}

.comp-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 1.4rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
    min-width: 82px;
    text-align: center;
}

.comp-chip span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
}

.comp-chip.active {
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}

.bus-legend-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.bus-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.data-bus-badge {
    background: rgba(34, 211, 238, 0.12);
    color: var(--data-bus);
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.addr-bus-badge {
    background: rgba(168, 85, 247, 0.12);
    color: var(--addr-bus);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.ctrl-bus-badge {
    background: rgba(251, 191, 36, 0.12);
    color: var(--ctrl-bus);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* CORE ROW — fixed to parent width, never expands */
.core-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem 1rem;
    flex: 1;
    z-index: 2;
    position: relative;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* CPU BOX */
.cpu-box {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    min-width: 150px;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
}

.cpu-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue);
}

.cpu-internals {
    display: flex;
    gap: 0.3rem;
    width: 100%;
}

.cpu-part {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.3rem 0.2rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    transition: all 0.3s;
}

.cpu-part.active {
    background: rgba(59, 130, 246, 0.45);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    /* NO transform: scale — it was pushing the core-row wider */
}

.ram-box {
    flex-direction: column;
    padding: 0.75rem 1.1rem;
    min-width: 110px;
    font-size: 1.6rem;
    text-align: center;
    border-color: rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.05);
}

.storage-box {
    flex-direction: column;
    padding: 0.75rem 1.1rem;
    min-width: 110px;
    font-size: 1.6rem;
    text-align: center;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.04);
}

.comp-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text);
    margin-top: 0.2rem;
}

.comp-sub {
    font-size: 0.62rem;
    color: var(--muted);
}

/* DATA PACKETS LAYER */
#packets-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.data-pkt {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    /* CSS transition matches JS moveTo duration */
    transition: left 0.5s ease-in-out, top 0.5s ease-in-out;
    transform: translate(-50%, -50%);
    z-index: 20;
    overflow: visible;
}

/* Floating bus label — clipped by packets-layer, no layout impact */
.pkt-label {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.58rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: rgba(2, 6, 23, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
    pointer-events: none;
    z-index: 30;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* RIGHT PANEL */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
}

.right-panel::-webkit-scrollbar {
    width: 2px;
}

.right-panel::-webkit-scrollbar-thumb {
    background: #334155;
}

/* PANEL BOX */
.panel-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 0.65rem 0.8rem;
}

.panel-title {
    font-size: 0.67rem;
    font-weight: 800;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

/* STEP LIST */
.step-list-ui {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.step-ui-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.step-ui-item.done {
    color: var(--green);
}

.step-ui-item.current {
    color: var(--text);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.step-ui-item.pending {
    opacity: 0.45;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
}

/* EXPLAIN BOX */
.explain-body {
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.55;
}

.explain-body strong {
    color: var(--text);
}

.explain-body .hl-d {
    color: var(--cyan);
    font-weight: 700;
}

.explain-body .hl-a {
    color: var(--purple);
    font-weight: 700;
}

.explain-body .hl-c {
    color: var(--amber);
    font-weight: 700;
}

.explain-body .hl-g {
    color: var(--green);
    font-weight: 700;
}

/* BUS ACTIVITY */
.bus-info-idle {
    font-size: 0.75rem;
    color: var(--muted);
}

.bus-active {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
}

.bus-data {
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.bus-addr {
    background: rgba(168, 85, 247, 0.1);
    color: var(--purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.bus-ctrl {
    background: rgba(251, 191, 36, 0.1);
    color: var(--amber);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.bus-multi {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid var(--border);
}

/* LOG */
.log-body {
    overflow-y: auto;
    max-height: 130px;
    margin-top: 0.35rem;
}

.log-body::-webkit-scrollbar {
    width: 2px;
}

.log-body::-webkit-scrollbar-thumb {
    background: #334155;
}

.log-entry {
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.18rem 0.3rem;
    border-radius: 4px;
    margin-bottom: 2px;
    line-height: 1.4;
}

.log-data {
    color: var(--cyan);
}

.log-addr {
    color: var(--purple);
}

.log-ctrl {
    color: var(--amber);
}

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

.log-ok {
    color: var(--green);
}

/* INFO MODAL */
.info-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: mfade 0.25s ease;
}

.info-modal-overlay.hidden {
    display: none;
}

@keyframes mfade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.info-modal-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 22px;
    padding: 1.6rem;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    animation: mslide 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mslide {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.info-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
}

.info-modal-close:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.info-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-modal-icon {
    font-size: 2rem;
}

.info-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.info-modal-subtitle {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.why-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.why-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.26rem 0.7rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.why-tab:hover {
    color: var(--amber);
    border-color: var(--amber);
}

.why-tab.active {
    background: var(--amber);
    border-color: var(--amber);
    color: #020617;
}

.why-section {
    display: none;
}

.why-section.active {
    display: block;
}

.why-section p {
    font-size: 0.83rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 0.55rem;
}

.why-section p strong {
    color: var(--text);
}

.modal-big-analogy {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
    margin-bottom: 0.7rem;
}

.modal-big-analogy p {
    color: var(--text);
    font-size: 0.88rem;
    margin: 0;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.5rem 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.79rem;
    color: #94a3b8;
    line-height: 1.5;
}

.step-num {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.step-item strong {
    color: var(--text);
}

.info-modal-box::-webkit-scrollbar {
    width: 3px;
}

.info-modal-box::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}



/* GUIDED DEMO OVERLAY */
.demo-overlay {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 100%;
    max-width: 480px;
    padding: 0 16px;
    animation: demo-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes demo-up {
    from {
        transform: translateX(-50%) translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.demo-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    padding: 1.1rem 1.4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.demo-step-ind {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--amber);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.demo-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.demo-body {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 0.9rem;
}

.demo-body strong {
    color: var(--text);
}

.demo-actions {
    display: flex;
    gap: 0.7rem;
}