:root {
    /* Python Brand Colors */
    --python-blue: #3776AB;
    --python-yellow: #FFD43B;
    --python-dark-blue: #1e415e;
    --python-light-blue: #4a90d9;

    /* Backgrounds */
    --bg-canvas: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-panel: #f1f5f9;
    --bg-header: var(--python-blue);

    /* Professional Flowchart Colors (Python-themed) */
    --color-start-end: #10b981;        /* Keep emerald for start/end */
    --color-process: var(--python-blue);    /* Python blue for process */
    --color-decision: var(--python-yellow); /* Python yellow for decisions */
    --color-input-output: var(--python-light-blue); /* Light blue for I/O */
    --color-variable: #8b5cf6;         /* Keep violet for variables */
    --color-list: #ec4899;             /* Keep pink for lists */

    /* UI Accents */
    --accent-primary: var(--python-blue);
    --accent-secondary: var(--python-yellow);
    --accent-hover: var(--python-dark-blue);

    --border-subtle: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;

    --node-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --node-selected: 0 0 0 3px rgba(55, 118, 171, 0.4); /* Python blue with opacity */

    /* Keep the highlight color unchanged */
    --highlight-color: #eed202; /* Original highlight color */
}

#canvas { touch-action: none; }
.palette-item { touch-action: none; }

/* --- Python preview line numbers (IDE-style) --- */
.code-display.line-numbers {
    counter-reset: fc-line;
    padding-left: 50px; /* makes room for the gutter */
}

.code-display.line-numbers .code-line {
    display: block;
    position: relative;
    padding-left: 12px;
    white-space: pre; /* preserve indentation per line */
}

.code-display.line-numbers .code-line::before {
    counter-increment: fc-line;
    content: counter(fc-line);
    position: absolute;
    left: -40px;
    width: 32px;
    text-align: right;
    color: #64748b;
    opacity: 0.9;
    user-select: none;          /* don't copy */
    pointer-events: none;
}



/* Interactive Elements Cursors */
.palette-item {
    cursor: alias;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    border-radius: 6px;
    margin-bottom: 4px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.palette-item:hover {
    cursor: alias !important;
    background-color: var(--accent-secondary);
    color: var(--python-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--python-blue);
}


.palette-item:active,
.palette-item[aria-pressed="true"] {
    cursor: grabbing;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.palette-item.selected {
    background-color: var(--python-blue) !important;
    color: white !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
    transform: scale(1.05);
}

/* Touch-friendly node interactions */
.node.long-press-active {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Node Action Icons (Delete and Edit) */
.node-action-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: white;
    color: #334155;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    pointer-events: auto;
}

.node-action-icon:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.node-action-icon:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.node-action-delete {
    border-color: #dc2626;
}

.node-action-delete:hover {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
}

.node-action-edit {
    border-color: #2563eb;
}

.node-action-edit:hover {
    background: #dbeafe;
    border-color: #2563eb;
    color: #2563eb;
}

.node-action-icon svg {
    width: 16px;
    height: 16px;
}

/* Connection Action Icon (same styling as node action icons) */
.connection-action-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: white;
    color: #334155;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    pointer-events: auto;
}

.connection-action-icon:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.connection-action-icon:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.connection-action-icon svg {
    width: 16px;
    height: 16px;
}

.dropdown-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    cursor: pointer;
    background-color: var(--python-yellow);
    color: var(--python-dark-blue);
}

