@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* Main Container - Full Viewport */
.mindmap-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* SVG Canvas for Lines */
#connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.sub-connection-line {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 5, 5;
}

/* Header */
.header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: clamp(20px, 4vw, 36px);
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 8px;
}

.header p {
    font-size: clamp(12px, 2vw, 16px);
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* Central Node */
.central-node {
    position: absolute;
    width: min(20vw, 220px);
    height: min(20vw, 220px);
    min-width: 140px;
    min-height: 140px;
    background-image: url('../images/team_collaboration_leadership.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/team_collaboration_leadership.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    cursor: move;
    user-select: none;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transition: transform 0.1s ease;
}

.central-node::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    border-radius: 50%;
    z-index: -1;
}

.central-node.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.central-title {
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 4px;
}

.central-subtitle {
    font-size: clamp(11px, 1.5vw, 15px);
    font-weight: 500;
    color: white;
    text-align: center;
    opacity: 0.95;
}

.central-theory {
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: 400;
    color: white;
    opacity: 0.9;
    margin-top: 2px;
}

/* Branch Nodes */
.branch-node {
    position: absolute;
    width: min(15vw, 160px);
    height: min(15vw, 160px);
    min-width: 100px;
    min-height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 50;
    cursor: move;
    user-select: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    background-size: cover;
    background-position: center;
    transition: transform 0.1s ease;
}

.branch-node::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -1;
}

.branch-node.dragging {
    cursor: grabbing;
    transform: scale(1.1);
    z-index: 1000;
    box-shadow: 0 15px 50px rgba(0,0,0,0.35);
}

.branch-icon {
    font-size: clamp(20px, 3vw, 30px);
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.branch-title {
    font-size: clamp(11px, 1.5vw, 15px);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.branch-subtitle {
    font-size: clamp(9px, 1.2vw, 11px);
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* Individual Branch Styles with Images */
.capacidad {
    background-image: url('../images/brain_cognitive_abilities.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/brain_cognitive_abilities.jpg');
}
.capacidad::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.2));
}

.logro {
    background-image: url('../images/trophy_success_achievement.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/trophy_success_achievement.jpg');
}
.logro::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
}

.estatus {
    background-image: url('../images/professional_social_status.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/professional_social_status.jpg');
}
.estatus::before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
}

.responsabilidad {
    background-image: url('../images/balance_scale_responsibility.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/balance_scale_responsibility.jpg');
}
.responsabilidad::before {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
}

.participacion {
    background-image: url('../images/teamwork_social_participation.jpg'), url('https://pub-bad772dbd2f347ffa0ed61b8023693ea.r2.dev/teamwork_social_participation.jpg');
}
.participacion::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.2));
}

/* Sub-concepts */
.sub-concept {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.5vw, 16px);
    font-size: clamp(9px, 1vw, 11px);
    font-weight: 500;
    color: #1e293b;
    text-align: center;
    z-index: 30;
    cursor: move;
    user-select: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: min(18vw, 150px);
    min-width: 80px;
    line-height: 1.4;
    transition: transform 0.1s ease;
}

/* Add button for nodes */
.add-button {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.add-button:hover {
    transform: scale(1.2);
    background: #2563eb;
}

.branch-node:hover .add-button,
.central-node:hover .add-button {
    display: flex;
}

/* Context menu */
.context-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 8px;
    display: none;
    z-index: 1000;
    min-width: 150px;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #f1f5f9;
}

.context-menu-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.sub-concept.dragging {
    cursor: grabbing;
    transform: scale(1.1);
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.sub-concept-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: clamp(9px, 1.1vw, 11px);
}

.sub-concept-desc {
    font-size: clamp(8px, 0.9vw, 10px);
    opacity: 0.7;
}

/* Info Panel */
.info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: clamp(12px, 2vw, 20px);
    max-width: min(35vw, 280px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: bottom left;
}

.info-panel.collapsed {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.info-panel-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #ef4444;
}

.info-panel-toggle:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.info-panel-content {
    transition: all 0.3s ease;
}

/* Collapsed Panel Toggle Button */
.info-panel-collapsed {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: white;
    font-size: 20px;
}

.info-panel-collapsed:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.info-panel-collapsed.show {
    transform: scale(1);
    opacity: 1;
}

