/* Radial Mindmap Styles */

.radial-mindmap-wrapper {
    margin: 40px auto;
    max-width: 100%;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mindmap-title {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Controls */
.mindmap-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mindmap-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mindmap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mindmap-btn:active {
    transform: translateY(0);
}

/* Container */
.mindmap-container {
    width: 100%;
    height: auto;
    overflow: visible;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

/* SVG Styles */
.mindmap-container svg {
    display: block;
    margin: 0 auto;
    cursor: grab;
}

.mindmap-container svg:active {
    cursor: grabbing;
}

/* Node Styles */
.node circle {
    fill: #667eea;
    stroke: #fff;
    stroke-width: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.node circle:hover {
    fill: #764ba2;
    stroke-width: 3px;
    r: 7;
}

.node.collapsed circle {
    fill: #48bb78;
}

.node.root circle {
    fill: #e53e3e;
    r: 8;
}

.node text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    fill: #2d3748;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Link Styles */
.link {
    fill: none;
    stroke: #cbd5e0;
    stroke-width: 1.5px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.link:hover {
    stroke: #667eea;
    stroke-width: 2.5px;
    opacity: 1;
}

/* Loading Spinner */
.mindmap-loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.mindmap-error,
.mindmap-error-container {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.error-message {
    margin: 0;
    font-weight: 500;
}

/* Tooltip */
.mindmap-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    line-height: 1.5;
}

.mindmap-tooltip strong {
    display: block;
    margin-bottom: 5px;
    color: #667eea;
    font-size: 14px;
}

/* Color Schemes */
.color-scheme-warm .node circle {
    fill: #f6ad55;
}

.color-scheme-warm .node.collapsed circle {
    fill: #fc8181;
}

.color-scheme-warm .link {
    stroke: #fbd38d;
}

.color-scheme-cool .node circle {
    fill: #4299e1;
}

.color-scheme-cool .node.collapsed circle {
    fill: #48bb78;
}

.color-scheme-cool .link {
    stroke: #90cdf4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .radial-mindmap-wrapper {
        padding: 15px;
    }
    
    .mindmap-title {
        font-size: 22px;
    }
    
    .mindmap-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mindmap-btn {
        width: 100%;
    }
    
    .node text {
        font-size: 10px;
    }
}

/* Accessibility */
.mindmap-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.node:focus {
    outline: 2px solid #667eea;
    outline-offset: 3px;
}