.dropdown-menu {
    border: 1px solid var(--python-dark-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.node {
    cursor: move;
}

.node:hover {
    cursor: move;
}

.connection-point {
    cursor: crosshair;
}

.connection-point:hover {
    cursor: crosshair;
    background-color: var(--accent-secondary);
}

.btn {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.btn:hover {
    cursor: pointer;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--python-blue);
    border-color: var(--python-blue);
}

.btn-primary:hover {
    background-color: var(--python-dark-blue);
    border-color: var(--python-dark-blue);
}

.btn-warning {
    background-color: var(--python-yellow);
    border-color: var(--python-yellow);
    color: var(--python-dark-blue);
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-warning:hover {
    background-color: #e6c947;
    border-color: #e6c947;
    color: var(--python-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--python-blue);
    border-color: white;
}

/* Navbar Python Theming */
.navbar {
    background: linear-gradient(135deg, var(--python-blue) 0%, var(--python-dark-blue) 100%) !important;
    border-bottom: 2px solid var(--python-dark-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
}

.navbar-brand:hover {
    color: var(--python-yellow) !important;
}

/* Navbar Button Groups */
.navbar .btn-group .btn {
    border-radius: 6px !important;
    margin: 0 1px;
}

.navbar .btn-group .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.navbar .btn-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.navbar .btn-group .dropdown-toggle {
    border-radius: 6px !important;
}

/* Individual button spacing */
.navbar .btn:not(.btn-group .btn) {
    margin: 0 2px;
}

/* Smaller screens: make output panel narrower, canvas wider */
@media (max-width: 1200px) {
    #output-panel {
        width: 320px !important; /* Reduced from 480px to give significantly more space to canvas */
        background: #1e293b !important; /* Make it more obvious when the rule applies */
    }

    #console, .code-display {
        font-size: 10px !important; /* Smaller font for narrower panel */
    }
}

/* Mobile navbar adjustments */
@media (max-width: 768px) {
    .navbar .d-flex {
        flex-wrap: wrap;
        gap: 0.25rem !important;
    }

    .navbar .btn-group {
        margin-right: 2px !important;
        margin-bottom: 2px;
    }

    .navbar .btn:not(.btn-group .btn) {
        margin: 0 1px 2px 0;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .navbar .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Extra compact on very small screens */
    @media (max-width: 576px) {
        .navbar .btn {
            padding: 0.2rem 0.4rem;
            font-size: 0.7rem;
            min-width: 32px;
        }

        .navbar .btn-group .btn {
            padding: 0.2rem 0.4rem;
            font-size: 0.7rem;
        }
    }
}

.brain-icon {
    color: var(--python-yellow);
    transform: scale(0.75);
    filter: drop-shadow(0 0 2px rgba(255, 212, 59, 0.3));
}

.python-icon {
    color: var(--python-blue);
    font-size: 0.85em;
    transform: translateY(2px);
    filter: drop-shadow(0 0 2px rgba(55, 118, 171, 0.3));
}

  
#palette::-webkit-scrollbar-track {
    background: var(--python-light-blue); /* Matches the blue sidebar bg */
}    

/* Speed Slider with Ticks */
#speed-slider-container {
    position: relative;
    padding: 10px 15px;
}

#speed-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right,
        var(--python-yellow) 0%,
        var(--python-blue) 50%,
        var(--python-dark-blue) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--python-yellow);
    border: 2px solid var(--python-dark-blue);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#speed-slider::-webkit-slider-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
}

/* Speed slider ticks */
.speed-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 10px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.speed-tick {
    text-align: center;
    font-weight: 500;
}

/* Connection Selection Styling */
.selected-connection {
    filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.8));
}

/* Enhanced UI Elements */
.zoombox {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--python-blue);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zoombox button {
    background: transparent;
    border: none;
    color: var(--python-blue);
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.zoombox button:hover {
    background: var(--python-blue);
    color: white;
    transform: scale(1.05);
}

#palette {
    background: linear-gradient(180deg, var(--python-blue) 0%, var(--python-light-blue) 100%);
    backdrop-filter: blur(10px);
    border-right: 2px solid var(--python-dark-blue);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.palette-header {
    background: linear-gradient(135deg, var(--python-dark-blue), var(--python-blue));
    color: white;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 8px 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }

    #palette {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0 8px 8px 0;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    #palette.open {
        left: 0;
    }

    #canvas {
        margin-left: 0;
        width: 100vw;
        height: calc(100vh - 56px - 200px); /* Account for navbar and output panel */
    }

    #output-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 200px;
        border-radius: 8px 8px 0 0;
    }

    .navbar-toggler {
        display: block !important;
    }

    .palette-toggle-btn {
        display: block !important;
        position: fixed;
        top: 70px;
        left: 10px;
        z-index: 999;
        background: linear-gradient(135deg, var(--python-yellow), var(--python-blue));
        color: white;
        border: 2px solid var(--python-dark-blue);
        border-radius: 50%;
        width: 44px;
        height: 44px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
        font-size: 16px;
    }

    .palette-toggle-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    .zoombox {
        top: 70px !important;
        right: 10px !important;
    }
}

