.chat-window {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.6em;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    max-height: 500px;
}

.chat-msg {
    margin-bottom: 10px;
    padding: 7px;
    border-radius: 8px;
    clear: both;
    animation: fadeIn 0.3s ease-in;
}

.msg-user {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    float: right;
    max-width: 70%;
    font-weight: bold;
}

.msg-ai {
    background: #2d3436;
    color: #fff;
    float: left;
    max-width: 80%;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.tip-banner {
    background: #000;
    border-left: 5px solid rgba(255, 255, 255, 0.5);
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    font-size: 0.7em;
    border-radius: 4px;
}

.tip-banner strong {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 10px;
}

/* Pyramid Structure */
.pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pyramid-layer {
    padding: 15px 30px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.pyramid-layer:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.pyramid-layer strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pyramid-layer span {
    font-size: 0.7em;
    line-height: 1.4;
    display: block;
}

.layer-top {
    width: 400px;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
}

.layer-mid {
    width: 600px;
    background: #2d3436;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.layer-base {
    width: 800px;
    background: #2d3436;
    border: 1px solid #636e72;
    color: #fff;
}


/* Mindmap Structure */
.mindmap-container {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mindmap-center {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    padding: 20px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2em;
    z-index: 10;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mindmap-top {
    position: absolute;
    top: -50px;
}

/* Focus Animation for OpenSpec */
.mindmap-container:has(.focus-target.current-fragment) .mindmap-node:not(.focus-target),
.mindmap-container:has(.focus-target.current-fragment) .mindmap-center {
    opacity: 0.05 !important;
    filter: blur(8px);
    pointer-events: none;
}

.mindmap-node.focus-target.current-fragment {
    transform: translate(0, 0) scale(1.8) !important;
    z-index: 100 !important;
    background: #353b48 !important;
    border-color: #fff !important;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.5) !important;
}

.mindmap-node {
    position: absolute;
    background: #2d3436;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Use variables for translation to prevent jumping on hover */
    transform: translate(var(--tx, 0), var(--ty, 0));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease,
        background 0.3s ease;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    z-index: 5;
}

.mindmap-node:hover {
    /* Combine original translation with scale */
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.1);
    background: #353b48;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 20;
    border-color: #fff;
}

.mindmap-node .logo {
    font-size: 2em;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Custom Augment "Robo-Braces" Logo */
.augment-logo {
    width: 40px;
    height: 30px;
    position: relative;
    border-left: 3px solid #636e72;
    border-right: 3px solid #636e72;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 5px;
}

.augment-logo::before,
.augment-logo::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 3px;
    background: #636e72;
    top: -8px;
}

.augment-logo::before {
    left: 10px;
}

.augment-logo::after {
    right: 10px;
}

.augment-eye {
    width: 6px;
    height: 6px;
    background: #636e72;
    border-radius: 50%;
}

.mindmap-node:hover .augment-logo {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: transparent;
}

.mindmap-node:hover .augment-eye,
.mindmap-node:hover .augment-logo::before,
.mindmap-node:hover .augment-logo::after {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Custom Spec Kit "Sprout" Logo (Official Design) */
.speckit-logo {
    width: 36px;
    height: 36px;
    position: relative;
    background: linear-gradient(135deg, #ff00ff, #0000ff);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Soil Dome */
.speckit-logo::before {
    content: "";
    position: absolute;
    bottom: -5px;
    width: 24px;
    height: 12px;
    background: #5d4037;
    border-radius: 50% 50% 0 0;
    z-index: 1;
}

/* The Sprout Container */
.speckit-logo::after {
    content: "";
    z-index: 2;
}


/* For a more precise "Sprout" look if emoji isn't liked, we use a custom shape */
.speckit-sprout {
    position: absolute;
    width: 4px;
    height: 14px;
    background: #76ff03;
    bottom: 6px;
    z-index: 2;
    border-radius: 2px;
}

.speckit-sprout::before,
.speckit-sprout::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #76ff03;
    border-radius: 100% 0% 100% 0%;
    transform: rotate(45deg);
}

.speckit-sprout::before {
    left: -10px;
    top: 0;
    border-radius: 0% 100% 0% 100%;
}

.speckit-sprout::after {
    right: -8px;
    top: 2px;
    width: 8px;
    height: 8px;
}

.mindmap-node:hover .speckit-logo {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}


/* Custom Cursor Hexagon Logo */
.cursor-logo {
    width: 35px;
    height: 35px;
    position: relative;
    background: #636e72;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cursor-logo::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid #fff;
    transform: rotate(45deg) translate(2px, -2px);
}

.mindmap-node:hover .cursor-logo {
    background-color: rgba(255, 255, 255, 0.25);
}

.mindmap-node:hover .cursor-logo::after {
    border-bottom-color: #000;
}

/* Custom Kiro "Ghost" Logo */
.kiro-logo {
    width: 30px;
    height: 32px;
    background: #fff;
    border-radius: 15px 15px 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.kiro-logo::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 8px;
    background-image: radial-gradient(circle at 50% 0%, #fff 40%, transparent 45%);
    background-size: 10px 10px;
    background-repeat: repeat-x;
}

.kiro-logo .kiro-eyes {
    display: flex;
    gap: 4px;
    margin-top: -8px;
}

.kiro-logo .kiro-eye {
    width: 4px;
    height: 7px;
    background: #000;
    border-radius: 50%;
}

.mindmap-node:hover .kiro-logo {
    background-color: rgba(255, 255, 255, 0.25);
}

.mindmap-node:hover .kiro-logo::after {
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.4) 40%, transparent 45%);
}

.mindmap-node:hover .kiro-eye {
    background-color: #000;
}

/* Custom OpenSpec "Octo-O" Logo */
.openspec-logo {
    width: 32px;
    height: 32px;
    position: relative;
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.openspec-logo::after {
    content: "";
    width: 14px;
    height: 18px;
    background: #2d3436;
    clip-path: inherit;
}

.mindmap-node:hover .openspec-logo {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.mindmap-node:hover .openspec-logo::after {
    background-color: #353b48;
}






.mindmap-node a {
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.9em;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mindmap-node a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Node Positions using CSS Variables */
.node-1 {
    --tx: -300px;
    --ty: -150px;
}

.node-2 {
    --tx: 300px;
    --ty: -150px;
}

.node-3 {
    --tx: -350px;
    --ty: 100px;
}

.node-4 {
    --tx: 350px;
    --ty: 100px;
}

.node-5 {
    --tx: 0px;
    --ty: 200px;
}

/* SVG Connectors - handled by absolute positioning if we want real lines, 
/* Profile Image for About Me */
.profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: left;
}

.profile-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.about-text {
    font-size: 0.8em;
    line-height: 1.6;
}

/* jsMind mind map container */
.jsmind-container {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
}

/* Bring jsmind canvas and nodes to the left */
.jsmind-container .jsmind-inner {
    text-align: left !important;
    padding: 0 !important;
}

.jsmind-container .jsmind-inner jmnodes,
.jsmind-container .jsmind-inner canvas {
    left: 0 !important;
    margin-left: 0 !important;
}