.info-panel-collapsed.hide {
    transform: scale(0);
    opacity: 0;
}

.info-title {
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.info-text {
    font-size: clamp(10px, 1.2vw, 12px);
    color: #64748b;
    line-height: 1.5;
}

/* Print Styles - FIXED APPROACH BASED ON ANALYSIS */
@media print {
    @page {
        size: A4;
        margin: 0.5in;
    }
    
    /* Force browsers to print all colors and backgrounds */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* CRITICAL: Ensure real img elements are visible in print */
    img { 
        visibility: visible !important; 
        display: block !important; 
        max-width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Specifically for our dynamically inserted print images */
    .print-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        z-index: 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ensure SVG is visible */
    svg { 
        visibility: visible !important; 
        display: block !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ensure SVG connections are visible in print */
    #connections-svg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        pointer-events: none !important;
        z-index: 1 !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .connection-line,
    .sub-connection-line {
        stroke: rgba(255, 255, 255, 0.8) !important;
        stroke-width: 3 !important;
        fill: none !important;
        stroke-linecap: round !important;
        display: block !important;
        visibility: visible !important;
    }
    
    /* Print image replacements should be visible and properly shaped */
    .print-image-replacement {
        visibility: visible !important;
        display: block !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Avoid accidental utility classes hiding content */
    .no-print { display: none !important; }
    
    /* Optional: improve colors/backgrounds if we still need them */
    .prints-important-bg {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: block !important;
        background-repeat: no-repeat !important;
        background-size: contain !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Force print of background images */
    *[style*="background-image"] {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    html, body {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    .mindmap-container {
        position: relative !important;
        width: 100% !important;
        height: 100vh !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .info-panel,
    .info-panel-collapsed,
    .context-menu {
        display: none !important;
    }
    
    #connections-svg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
    }
    
    .connection-line {
        stroke: rgba(255, 255, 255, 0.8) !important;
        stroke-width: 3 !important;
        fill: none !important;
    }
    
    .sub-connection-line {
        stroke: rgba(255, 255, 255, 0.6) !important;
        stroke-width: 2 !important;
        fill: none !important;
        stroke-dasharray: 5, 5 !important;
    }
    
    .header {
        position: absolute !important;
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
        z-index: 10 !important;
    }
    
    .central-node,
    .branch-node {
        position: absolute !important;
        background-size: cover !important;
        background-position: center !important;
        border-radius: 50% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        -webkit-print-color-adjust: exact !important;
        color: white !important;
        text-align: center !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.25) !important;
        overflow: hidden !important;
        /* Ensure text stays on top of print images */
        z-index: 2 !important;
    }
    
    /* Ensure text elements stay visible over print images */
    .central-title,
    .central-subtitle,
    .central-theory,
    .branch-title,
    .branch-subtitle,
    .branch-icon {
        position: relative !important;
        z-index: 3 !important;
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
        font-weight: bold !important;
    }
    
    .central-node::before,
    .branch-node::before {
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        border-radius: 50% !important;
        z-index: -1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .sub-concept {
        position: absolute !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 12px !important;
        padding: 8px 12px !important;
        color: #1e293b !important;
        text-align: center !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        backdrop-filter: none !important;
        border: 1px solid #e2e8f0 !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    /* Text visibility */
    .central-title,
    .central-subtitle,
    .central-theory,
    .branch-title,
    .branch-subtitle {
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
        font-weight: bold !important;
    }
    
    .branch-icon {
        color: white !important;
        filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8)) !important;
    }
    
    .sub-concept-title,
    .sub-concept-desc {
        color: #1e293b !important;
        font-weight: 600 !important;
    }
    
    /* Only apply fallback gradients to elements without converted images */
    .central-node:not(.image-converted) {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    }
    
    .branch-node.capacidad:not(.image-converted) {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    }
    
    .branch-node.logro:not(.image-converted) {
        background: linear-gradient(135deg, #10b981, #047857) !important;
    }
    
    .branch-node.estatus:not(.image-converted) {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    }
    
    .branch-node.responsabilidad:not(.image-converted) {
        background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    }
    
    .branch-node.participacion:not(.image-converted) {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    }
    
    /* Ensure all branch nodes have proper styling */
    .central-node,
    .branch-node {
        background-size: cover !important;
        background-position: center !important;
        /* Add a border to make nodes more visible */
        border: 3px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Force converted images to be visible in print */
    .central-node.image-converted,
    .branch-node.image-converted {
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ensure base64 images are properly displayed */
    .central-node[style*="url(data:"],
    .branch-node[style*="url(data:"],
    .central-node.image-converted,
    .branch-node.image-converted {
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Higher specificity for inline styles during print */
    *[style*="background-image: url(data:"] {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Ensure converted images override CSS background-image */
    .central-node.image-converted[style] {
        background-image: var(--converted-bg-image, inherit) !important;
    }
    
    .branch-node.image-converted[style] {
        background-image: var(--converted-bg-image, inherit) !important;
    }
    
    /* CRITICAL FIX: Use content property instead of background images for printing */
    /* Hide background images during print and show actual content images */
    
    .central-node {
        background: none !important;
        position: relative !important;
    }
    
    .central-node::before {
        content: var(--print-image-central, '') !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        z-index: -1 !important;
        display: block !important;
    }
    
    .branch-node {
        background: none !important;
        position: relative !important;
    }
    
    .branch-node::before {
        content: var(--print-image-branch, '') !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        z-index: -1 !important;
        display: block !important;
    }
    
    /* Specific content URLs for each node type */
    .central-node::before {
        content: var(--print-image-central, '') !important;
    }
    
    .capacidad::before {
        content: var(--print-image-capacidad, '') !important;
    }
    
    .logro::before {
        content: var(--print-image-logro, '') !important;
    }
    
    .estatus::before {
        content: var(--print-image-estatus, '') !important;
    }
    
    .responsabilidad::before {
        content: var(--print-image-responsabilidad, '') !important;
    }
    
    .participacion::before {
        content: var(--print-image-participacion, '') !important;
    }
    
    /* Fallback gradients if content images fail */
    .central-node:not([style*="--print-image-central"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    }
    
    .capacidad:not([style*="--print-image-capacidad"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    }
    
    .logro:not([style*="--print-image-logro"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #10b981, #047857) !important;
    }
    
    .estatus:not([style*="--print-image-estatus"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    }
    
    .responsabilidad:not([style*="--print-image-responsabilidad"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    }
    
    .participacion:not([style*="--print-image-participacion"])::before {
        content: '' !important;
        background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    }
    
    /* Level 3: Ultimate fallback for browsers that don't support content URLs */
    @supports not (content: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==')) {
        /* Use pseudo-element backgrounds for older browsers */
        .central-node.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-central, linear-gradient(135deg, #3b82f6, #1d4ed8)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
            -webkit-print-color-adjust: exact !important;
            color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        
        .capacidad.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-capacidad, linear-gradient(135deg, #3b82f6, #1d4ed8)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        
        .logro.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-logro, linear-gradient(135deg, #10b981, #047857)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        
        .estatus.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-estatus, linear-gradient(135deg, #ef4444, #dc2626)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        
        .responsabilidad.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-responsabilidad, linear-gradient(135deg, #f59e0b, #d97706)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        
        .participacion.image-converted::before {
            content: '' !important;
            background-image: var(--fallback-bg-participacion, linear-gradient(135deg, #8b5cf6, #7c3aed)) !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }
    
    .header p {
        font-size: 12px;
    }
    
    .central-node {
        width: 120px;
        height: 120px;
        min-width: 120px;
        min-height: 120px;
    }
    
    .branch-node {
        width: 90px;
        height: 90px;
        min-width: 90px;
        min-height: 90px;
    }
    
    .sub-concept {
        max-width: 100px;
        min-width: 70px;
        padding: 6px 8px;
    }
    
    .info-panel {
        max-width: 180px;
        padding: 10px;
    }
}

/* PNG Export Optimizations */
.png-export-mode {
    /* Ensure everything is visible and well-positioned for screenshot */
    overflow: visible !important;
}

.png-export-mode .mindmap-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    overflow: visible !important;
}

.png-export-mode .central-node,
.png-export-mode .branch-node {
    /* Ensure images are fully loaded and visible */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.png-export-mode .connection-line,
.png-export-mode .sub-connection-line {
    /* Ensure SVG lines are visible in screenshot */
    stroke: rgba(255, 255, 255, 0.8) !important;
    stroke-width: 3 !important;
}