@media (max-width: 480px) {
    #palette {
        width: 250px;
    }

    .palette-item {
        padding: 12px;
        font-size: 14px;
    }

    #speed-slider-container {
        padding: 8px 12px;
    }

    .speed-ticks {
        font-size: 9px;
    }

    .node {
        font-size: 12px;
        min-width: 80px;
        min-height: 35px;
    }

    .zoombox button {
        padding: 6px;
        font-size: 12px;
    }

    #output-panel {
        height: 150px;
    }

    #code-python {
        font-size: 11px;
    }

    #console {
        font-size: 11px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .palette-item {
        min-height: 48px;
        padding: 14px;
    }

    .btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    .node {
        min-width: 100px;
        min-height: 44px;
    }

    .connection-point {
        width: 16px;
        height: 16px;
    }
}

.no-select {
  user-select: none;          /* Standard */
  -webkit-user-select: none;  /* Safari */
  -ms-user-select: none;      /* Old Edge / IE */
}

/* WELCOME SCREEN STYLES */
/* Enhanced Welcome Screen */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: linear-gradient(135deg, var(--python-blue) 0%, var(--python-dark-blue) 30%, #1a1a2e 100%);
    background-size: 200% 200%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.welcome-content {
    max-width: 1000px;
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
    animation: welcomeFadeIn 0.8s ease-out;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.welcome-logo {
    margin-bottom: 2rem;
}

.logo-stack {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.logo-stack .brain-icon {
    font-size: 4rem;
    color: var(--python-yellow);
    filter: drop-shadow(0 0 20px rgba(255, 212, 59, 0.4));
    animation: brainPulse 3s ease-in-out infinite;
}

.logo-stack .python-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--python-blue);
    filter: drop-shadow(0 0 10px rgba(55, 118, 171, 0.6));
}

@keyframes brainPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-header h1 {
    position: relative;
    color: var(--python-dark-blue);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.beta-badge {
    position: absolute;
    background: linear-gradient(135deg, var(--python-yellow), #f4d03f);
    color: var(--python-dark-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(-35deg);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.6);
    bottom: -10px;
   
    z-index: 10;
    animation: plasterFlutter 4s ease-in-out infinite;
    backdrop-filter: blur(1px);
}

@keyframes plasterFlutter {
    0%, 100% {
        transform: rotate(-35deg) scale(1);
        box-shadow:
            0 3px 10px rgba(0, 0, 0, 0.4),
            0 1px 3px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: rotate(-33deg) scale(1.01);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.5),
            0 2px 4px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

/* Style for the E character to provide positioning context */
.e-with-beta {
    position: relative;
    display: inline-block;
}

.tagline {
    color: var(--python-blue);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--python-dark-blue);
    font-weight: 400;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.cta-section {
    margin: 3rem 0 2rem 0;
}

.btn-xl {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--python-blue), var(--python-light-blue));
    border: none;
    box-shadow: 0 8px 25px rgba(55, 118, 171, 0.3);
    transition: all 0.3s ease;
}

.btn-xl:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(55, 118, 171, 0.4);
    background: linear-gradient(135deg, var(--python-dark-blue), var(--python-blue));
}

.cta-subtitle {
    color: var(--python-dark-blue);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--python-blue), var(--python-yellow));
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--python-blue), var(--python-light-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(55, 118, 171, 0.3);
}

.feature-card i {
    font-size: 1.8rem;
    color: white;
}

