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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.site-header-mm {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 200;
    background: rgba(35, 47, 62, 0.95);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #FF9900;
    backdrop-filter: blur(10px);
}
.site-header-mm .logo { height: 36px; }
.site-header-mm nav a {
    color: #b3d4f0;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9em;
    transition: color 0.2s;
}
.site-header-mm nav a:hover { color: #FF9900; }

/* ── Info box ── */
.map-header {
    position: absolute;
    top: 70px;
    left: 20px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 153, 0, 0.3);
    backdrop-filter: blur(10px);
}
.map-header h1 {
    font-size: 1.2rem;
    background: linear-gradient(90deg, #FF9900, #5eead4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 3px;
}
.map-header p { font-size: 0.8rem; color: #94a3b8; }

/* ── Controls ── */
.controls {
    position: absolute;
    top: 70px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 8px;
}
.btn {
    background: rgba(35, 47, 62, 0.9);
    border: 1px solid rgba(255, 153, 0, 0.4);
    color: #FF9900;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}
.btn:hover {
    background: rgba(255, 153, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.2);
}

/* ── SVG ── */
#mindmap-svg {
    width: 100%;
    flex: 1;
    cursor: grab;
    display: block;
}
#mindmap-svg:active { cursor: grabbing; }

/* ── Nodes ── */
.node { cursor: pointer; }
.node:hover { filter: brightness(1.3); }
.node-circle { stroke-width: 2.5; transition: all 0.3s; }
.node-text {
    font-size: 13px;
    font-weight: 600;
    fill: #e2e8f0;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
}
.link {
    fill: none;
    stroke-width: 1.8;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.expand-icon { fill: #0f172a; font-size: 11px; font-weight: bold; pointer-events: none; }

/* ── Info Panel ── */
.info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 380px;
    background: rgba(0, 30, 60, 0.97);
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 12px;
    padding: 18px;
    z-index: 100;
    transform: translateX(380px);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}
.info-panel.active { transform: translateX(0); }
.info-panel h3 { color: #FF9900; margin-bottom: 6px; font-size: 1.1rem; }
.info-panel .info-desc { color: #cbd5e1; line-height: 1.6; font-size: 0.9rem; margin-bottom: 12px; }
.info-panel .info-details { list-style: none; padding: 0; margin: 10px 0 0; }
.info-panel .info-details li {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}
.info-panel .info-details li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #FF9900;
}
.info-panel .info-link {
    display: inline-block;
    margin-top: 12px;
    color: #FF9900;
    font-size: 0.82rem;
    text-decoration: none;
    border: 1px solid rgba(0,163,224,0.3);
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
.info-panel .info-link:hover { background: rgba(0,163,224,0.15); }
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    margin-top: 10px;
    margin-right: 4px;
    font-weight: bold;
}
.badge-aws      { background: #ff9900; color: #000; }
.badge-azure    { background: #0089d6; color: #fff; }
.badge-gcp      { background: #4285f4; color: #fff; }
.badge-oci      { background: #f80000; color: #fff; }
.badge-devops   { background: #FF9900; color: #232F3E; }
.badge-security { background: #f87171; color: #fff; }
.badge-tool     { background: #a78bfa; color: #fff; }

/* ── Legend ── */
.legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 30, 60, 0.9);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 153, 0, 0.2);
    z-index: 100;
}
.legend-item { display: flex; align-items: center; margin-bottom: 6px; font-size: 0.8rem; }
.legend-color { width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }

/* ── Tooltip ── */
.tooltip {
    position: absolute;
    background: rgba(0, 20, 40, 0.95);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 300;
    border: 1px solid rgba(255, 153, 0, 0.3);
    max-width: 220px;
}

/* ── Animação nó expandido ── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.node.expanded .node-circle { animation: pulse 2.5s infinite; }

/* ── Focus Zoom ── */
.node { transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), filter 0.35s ease, opacity 0.35s ease; }
.link { transition: opacity 0.35s ease, stroke-width 0.35s ease; }

#nodes-layer.has-focus .node:not(.focused) {
    filter: blur(2.5px) brightness(0.4);
    opacity: 0.35;
    pointer-events: none;
}
#nodes-layer.has-focus .node.focused {
    filter: drop-shadow(0 0 14px var(--focus-color, #FF9900)) brightness(1.25);
    transform: scale(1.35);
    transform-box: fill-box;
    transform-origin: center;
}
#links-layer.has-focus .link:not(.focused-link) {
    opacity: 0.08;
}
#links-layer.has-focus .link.focused-link {
    opacity: 0.9;
    stroke-width: 2.5;
}

/* ── Spotlight (ramos inativos encolhem) ── */
.node.idle {
    transform: scale(0.55);
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0.45;
    filter: brightness(0.6);
}
.node.idle .node-text { font-size: 10px; }
.link.idle-link { opacity: 0.15; stroke-dasharray: 4 3; }