.feature-card h5 {
    color: var(--python-dark-blue);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Tips Section */
.welcome-tips {
    margin: 3rem 0;
}

.tips-title {
    color: var(--python-dark-blue);
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tip-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--python-blue), var(--python-light-blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(55, 118, 171, 0.3);
}

.tip-content h6 {
    color: var(--python-dark-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tip-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Footer Section */
.welcome-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--python-blue);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-link:hover {
    background: rgba(55, 118, 171, 0.1);
    color: var(--python-dark-blue);
    transform: translateY(-2px);
}

.license-info {
    text-align: center;
}

.license-text {
    color: var(--python-dark-blue);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.license-link a {
    color: var(--python-blue);
    text-decoration: none;
    font-weight: 500;
}

.license-link a:hover {
    text-decoration: underline;
}

.dont-show-check {
    margin-top: 1rem;
}

.dont-show-check .form-check-label {
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
}

#welcomeCloseBtn {
border-radius: 50px;
transition: all 0.3s ease;
}

#welcomeCloseBtn:hover {
transform: scale(1.05);
box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

/* For mobile accessibility */
/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-overlay {
        padding: 0.5rem;
        align-items: flex-start;
    }

    .welcome-content {
        margin-top: 1rem;
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .welcome-logo .logo-stack .brain-icon {
        font-size: 3rem;
    }

    .welcome-logo .logo-stack .python-icon {
        font-size: 1.5rem;
    }

    .welcome-header h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .beta-badge {
        position: static;
        transform: none;
        display: block;
        margin: 1rem auto 0;
        width: fit-content;
        animation: none;
    }

    .tagline, .subtitle {
        font-size: 1rem;
    }

    .btn-xl {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-content {
        padding: 1rem;
        margin-top: 0.5rem;
    }

    .welcome-header h1 {
        font-size: 1.8rem;
    }

    .welcome-logo .logo-stack .brain-icon {
        font-size: 2.5rem;
    }

    .beta-badge {
        position: static;
        transform: none;
        animation: none;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .tip-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .tip-number {
        margin: 0 auto;
    }
}

/* Portrait mode adjustments for better readability */
@media (orientation: portrait) {
    #output-panel {
        height: 500px !important; /* Much taller to accommodate 10+ lines of code */
    }

    .code-display {
        min-height: 280px !important; /* Ensures at least 10 lines visible (192px content + 88px padding) */
        flex: none !important; /* Override flex behavior with fixed height */
        font-size: 12px; /* Smaller font for code preview */
        padding: 40px 24px 24px 24px; /* Maintain padding */
    }

    #console {
        height: 120px !important; /* Reduced terminal height */
        font-size: 11px; /* Smaller font to fit more content */
    }

    #varwatch {
        height: 100px !important; /* Keep variable watch reasonable */
        font-size: 11px; /* Smaller font for variables */
    }
}

.dropdown-menu[data-bs-popper] {
    left:-100px!important;
}
body { 
    font-family: 'Anonymous Pro', 'Courier New', monospace!important;
    height: 100vh; 
    overflow: hidden; 
    background-color: #ffffff; 
    margin: 0;
    color: #1e293b;
}
.headerfont,.modal-title{
    font-family: 'Major Mono Display', monospace;
}

.wrapper { 
    height: calc(100vh - 56px); 
    display: flex; 
    flex-direction: column; 
}

.main-area { 
    flex: 1; 
    display: flex; 
    overflow: hidden; 
}
.node .inner-text {
    display: block;

    /* ellipsis behaviour */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    /* keeps text inside padding limits */
    max-width: 95%;
    line-height: 1.2;
}

/* ========== PALETTE ========== */
#palette {
    width: 260px;
    background: linear-gradient(180deg, var(--python-blue) 0%, var(--python-light-blue) 100%);
    padding: 24px 16px;
    border-right: 2px solid var(--python-dark-blue);
    overflow-y:auto;
}

.palette-header {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 20px 0 12px 4px;
}

.palette-item {
    background: #f8fafc;
    border: 1px solid #131416;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.palette-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.palette-item span {
    flex: 1;
}

.palette-item:hover {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}
.palette-item:active {
    transform: translateY(0);
}

/* ========== CANVAS ========== */
#canvas { 
    flex: 1; 
    background-color: var(--bg-canvas); 
    position: relative; 
    overflow: hidden; 
    background-image: 
        radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 48px 48px;
}

svg#connections-layer { 
    position: absolute; 
    inset: 0; 
    pointer-events: none; 
    overflow:hidden;
    z-index: 1; 
    width: 100%; 
    height: 100%; 
}

/* ========== FLOWCHART NODES ========== */
.node { 
    position: absolute; 
    background: white;
    border: 3px solid #334155; 
    text-align: center; 
    font-size: 11.5px; 
    font-weight: 700; 
    user-select: none; 
    cursor: move; 
    z-index: 2; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 6px; 
    box-shadow: 0 4px 12px var(--node-shadow);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    transform-origin: center center;
}

.node:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.node.selected { 
    border-color: var(--accent); 
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25),
                0 6px 16px rgba(59, 130, 246, 0.3);
    z-index: 100;
}

/* NEW: simple grow + green, no pulse */
.node.running { 
    /*transform: scale(1.02);*/
    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25) !important;
    
    color: #ffffff !important;
    z-index: 101;
}

/* ========== START/END (Green Oval) ========== */
.shape-start, .shape-end { 
    width: 95px; 
    height: 40px; 
    border-radius: 25px;
    background: linear-gradient(135deg, var(--color-start-end) 0%, #16a34a 100%);
    border-color: var(--border-start-end);
    color: white;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* when running, just follow the global green, no extra glow */
.shape-start.running, .shape-end.running {
filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25) !important;
background-color: var(--highlight-color);
    background-image: none !important;
    box-shadow: none;
}

/* ========== PROCESS (Blue Rectangle) ========== */
.shape-process { 
    width: 120px; 
    height: 50px; 
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-process) 0%, #2563eb 100%);
    border-color: var(--border-process);
    color: white;
    font-weight: 700;
}

.shape-process.running {
    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25) !important;
    background-color: var(--highlight-color);
    background-image: none !important;
    box-shadow: none;
}

/* ========== VARIABLE (Purple Rectangle) ========== */
.shape-var { 
    width: 120px; 
    height: 50px; 
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-variable) 0%, #7c3aed 100%);
    border-color: var(--border-variable);
    color: white;
    font-weight: 700;
}

.shape-var.running {
    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25) !important;
    background-color: var(--highlight-color);
    background-image: none !important;
    box-shadow: none;
}

/* ========== INPUT/OUTPUT (Blue Parallelogram) ========== */
.shape-output, .shape-input {
    width: 140px;
    height: 50px;
    background: var(--color-input-output) !important;
    border: none !important;
    transform: skewX(-15deg);
    color: white;
}


/* Small INPUT ribbon in top-left corner */
.shape-input::before {
content: "\21E4";
position: absolute;

right: 8px;
opacity: .25;

font-size: 4rem;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
color: #2e2d2d;
/* slight ribbon look */

pointer-events: none;              /* don’t block clicks on the node */
z-index: 2;                        /* sit above shape borders/fills */
}


/* Small INPUT ribbon in top-left corner */
.shape-output::before {
content: "\21A6";
position: absolute;

right: 8px;
opacity: .25;

font-size: 4rem;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;


color: #2e2d2d;
border-radius: 6px 2px 6px 0;      /* slight ribbon look */
pointer-events: none;              /* don’t block clicks on the node */
z-index: 2;                     /* sit above shape borders/fills */
}

.shape-output .inner-text, .shape-input .inner-text {
    padding: 0 10px;
}

/* Adjust dot positions to compensate for the parent skew */
.shape-output .dot.in, .shape-input .dot.in {
    left: calc(50% - 6.7px);
}

.shape-output .dot.out, .shape-input .dot.out {
    left: calc(50% + 6.7px);
}

.shape-output.running, .shape-input.running {
    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25);
    background-color: var(--highlight-color);
    background-image: none !important;
    box-shadow: none;
}

/* Preserve the skew transform on hover for input/output shapes */
.shape-output:hover, .shape-input:hover {
    transform: skewX(-15deg) translateY(-1px);
}

/* ========== DECISION (Yellow Diamond) ========== */
.shape-decision { 
    width: 130px; 
    height: 110px; 
    background: transparent !important; 
    border: none !important; 
    box-shadow: none !important; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.decision-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    fill: var(--color-decision);
    stroke: var(--border-decision);
    stroke-width: 3px;
    z-index: -1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
    transition: all 0.2s ease;
}


.node.running .decision-svg {

    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25);
   /* fill: #d2f10c !important;
    stroke: #14532d !important;*/
   
}

.node.selected .decision-svg {
    stroke: var(--accent);
    stroke-width: 2px;
}

.shape-decision .inner-text { 
    transform: none; 
    width: 70%;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
    color: white;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* ========== LIST (Cyan Rectangle with Accent) ========== */
.shape-list {
    width: 140px;
    height: 50px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-list) 0%, #0891b2 100%);
    border-color: var(--border-list);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: white;
    font-weight: 700;
}

.shape-list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.shape-list.running {
    filter: grayscale(1) sepia(1) hue-rotate(35deg) saturate(25) !important;
    background-color: var(--highlight-color);
    background-image: none !important;
    box-shadow: none;
}

.shape-list .inner-text {
    width: 100%;
    transform: none;
    font-weight: 700;
    font-size: 11px;
}

/* ========== CONNECTION DOTS ========== */
.dot { 
    width: 18px; 
    height: 18px; 
    background: #ffffff; 
    border: 3px solid #475569; 
    border-radius: 50%; 
    position: absolute; 
    z-index: 100; 
    cursor: crosshair;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dot:hover {
    transform: scale(1.3);
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.dot.in { 
    top: -6px; 
    left: 50%; 
    transform: translateX(-50%); 
}

.dot.out { 
    bottom: -6px; 
    left: 50%; 
    transform: translateX(-50%); 
}

/* Decision-specific dots */
.shape-decision .dot.in { 
    top: -6px; 
    left: 50%; 
    transform: translateX(-50%); 
} 

.shape-decision .dot.out-yes { 
    bottom: -6px; 
    left: 50%; 
    transform: translateX(-50%);
    background: #22c55e;
    border-color: #16a34a;
}

.shape-decision .dot.out-yes:hover {
    background: #16a34a;
    transform: translateX(-50%) scale(1.3);
}

.shape-decision .dot.out-no { 
    top: 50%; 
    right: -6px; 
    transform: translateY(-50%);
    background: #ef4444;
    border-color: #dc2626;
}

.shape-decision .dot.out-no:hover {
    background: #dc2626;
    transform: translateY(-50%) scale(1.3);
}

/* ========== CONNECTION LABELS ========== */
.conn-label { 
    position: absolute; 
    font-size: 10px; 
    font-weight: 800; 
    background: white; 
    padding: 3px 8px; 
    border: 2px solid #e2e8f0; 
    border-radius: 6px; 
    z-index: 3; 
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

#nodes-layer {
    position: relative;
    z-index: 10;
    transform-origin: 0 0;
}

#connections-layer {
    transform-origin: 0 0;
}

/* ========== UTILITY CLASSES ========== */
.text-muted {
    color: #9ca3af !important;
    font-weight: 400;
}

#console .text-muted {
    color: var(--fc-console-muted) !important;
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#console::-webkit-scrollbar-track {
    background: #0f1419;
}

#console::-webkit-scrollbar-thumb {
    background: #334155;
}

/* ========== DRAGGABLE CHALLENGE BANNER ========== */
#active-challenge-banner {
    pointer-events: auto;
    cursor: move;
}
#active-challenge-banner button {
    pointer-events: auto;
    cursor: pointer;
}
#active-challenge-banner {
    z-index: 9999;
    position: absolute;
}

/* ========== OUTPUT PANEL, CODE, CONSOLE, VARWATCH ========== */

/* 1. MAIN OUTPUT CONTAINER */
#output-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    background: #0f172a; /* Deep Slate 900 */
    border-left: 1px solid #1e293b;
    box-shadow: -10px 0 20px rgba(0,0,0,0.2);
    z-index: 10; /* Ensure it stays above connections layer (z-index: 1) */
}

/* 2. PYTHON CODE AREA (Top Section) */
.code-display { 
    flex: 1; 
    padding: 40px 24px 24px 24px; /* Extra top padding for the pseudo-label */
    font-family: 'JetBrains Mono', 'Fira Code', monospace; 
    font-size: 13px; 
    color: #cbd5e1; 
    background: #0f172a; 
    white-space: pre; 
    overflow-y: auto; 
    line-height: 1.6;
    border-bottom: 2px solid #1e293b;
    position: relative;
}

/* CSS-ONLY Label for Code Area */
.code-display::before {
    content: "\f3e2  PYTHON PREVIEW";
    position: absolute;
    top: 12px;
    left: 24px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #a8ecba;
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

/* 3. TERMINAL CONSOLE (Middle Section) */
#console { 
    height: 250px; 
    background: #0a0e27; /* Deep terminal black with slight blue tint */
    color: #00ff41; /* Classic terminal green */
    padding: 50px 16px 16px 16px; /* Top padding makes room for the pseudo-header */
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace; 
    font-size: 13px; 
    overflow-y: auto; 
    border-top: 2px solid #1a1a2e;
    line-height: 1.6;
    position: relative;
    border-bottom: 2px solid #1e293b;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(0, 255, 65, 0.05);
    text-shadow: 0 0 3px rgba(0, 255, 65, 0.3);
    /* Subtle scanline effect */
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 65, 0.02) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 65, 0.02) 3px
        ),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 100%
        );
}

/* CSS-ONLY Terminal Header Bar */
#console::before {
    content: "TERMINAL";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(to bottom, #2d2d44 0%, #1a1a2e 100%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding-left: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    border-bottom: 1px solid #0a0a1a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* Terminal text styling - default white/grey */
#console {
    color: #e2e8f0; /* White/grey for regular output */
}

#console span {
    color: #e2e8f0; /* White/grey for regular output */
    font-weight: normal;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

/* Keep "Running" and "Finished" green */
#console span.terminal-status {
    color: #00ff41 !important;
}

/* Make terminal text look more authentic with slight glow */
#console {
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 65, 0.02) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 65, 0.02) 3px
        );
}

/* Terminal scrollbar styling */
#console::-webkit-scrollbar {
    width: 12px;
}

#console::-webkit-scrollbar-track {
    background: #0a0a1a;
    border-left: 1px solid #1a1a2e;
}

#console::-webkit-scrollbar-thumb {
    background: #2d2d44;
    border: 2px solid #0a0a1a;
    border-radius: 6px;
}

#console::-webkit-scrollbar-thumb:hover {
    background: #3d3d54;
}

/* Terminal selection styling */
#console::selection {
    background: rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

#console span::selection {
    background: rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

/* 4. VARIABLE WATCH (Bottom Section) */
#varwatch {
    height: 180px !important; 
    background: #0f172a !important; 
    padding: 40px 16px 16px 16px !important;
    position: relative;
    border-top: 1px solid #1e293b !important;
}

/* CSS-ONLY Header for VarWatch */
#varwatch::before {
    content: "Live variable values";
    position: absolute;
    top: 15px;
    left: 16px;
    font-size: 9px;
    font-weight: 800;
    color: #38bdf8; /* Sky Blue */
    letter-spacing: 1px;
}

/* Target the table created by JS inside VarWatch */
#varwatch-table table {
    width: 100%;
    border-spacing: 0;
    margin-top: 5px;
}

#varwatch-table tr {
    border-bottom: 1px solid #1e293b !important;
}

#varwatch-table td {
    padding: 6px 0 !important;
    font-size: 12px;
}

/* Left column (Var name) */
#varwatch-table td:first-child {
    color: #94a3b8 !important;
    font-weight: 600;
}

/* Right column (Value) */
#varwatch-table td:last-child {
    color: #22d3ee !important; /* Cyan */
    font-family: 'JetBrains Mono', monospace;
}

/* 5. SCROLLBARS (Universal Dark Polish for these) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Text Selection Color */
::selection {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}


/* ===============================
   Bootstrap modal scrollbar theme
   =============================== */

/* Chrome, Edge, Safari */
.modal ::-webkit-scrollbar {
  width: 12px;
}

.modal ::-webkit-scrollbar-track {
  background: #FFD43B;
}

.modal ::-webkit-scrollbar-thumb {
  background-color: #4B8BBE;
  border-radius: 8px;
  border: 3px solid #FFD43B; /* creates inset effect */
}

.modal ::-webkit-scrollbar-thumb:hover {
  background-color: #356A99;
}

/* Firefox */
.modal {
  scrollbar-width: auto;
  scrollbar-color: #4B8BBE #FFD43B;
}
.modal-open {
    overflow: scroll;
}

/* ========== NODE TYPE-SPECIFIC MODAL STYLING ========== */

/* Process Node Modal (Blue Rectangle) */
.modal-node-process .modal-header {
    background: linear-gradient(135deg, var(--color-process) 0%, #2563eb 100%) !important;
    color: white;
    border-bottom: 2px solid #2563eb;
}

.modal-node-process .modal-footer {
    background: linear-gradient(135deg, var(--color-process) 0%, #2563eb 100%) !important;
    border-top: 2px solid #2563eb;
}

.modal-node-process .modal-content {
    border: 3px solid var(--color-process);
    border-radius: 6px;
}

.modal-node-process .btn-primary {
    background: var(--color-process);
    border-color: var(--color-process);
}

.modal-node-process .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Variable Node Modal (Purple Rectangle) */
.modal-node-var .modal-header {
    background: linear-gradient(135deg, var(--color-variable) 0%, #7c3aed 100%) !important;
    color: white;
    border-bottom: 2px solid #7c3aed;
}

.modal-node-var .modal-footer {
    background: linear-gradient(135deg, var(--color-variable) 0%, #7c3aed 100%) !important;
    border-top: 2px solid #7c3aed;
}

.modal-node-var .modal-content {
    border: 3px solid var(--color-variable);
    border-radius: 6px;
}

.modal-node-var .btn-primary {
    background: var(--color-variable);
    border-color: var(--color-variable);
}

.modal-node-var .btn-primary:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

/* Input Node Modal (Light Blue Parallelogram) */
.modal-node-input .modal-header {
    background: var(--color-input-output) !important;
    color: white;
    border-bottom: 2px solid var(--color-input-output);
    transform: skewX(-2deg);
    margin: -1px -1px 0 -1px;
}

.modal-node-input .modal-header .modal-title {
    transform: skewX(2deg);
}

.modal-node-input .modal-footer {
    background: var(--color-input-output) !important;
    border-top: 2px solid var(--color-input-output);
    transform: skewX(-2deg);
    margin: 0 -1px -1px -1px;
}

.modal-node-input .modal-footer .btn {
    transform: skewX(2deg);
}

.modal-node-input .modal-content {
    border: 3px solid var(--color-input-output);
    transform: skewX(-2deg);
    border-radius: 6px;
    overflow: hidden;
}

.modal-node-input .modal-body {
    transform: skewX(2deg);
}

.modal-node-input .btn-primary {
    background: var(--color-input-output);
    border-color: var(--color-input-output);
}

.modal-node-input .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Output Node Modal (Light Blue Parallelogram) */
.modal-node-output .modal-header {
    background: var(--color-input-output) !important;
    color: white;
    border-bottom: 2px solid var(--color-input-output);
    transform: skewX(-2deg);
    margin: -1px -1px 0 -1px;
}

.modal-node-output .modal-header .modal-title {
    transform: skewX(2deg);
}

.modal-node-output .modal-footer {
    background: var(--color-input-output) !important;
    border-top: 2px solid var(--color-input-output);
    transform: skewX(-2deg);
    margin: 0 -1px -1px -1px;
}

.modal-node-output .modal-footer .btn {
    transform: skewX(2deg);
}

.modal-node-output .modal-content {
    border: 3px solid var(--color-input-output);
    transform: skewX(-2deg);
    border-radius: 6px;
    overflow: hidden;
}

.modal-node-output .modal-body {
    transform: skewX(2deg);
}

.modal-node-output .btn-primary {
    background: var(--color-input-output);
    border-color: var(--color-input-output);
}

.modal-node-output .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Decision Node Modal (Yellow Diamond) */
.modal-node-decision .modal-header {
    background: var(--color-decision) !important;
    color: white;
    border-bottom: 3px solid #1e415e;
    position: relative;
    padding: 15px 20px;
}

.modal-node-decision .modal-header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background: var(--color-decision);
    border: 2px solid #1e415e;
    border-bottom: none;
    border-right: none;
}

.modal-node-decision .modal-title {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 800;
}

.modal-node-decision .modal-footer {
    background: var(--color-decision) !important;
    border-top: 3px solid #1e415e;
    position: relative;
    padding: 15px 20px;
}

.modal-node-decision .modal-footer::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background: var(--color-decision);
    border: 2px solid #1e415e;
    border-top: none;
    border-left: none;
}

.modal-node-decision .modal-content {
    border: 3px solid #1e415e;
    border-radius: 8px;
    background: white;
}

.modal-node-decision .btn-primary {
    background: #1e415e;
    border-color: #1e415e;
    color: var(--color-decision);
    font-weight: 700;
}

.modal-node-decision .btn-primary:hover {
    background: #0f2538;
    border-color: #0f2538;
    color: var(--color-decision);
}

/* List Node Modal (Pink Rectangle with Accent) */
.modal-node-list .modal-header {
    background: linear-gradient(135deg, var(--color-list) 0%, #0891b2 100%) !important;
    color: white;
    border-bottom: 2px solid var(--color-list);
    position: relative;
    padding-left: 30px;
}

.modal-node-list .modal-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: rgba(255, 255, 255, 0.4);
}

.modal-node-list .modal-footer {
    background: linear-gradient(135deg, var(--color-list) 0%, #0891b2 100%) !important;
    border-top: 2px solid var(--color-list);
    position: relative;
    padding-left: 30px;
}

.modal-node-list .modal-footer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: rgba(255, 255, 255, 0.4);
}

.modal-node-list .modal-content {
    border: 3px solid var(--color-list);
    border-radius: 6px;
}

.modal-node-list .btn-primary {
    background: var(--color-list);
    border-color: var(--color-list);
}

.modal-node-list .btn-primary:hover {
    background: #0891b2;
    border-color: #0891b2;
}

dl{
    border: solid 2px #FFD300;
    padding: 4px;
}
